Pre-release v0.2.0
This commit is contained in:
13
src/cli.rs
13
src/cli.rs
@@ -1,10 +1,11 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
use crate::blockchains::Blockchain;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Cli {
|
||||
#[arg(short, long, default_value = "config.yaml")]
|
||||
pub config: String,
|
||||
#[arg(short, long, default_value = "settings.yaml")]
|
||||
pub settings: String,
|
||||
|
||||
#[command(subcommand)]
|
||||
pub command: Commands,
|
||||
@@ -12,16 +13,14 @@ pub struct Cli {
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Search for wallets
|
||||
Search {
|
||||
network: Option<String>,
|
||||
blockchain: Option<Blockchain>,
|
||||
|
||||
#[command(subcommand)]
|
||||
command: SearchSubcommand,
|
||||
},
|
||||
/// Manage snapshots
|
||||
Snapshots {
|
||||
network: String,
|
||||
blockchain: Blockchain,
|
||||
|
||||
#[command(subcommand)]
|
||||
command: SnapshotSubcommand,
|
||||
@@ -30,12 +29,10 @@ pub enum Commands {
|
||||
|
||||
#[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