Create labadoor-auth, for wrapping storage backends

This commit is contained in:
George Kaklamanos 2023-11-22 18:18:51 +02:00
parent 104d8a862d
commit 5013fdcf1c
No known key found for this signature in database
GPG key ID: C0CAB8A6BDC9399D
7 changed files with 58 additions and 0 deletions

31
labadoor-auth/src/cli.rs Normal file
View 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()
}