summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-04-08 15:14:21 +0200
committerFxQnLr <[email protected]>2024-04-08 15:14:21 +0200
commit52851787329c48c1e70f98a3610ad52fe1fa4aa4 (patch)
treeaf1a1adeff7cf3fd8f3f1aba093aacf2a337e78d /src/config.rs
parentd8060da1180545df5d03a76cd2860191ecf87507 (diff)
downloadwebol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.tar
webol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.tar.gz
webol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.zip
Closes #25. Apikey not required anymore
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
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 @@
1use config::File; 1use config::File;
2use serde::Deserialize; 2use serde::Deserialize;
3 3
4use crate::auth;
5
4#[derive(Debug, Clone, Deserialize)] 6#[derive(Debug, Clone, Deserialize)]
5pub struct Config { 7pub 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)]
17pub struct Auth {
18 pub method: auth::Methods,
19 pub secret: String,
12} 20}
13 21
14impl Config { 22impl Config {