use clap::{Parser, Subcommand};
mod login;
mod logout;
use self::login::AuthLoginArgs;
#[derive(Parser, Debug)]
pub struct AuthCli {
#[clap(subcommand)]
commands: AuthCommands,
}
#[derive(Subcommand, Debug)]
#[clap(about = "Authentication and authorization")]
enum AuthCommands {
#[clap(about = "Login to the platform")]
Login(AuthLoginArgs),
#[clap(about = "Logout from the platform")]
Logout,
}
pub fn match_command(input: &AuthCli) {
match &input.commands {
AuthCommands::Login(args) => login::login(args),
AuthCommands::Logout => logout::logout(),
}
}