wasmer_cli/commands/auth/
mod.rs

1mod login;
2mod logout;
3mod whoami;
4
5pub use login::*;
6pub use whoami::*;
7
8use super::AsyncCliCommand;
9
10/// Manage authentication in Wasmer
11#[derive(clap::Subcommand, Debug)]
12pub enum CmdAuth {
13    Login(login::Login),
14    Logout(logout::Logout),
15    Whoami(whoami::Whoami),
16}
17
18#[async_trait::async_trait]
19impl AsyncCliCommand for CmdAuth {
20    type Output = ();
21
22    async fn run_async(self) -> Result<Self::Output, anyhow::Error> {
23        match self {
24            CmdAuth::Login(l) => l.run_async().await,
25            CmdAuth::Logout(l) => l.run_async().await,
26            CmdAuth::Whoami(w) => w.run_async().await,
27        }
28    }
29}