1use clap::Parser;
2use url::Url;
3
4/// Traverse records from Tap, saving to a PostgreSQL DB.
5#[derive(Debug, Parser)]
6pub struct Arguments {
7 /// URL for the PostgreSQL database.
8 #[arg(long, short = 'd', env = "TAP_DUMP_DATABASE_URL")]
9 pub db: Url,
10
11 /// URL for the Tap service.
12 #[arg(
13 long,
14 short = 'H',
15 env = "TAP_DUMP_TAP_URL",
16 default_value = "http://localhost:2480"
17 )]
18 pub tap: Url,
19
20 /// Admin password for the Tap service.
21 #[arg(long, short = 'p', env = "TAP_DUMP_TAP_PASSWORD")]
22 pub tap_password: Option<String>,
23
24 /// DIDs to seed from.
25 #[arg(long, value_delimiter = ',', env = "TAP_DUMP_SEED")]
26 pub seed: Vec<String>,
27}
28
29pub fn parse() -> Arguments {
30 Arguments::parse()
31}