caretta_sync_cli/cli/config/
mod.rs1mod check;
2mod list;
3
4pub use check::*;
5pub use list::*;
6
7use caretta_sync_core::utils::runnable::Runnable;
8use clap::{Args, Subcommand};
9
10#[derive(Debug, Args)]
11pub struct ConfigCommandArgs {
12 #[command(subcommand)]
13 pub command: ConfigSubcommand,
14}
15
16impl Runnable for ConfigCommandArgs {
17 fn run(self, app_name: &'static str) {
18 self.command.run(app_name)
19 }
20}
21
22#[derive(Debug, Subcommand)]
23pub enum ConfigSubcommand {
24 Check(ConfigCheckCommandArgs),
25 List(ConfigListCommandArgs),
26}
27
28impl Runnable for ConfigSubcommand {
29 fn run(self, app_name: &'static str) {
30 match self {
31 Self::Check(x) => x.run(app_name),
32 Self::List(x) => x.run(app_name),
33 }
34 }
35}