Create labadoor-auth
, for wrapping storage backends
This commit is contained in:
parent
104d8a862d
commit
5013fdcf1c
7 changed files with 58 additions and 0 deletions
31
labadoor-auth/src/cli.rs
Normal file
31
labadoor-auth/src/cli.rs
Normal file
|
@ -0,0 +1,31 @@
|
|||
use clap::{Parser, ValueEnum};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
pub command: Command,
|
||||
#[arg(short, long, value_enum)]
|
||||
pub backend: Backend,
|
||||
}
|
||||
|
||||
#[derive(Parser, ValueEnum, Clone, Debug)]
|
||||
pub enum Backend {
|
||||
#[cfg(feature = "csv")]
|
||||
CSV,
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub enum Command {
|
||||
Open(Open),
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct Open {
|
||||
pub method: String,
|
||||
pub identifier: String,
|
||||
pub resource: i8,
|
||||
}
|
||||
|
||||
pub fn parse() -> Cli {
|
||||
Cli::parse()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue