tag2upload_service_manager/
cli_decl.rs1use crate::prelude::*;
6
7#[derive(Debug)]
8pub struct WholeConfig {
9 pub cli_options: CliOptions,
10 pub config: Config,
11 pub computed_config: ComputedConfig,
12 pub rocket_config: figment::Figment,
13}
14
15#[derive(Debug, clap::Parser)]
16#[command(after_help = format!(
17r#"tag2upload-service-manager ({})
18Copyright Ian Jackson, Sean Whitton and contributors to tag2upload.
19This is Free Software with NO WARRANTY. GPL-3.0-or-later.
20"#, crate::version::raw_info()))]
21pub struct CliOptions {
22 #[arg(short, long)]
23 pub config: Vec<String>,
24
25 #[arg(short = 'C', long)]
26 pub config_toml: Vec<String>,
27
28 #[command(subcommand)]
29 pub op: CliOperation,
30}
31
32#[derive(Debug, Clone, clap::Subcommand)]
33pub enum CliOperation {
34 RunManager {},
35 CheckConfig {},
36 CheckConfigSyntax {},
37 PreInstallCheck {},
38 PrintDatabaseSchema {},
39 PrintDatabaseSchemaVersion {},
40 BsqlCheckCoverage {},
43 BsqlPrintQueryPlans {},
44 BsqlPrintSourceLocs {},
45
46 SchemaMigrationAdhoc {
51 #[arg(long)]
52 commit: bool,
53 db_file: String,
54 from_version: db_support::SchemaVersion,
55 to_version: db_support::SchemaVersion,
56 temp_dir: String,
58 },
59}