mithril_client_cli/commands/cardano_db_v2/
mod.rsmod list;
mod show;
pub use list::*;
pub use show::*;
use crate::CommandContext;
use clap::Subcommand;
use mithril_client::MithrilResult;
#[derive(Subcommand, Debug, Clone)]
pub enum CardanoDbV2Commands {
#[clap(subcommand)]
Snapshot(CardanoDbV2SnapshotCommands),
}
#[derive(Subcommand, Debug, Clone)]
pub enum CardanoDbV2SnapshotCommands {
#[clap(arg_required_else_help = false)]
List(CardanoDbListCommand),
#[clap(arg_required_else_help = true)]
Show(CardanoDbShowCommand),
}
impl CardanoDbV2Commands {
pub async fn execute(&self, config_builder: CommandContext) -> MithrilResult<()> {
match self {
Self::Snapshot(cmd) => cmd.execute(config_builder).await,
}
}
}
impl CardanoDbV2SnapshotCommands {
pub async fn execute(&self, config_builder: CommandContext) -> MithrilResult<()> {
match self {
Self::List(cmd) => cmd.execute(config_builder).await,
Self::Show(cmd) => cmd.execute(config_builder).await,
}
}
}