use clap::ValueEnum; use como_auth::AuthClap; #[derive(clap::Parser)] pub struct AppConfig { #[clap(long, env)] pub database_url: String, #[clap(long, env, default_value = "postgres")] pub database_type: DatabaseType, #[clap(long, env)] pub rust_log: String, #[clap(long, env, default_value = "3001")] pub api_port: u32, #[clap(long, env, default_value = "true")] pub run_migrations: bool, #[clap(long, env, default_value = "false")] pub seed: bool, #[clap(long, env)] pub cors_origin: String, #[clap(flatten)] pub auth: AuthClap, } #[derive(Clone, Debug, ValueEnum)] pub enum DatabaseType { Postgres, InMemory, }