1use clap::Parser;
4use voa_core::identifiers::{Context, Os, Purpose, Technology};
5
6use crate::cli::OutputFormat;
7
8#[derive(Debug, Parser)]
9pub struct ListCommand {
10 #[arg(env = "VOA_LIST_OS", help = "The OS to search for.")]
11 pub os: Os,
12
13 #[arg(env = "VOA_LIST_PURPOSE", help = "The purpose to search for.")]
14 pub purpose: Purpose,
15
16 #[arg(
17 env = "VOA_LIST_CONTEXT",
18 help = "The context to search for.",
19 long,
20 long_help = r#"The context to search for.
21
22If not specified, defaults to "default"."#
23 )]
24 pub context: Option<Context>,
25
26 #[arg(
27 env = "VOA_LIST_TECHNOLOGY",
28 help = "The technology to search for.",
29 long,
30 long_help = r#"The technology to search for.
31
32Currently only "openpgp" is supported.
33If not specified, defaults to "openpgp"."#,
34 short
35 )]
36 pub technology: Option<Technology>,
37
38 #[arg(
39 env = "VOA_LIST_OUTPUT_FORMAT",
40 help = "The output format to use.",
41 long,
42 short,
43 default_value_t = OutputFormat::default()
44 )]
45 pub output_format: OutputFormat,
46}