diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-06-01 18:00:56 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-06-01 18:00:56 +0200 |
commit | 109337b904ce1ca03f2f6e6216edc8c1af359870 (patch) | |
tree | 3d7c8699e608652b8a323111365d973c9a3d2714 /src/test.rs | |
parent | 6682edfc5e13e4b968c95268ee903a0dab538274 (diff) | |
download | aerogramme-109337b904ce1ca03f2f6e6216edc8c1af359870.tar.gz aerogramme-109337b904ce1ca03f2f6e6216edc8c1af359870.zip |
Start bal in mailrage
Diffstat (limited to 'src/test.rs')
-rw-r--r-- | src/test.rs | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/test.rs b/src/test.rs index 4d32a6f..29db928 100644 --- a/src/test.rs +++ b/src/test.rs @@ -1,31 +1,32 @@ -mod config; +mod config; use serde::Serialize; use std::collections::HashMap; fn main() { - let config = config::Config { - s3_endpoint: "http://127.0.0.1:3900".to_string(), - k2v_endpoint: "http://127.0.0.1:3904".to_string(), - aws_region: "garage".to_string(), - login_static: Some(config::LoginStaticConfig { - default_bucket: Some("mailrage".to_string()), - users: HashMap::from([ - ("quentin".to_string(), config::LoginStaticUser { - password: "toto".to_string(), - aws_access_key_id: "GKxxx".to_string(), - aws_secret_access_key: "ffff".to_string(), - bucket: Some("mailrage-quentin".to_string()), - user_secret: "xxx".to_string(), - alternate_user_secrets: vec![], - master_key: None, - secret_key: None, + let config = config::Config { + s3_endpoint: "http://127.0.0.1:3900".to_string(), + k2v_endpoint: "http://127.0.0.1:3904".to_string(), + aws_region: "garage".to_string(), + login_static: Some(config::LoginStaticConfig { + default_bucket: Some("mailrage".to_string()), + users: HashMap::from([( + "quentin".to_string(), + config::LoginStaticUser { + password: "toto".to_string(), + aws_access_key_id: "GKxxx".to_string(), + aws_secret_access_key: "ffff".to_string(), + bucket: Some("mailrage-quentin".to_string()), + user_secret: "xxx".to_string(), + alternate_user_secrets: vec![], + master_key: None, + secret_key: None, + }, + )]), }), - ]), - }), - login_ldap: None, - }; + login_ldap: None, + }; - let ser = toml::to_string(&config).unwrap(); - println!("{}", ser); + let ser = toml::to_string(&config).unwrap(); + println!("{}", ser); } |