codeberg_cli/actions/auth/mod.rs
1pub mod login;
2pub mod logout;
3
4use clap::Subcommand;
5
6use super::GeneralArgs;
7
8/// Authentication subcommands
9#[derive(Subcommand, Debug)]
10pub enum AuthArgs {
11 Login(login::LoginArgs),
12 Logout(logout::LogoutArgs),
13}
14
15impl AuthArgs {
16 pub async fn run(self, general_args: GeneralArgs) -> anyhow::Result<()> {
17 match self {
18 AuthArgs::Login(args) => args.run(general_args).await,
19 AuthArgs::Logout(args) => args.run(general_args).await,
20 }
21 }
22}