pub mod config;
pub mod secret;
pub mod signature;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum Commands {
Config { #[command(subcommand)] command: config::Commands },
Secret { #[command(subcommand)] command: secret::Commands },
Signature { #[command(subcommand)] command: signature::Commands },
}
impl Commands {
pub async fn handle(self, cli_config: &crate::Config, handle: &objectiveai_cli_sdk::output::Handle) -> Result<(), crate::error::Error> {
match self {
Commands::Config { command } => command.handle(cli_config, handle).await,
Commands::Secret { command } => command.handle(cli_config, handle).await,
Commands::Signature { command } => command.handle(cli_config, handle).await,
}
}
}