use clap::{Parser, Subcommand, ValueEnum};
#[derive(Parser, Debug, Copy, Clone)]
#[clap(
version,
about = "A kustomize plugin that is able to generate secrets by extracting them from or replace placeholders in other manifests from pass",
usage = "This program follows the KRM Functions Specification which means that input is passed to it from kustomize via STDIN, output is returned via STDOUT and unstructured messages are returned via STDERR.\n\n See https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md"
)]
pub struct CliArgs {
#[clap(subcommand)]
pub command: Option<CliCommand>,
}
#[derive(Subcommand, Debug, Copy, Clone)]
pub enum CliCommand {
PrintSchema {
#[clap(value_enum, short = 'f', long = "format", default_value = "openapi")]
format: SchemaFormat,
},
ExecPlugin,
}
#[derive(ValueEnum, Copy, Clone, Debug)]
pub enum SchemaFormat {
JsonSchema,
Openapi,
}