smbcloud_cli/cli/
mod.rs

1use crate::{account, project};
2use clap::{Parser, Subcommand};
3use spinners::Spinner;
4
5pub struct CommandResult {
6    pub spinner: Spinner,
7    pub symbol: String,
8    pub msg: String,
9}
10
11#[derive(Parser)]
12#[clap(author, version, about)]
13pub struct Cli {
14    /// Log level: trace, debug, info, warn, error, off
15    #[clap(short, long, global = true)]
16    pub log_level: Option<String>,
17
18    #[clap(subcommand)]
19    pub command: Commands,
20}
21
22#[derive(Subcommand)]
23pub enum Commands {
24    #[clap(about = "Manage your account.")]
25    Account {
26        #[clap(subcommand)]
27        command: account::cli::Commands,
28    },
29
30    #[clap(about = "Manage your projects. Add, delete, edit. Need authentication.")]
31    Project {
32        #[clap(subcommand)]
33        command: project::cli::Commands,
34    },
35    /*
36    #[clap(about = "Manage your Oten authentication app. Add, delete, edit. Need authentication.")]
37    Oten {
38        #[clap(subcommand)]
39        command: app_oten::cli::Commands,
40    },
41     */
42    // Function
43    /*
44    FunApp {
45        #[clap(subcommand)]
46        command: fun_app::cli::Commands,
47    }, */
48    // Package
49    /*
50    PktApp {
51        #[clap(subcommand)]
52        command: pkt_app::cli::Commands,
53    }, */
54    // Relational database
55    /*
56    RdbApp {
57        #[clap(subcommand)]
58        command: rdb_app::cli::Commands,
59    }, */
60}