Skip to main content

codeberg_cli/actions/keys/
mod.rs

1mod gpg;
2mod ssh;
3
4use clap::Subcommand;
5
6use super::GlobalArgs;
7
8/// Key management subcommands
9#[derive(Subcommand, Debug)]
10pub enum KeysArgs {
11    #[clap(subcommand)]
12    Gpg(gpg::GpgArgs),
13    #[clap(subcommand)]
14    Ssh(ssh::SshArgs),
15}
16
17impl KeysArgs {
18    pub async fn run(self, global_args: GlobalArgs) -> miette::Result<()> {
19        match self {
20            KeysArgs::Gpg(args) => args.run(global_args).await,
21            KeysArgs::Ssh(args) => args.run(global_args).await,
22        }
23    }
24}