.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
use clap::{Args, Parser, Subcommand};
|
||||
|
||||
#[derive(Args)]
|
||||
pub(crate) struct SearchArgs {
|
||||
#[arg(short, long, value_name = "DOC TYPE")]
|
||||
pub(crate) discriminant: Option<u64>,
|
||||
|
||||
#[arg(value_name = "QUERY")]
|
||||
pub(crate) query: String,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub(crate) enum Command {
|
||||
Search(SearchArgs),
|
||||
Reindex,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
#[clap(version, long_about = None)]
|
||||
pub(crate) struct AppArgs {
|
||||
#[command(subcommand)]
|
||||
pub(crate) command: Option<Command>,
|
||||
}
|
||||
Reference in New Issue
Block a user