diff options
author | FxQnLr <[email protected]> | 2024-04-09 22:07:10 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-09 22:07:10 +0200 |
commit | 907e5cb5bc48899b444f7fedd85af7b5974d9a2e (patch) | |
tree | 7206da6c47e6c9e2da0982344c8f76f1385e0ae2 /src/config.rs | |
parent | 8dca7e83519b6c3531653cdedf60b2a14e1035b7 (diff) | |
parent | d91edaf85a1a179a915ac99e7c17b5647d8d9f7d (diff) | |
download | webol-907e5cb5bc48899b444f7fedd85af7b5974d9a2e.tar webol-907e5cb5bc48899b444f7fedd85af7b5974d9a2e.tar.gz webol-907e5cb5bc48899b444f7fedd85af7b5974d9a2e.zip |
Merge pull request #28 from FxQnLr/0.3.4
0.3.4
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index 9605361..9636af4 100644 --- a/src/config.rs +++ b/src/config.rs | |||
@@ -1,14 +1,22 @@ | |||
1 | use config::File; | 1 | use config::File; |
2 | use serde::Deserialize; | 2 | use serde::Deserialize; |
3 | 3 | ||
4 | use crate::auth; | ||
5 | |||
4 | #[derive(Debug, Clone, Deserialize)] | 6 | #[derive(Debug, Clone, Deserialize)] |
5 | pub struct Config { | 7 | pub struct Config { |
6 | pub database_url: String, | 8 | pub database_url: String, |
7 | pub apikey: String, | ||
8 | pub serveraddr: String, | 9 | pub serveraddr: String, |
9 | pub pingtimeout: i64, | 10 | pub pingtimeout: i64, |
10 | pub pingthreshold: i64, | 11 | pub pingthreshold: i64, |
11 | pub timeoffset: i8, | 12 | pub timeoffset: i8, |
13 | pub auth: Auth, | ||
14 | } | ||
15 | |||
16 | #[derive(Debug, Clone, Deserialize)] | ||
17 | pub struct Auth { | ||
18 | pub method: auth::Methods, | ||
19 | pub secret: String, | ||
12 | } | 20 | } |
13 | 21 | ||
14 | impl Config { | 22 | impl Config { |