Init project
This commit is contained in:
41
src/cli.rs
Normal file
41
src/cli.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Cli {
|
||||
#[arg(short, long, default_value = "config.yaml")]
|
||||
pub config: String,
|
||||
|
||||
#[command(subcommand)]
|
||||
pub command: Commands,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Search for wallets
|
||||
Search {
|
||||
network: Option<String>,
|
||||
|
||||
#[command(subcommand)]
|
||||
command: SearchSubcommand,
|
||||
},
|
||||
/// Manage snapshots
|
||||
Snapshots {
|
||||
network: String,
|
||||
|
||||
#[command(subcommand)]
|
||||
command: SnapshotSubcommand,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum SearchSubcommand {
|
||||
/// Run search process
|
||||
Run,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum SnapshotSubcommand {
|
||||
/// Load snapshot into database
|
||||
Load { path: String },
|
||||
}
|
||||
Reference in New Issue
Block a user