| 16 | |
| 17 | #[tokio::main()] |
| 18 | async fn main() { |
| 19 | let logger = Logger::try_with_env_or_str("info") |
| 20 | .unwrap() |
| 21 | .start() |
| 22 | .unwrap(); |
| 23 | |
| 24 | let cli = Cli::parse(); |
| 25 | let config = Config::from(cli.clone()); |
| 26 | |
| 27 | match &cli.command { |
| 28 | Some(Commands::Monitor { command }) => monitor::handle(command, &config, &cli).await, |
| 29 | Some(Commands::Notification { command }) => { |
| 30 | notification::handle(command, &config, &cli).await |
| 31 | } |
| 32 | Some(Commands::Tag { command }) => tag::handle(command, &config, &cli).await, |
| 33 | Some(Commands::Maintenance { command }) => { |
| 34 | maintenance::handle(command, &config, &cli).await |
| 35 | } |
| 36 | Some(Commands::StatusPage { command }) => status_page::handle(command, &config, &cli).await, |
| 37 | Some(Commands::DockerHost { command }) => docker_host::handle(command, &config, &cli).await, |
| 38 | Some(Commands::Database { command }) => database::handle(command, &config, &cli).await, |
| 39 | Some(Commands::Login { command }) => login::handle(command, &config, &cli).await, |
| 40 | None if cli.shadow => kuma_client::build::print_build_in(), |
| 41 | None => {} |
| 42 | }; |
| 43 | |
| 44 | logger.shutdown(); |
| 45 | } |