auths_cli/commands/debug/
mod.rs1use anyhow::Result;
2use clap::{Args, Subcommand};
3
4use crate::commands::cache::CacheCommand;
5use crate::commands::executable::ExecutableCommand;
6use crate::commands::index::IndexCommand;
7use crate::commands::utils::UtilCommand;
8use crate::config::CliConfig;
9
10#[derive(Args, Debug, Clone)]
11pub struct DebugCmd {
12 #[command(subcommand)]
13 pub command: DebugSubcommand,
14}
15
16#[derive(Subcommand, Debug, Clone)]
17pub enum DebugSubcommand {
18 Cache(CacheCommand),
19 Index(IndexCommand),
20 Util(UtilCommand),
21}
22
23impl ExecutableCommand for DebugCmd {
24 fn execute(&self, ctx: &CliConfig) -> Result<()> {
25 match &self.command {
26 DebugSubcommand::Cache(cmd) => cmd.execute(ctx),
27 DebugSubcommand::Index(cmd) => cmd.execute(ctx),
28 DebugSubcommand::Util(cmd) => cmd.execute(ctx),
29 }
30 }
31}