Server tools to backfill, tail, mirror, and verify PLC logs

env prefix and use env in readme for sensitive val

+6 -6
+2 -2
readme.md
··· 10 - Wrap the reference PLC server and run it as a mirror: 11 12 ```bash 13 allegedly --upstream "https://plc.directory" mirror \ 14 --bind "0.0.0.0:8000" \ 15 - --wrap "http://127.0.0.1:3000" \ 16 - --wrap-pg "postgresql://postgres:postgres@localhost:5432/postgres" 17 ``` 18 19 (add `--help` to any command for more info about it)
··· 10 - Wrap the reference PLC server and run it as a mirror: 11 12 ```bash 13 + export ALLEGEDLY_WRAP_PG="postgresql://user:pass@pg-host:5432/plc-db" 14 allegedly --upstream "https://plc.directory" mirror \ 15 --bind "0.0.0.0:8000" \ 16 + --wrap "http://127.0.0.1:3000" 17 ``` 18 19 (add `--help` to any command for more info about it)
+4 -4
src/bin/allegedly.rs
··· 10 #[derive(Debug, Parser)] 11 struct Cli { 12 /// Upstream PLC server 13 - #[arg(short, long, env)] 14 #[clap(default_value = "https://plc.directory")] 15 upstream: Url, 16 #[command(subcommand)] ··· 74 /// Wrap a did-method-plc server, syncing upstream and blocking op submits 75 Mirror { 76 /// the wrapped did-method-plc server 77 - #[arg(long, env)] 78 wrap: Url, 79 /// the wrapped did-method-plc server's database (write access required) 80 - #[arg(long, env)] 81 wrap_pg: Url, 82 /// wrapping server listen address 83 - #[arg(short, long, env)] 84 #[clap(default_value = "127.0.0.1:8000")] 85 bind: SocketAddr, 86 },
··· 10 #[derive(Debug, Parser)] 11 struct Cli { 12 /// Upstream PLC server 13 + #[arg(short, long, env = "ALLEGEDLY_UPSTREAM")] 14 #[clap(default_value = "https://plc.directory")] 15 upstream: Url, 16 #[command(subcommand)] ··· 74 /// Wrap a did-method-plc server, syncing upstream and blocking op submits 75 Mirror { 76 /// the wrapped did-method-plc server 77 + #[arg(long, env = "ALLEGEDLY_WRAP")] 78 wrap: Url, 79 /// the wrapped did-method-plc server's database (write access required) 80 + #[arg(long, env = "ALLEGEDLY_WRAP_PG")] 81 wrap_pg: Url, 82 /// wrapping server listen address 83 + #[arg(short, long, env = "ALLEGEDLY_BIND")] 84 #[clap(default_value = "127.0.0.1:8000")] 85 bind: SocketAddr, 86 },