voa 0.7.3

Command line interface and library for interacting with the File Hierarchy for the Verification of OS Artifacts (VOA)
Documentation
//! The `voa list` subcommand.

use clap::Parser;
use voa_core::identifiers::{Context, Os, Purpose, Technology};

use crate::cli::OutputFormat;

#[derive(Debug, Parser)]
pub struct ListCommand {
    #[arg(env = "VOA_LIST_OS", help = "The OS to search for.")]
    pub os: Os,

    #[arg(env = "VOA_LIST_PURPOSE", help = "The purpose to search for.")]
    pub purpose: Purpose,

    #[arg(
        env = "VOA_LIST_CONTEXT",
        help = "The context to search for.",
        long,
        long_help = r#"The context to search for.

If not specified, defaults to "default"."#
    )]
    pub context: Option<Context>,

    #[arg(
        env = "VOA_LIST_TECHNOLOGY",
        help = "The technology to search for.",
        long,
        long_help = r#"The technology to search for.

Currently only "openpgp" is supported.
If not specified, defaults to "openpgp"."#,
        short
    )]
    pub technology: Option<Technology>,

    #[arg(
        env = "VOA_LIST_OUTPUT_FORMAT",
        help = "The output format to use.",
        long,
        short,
        default_value_t = OutputFormat::default()
    )]
    pub output_format: OutputFormat,
}