auth: Enable backends based on the configuration or --backends
This commit is contained in:
parent
eebb4ca762
commit
7a294ee146
4 changed files with 39 additions and 18 deletions
|
@ -1,26 +1,27 @@
|
|||
use clap::{Parser, ValueEnum};
|
||||
use serde::Deserialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[derive(Serialize, Parser, Debug)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
pub command: Command,
|
||||
#[arg(short, long, value_enum)]
|
||||
pub backend: Backend,
|
||||
pub backends: Option<Vec<Backend>>,
|
||||
}
|
||||
|
||||
#[derive(Parser, ValueEnum, Clone, Debug)]
|
||||
#[derive(Serialize, Deserialize, Parser, ValueEnum, Clone, Debug)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum Backend {
|
||||
#[cfg(feature = "csv")]
|
||||
CSV,
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[derive(Serialize, Parser, Debug)]
|
||||
pub enum Command {
|
||||
Open(Open),
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[derive(Serialize, Parser, Debug)]
|
||||
pub struct Open {
|
||||
pub method: String,
|
||||
pub identifier: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue