diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-24 11:44:42 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-24 11:44:42 +0100 |
commit | e2581c0dfb95a3fca86bb4801f425ed519257ff9 (patch) | |
tree | b3acd9b97ffc44c6fbf220d66fd6828aac96af3e /src/config.rs | |
parent | 0722886efbeef3713bd7a671d2c09c8af2bdb6bd (diff) | |
download | aerogramme-e2581c0dfb95a3fca86bb4801f425ed519257ff9.tar.gz aerogramme-e2581c0dfb95a3fca86bb4801f425ed519257ff9.zip |
reworked configuration file
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 34940f2..cacc5c8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -18,6 +18,7 @@ pub struct Config { pub type LoginStaticConfig = HashMap<String, LoginStaticUser>; #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(tag = "storage_driver")] pub enum StaticStorage { Garage(StaticGarageConfig), InMemory, @@ -47,10 +48,12 @@ pub struct LoginStaticUser { pub master_key: Option<String>, pub secret_key: Option<String>, + #[serde(flatten)] pub storage: StaticStorage, } #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(tag = "storage_driver")] pub enum LdapStorage { Garage(LdapGarageConfig), InMemory, @@ -86,6 +89,7 @@ pub struct LoginLdapConfig { pub alternate_user_secrets_attr: Option<String>, // Storage related thing + #[serde(flatten)] pub storage: LdapStorage, } |