1use clap::Subcommand;
2
3use crate::{
4 client_state::{AnyState, BwCommand},
5 render::CommandResult,
6};
7
8#[derive(Subcommand, Clone)]
9pub enum ConfigCommand {
10 Server {
11 base_url: Option<String>,
12
13 #[arg(
14 long,
15 help = "Provides a custom web vault URL that differs from the base URL."
16 )]
17 web_vault: Option<String>,
18
19 #[arg(
20 long,
21 help = "Provides a custom API URL that differs from the base URL."
22 )]
23 api: Option<String>,
24 #[arg(
25 long,
26 help = "Provides a custom identity URL that differs from the base URL."
27 )]
28 identity: Option<String>,
29 #[arg(
30 long,
31 help = "Provides a custom icons service URL that differs from the base URL."
32 )]
33 icons: Option<String>,
34 #[arg(
35 long,
36 help = "Provides a custom notifications URL that differs from the base URL."
37 )]
38 notifications: Option<String>,
39 #[arg(
40 long,
41 help = "Provides a custom events URL that differs from the base URL."
42 )]
43 events: Option<String>,
44
45 #[arg(long, help = "Provides the URL for your Key Connector server.")]
46 key_connector: Option<String>,
47 },
48}
49
50impl BwCommand for ConfigCommand {
51 type Client = AnyState;
52
53 async fn run(self, _: AnyState) -> CommandResult {
54 todo!()
55 }
56}