pigeon/dataops/cli.rs
1use clap::{Args, Subcommand};
2
3#[derive(Args, Debug)]
4pub struct DataopsArgs {
5 #[command(subcommand)]
6 pub command: DataopsCommands,
7}
8
9#[derive(Subcommand, Debug)]
10pub enum DataopsCommands {
11 /// Manage configured bucket-configs (create, edit, remove)
12 BucketConfig(BucketConfigArgs),
13}
14
15#[derive(Args, Debug)]
16pub struct BucketConfigArgs {
17 #[command(subcommand)]
18 pub command: BucketConfigCommands,
19}
20
21#[derive(Subcommand, Debug)]
22pub enum BucketConfigCommands {
23 /// Interactively configure a new S3-compatible bucket-config
24 New {
25 /// Alias to register this bucket-config under (e.g. "email"). Prompted if omitted.
26 alias: Option<String>,
27 },
28
29 /// Interactively edit an existing bucket-config's bucket, endpoint,
30 /// access key, or secret key. The alias itself can't be changed this
31 /// way -- remove and reconfigure under a new alias instead.
32 Edit {
33 /// Alias of the bucket-config to edit. Interactively selected when omitted.
34 alias: Option<String>,
35 },
36
37 /// Remove a configured bucket-config and its stored secret
38 Remove {
39 /// Alias of the bucket-config to remove. Interactively selected when omitted.
40 alias: Option<String>,
41 },
42}