hermes_cli/commands/client/
mod.rs

1use hermes_cli_components::traits::command::CanRunCommand;
2use hermes_cli_framework::command::CommandRunner;
3use hermes_cli_framework::output::Output;
4
5use crate::commands::client::create::CreateClientArgs;
6use crate::contexts::app::HermesApp;
7use crate::Result;
8
9pub mod create;
10
11mod update;
12pub use update::ClientUpdate;
13
14#[derive(Debug, clap::Subcommand)]
15pub enum ClientCommands {
16    /// Create a new client
17    Create(CreateClientArgs),
18
19    /// Update a client
20    Update(ClientUpdate),
21}
22
23impl CommandRunner<HermesApp> for ClientCommands {
24    async fn run(&self, app: &HermesApp) -> Result<Output> {
25        match self {
26            Self::Create(cmd) => app.run_command(cmd).await,
27            Self::Update(cmd) => cmd.run(app).await,
28        }
29    }
30}