aboutsummaryrefslogtreecommitdiff
path: root/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/state.rs b/src/state.rs
index 266199b..4c91c6a 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -11,20 +11,22 @@ use std::time::Duration;
use std::{collections::HashMap, net::IpAddr, path::PathBuf};
use std::{process::exit, sync::Arc};
-#[derive(Deserialize)]
+#[derive(Deserialize, Debug)]
pub struct AdInfo {
+ #[serde(default)]
pub image: PathBuf,
pub target: String,
}
-#[derive(Deserialize)]
+#[derive(Deserialize, Debug)]
pub struct Config {
bloom_filter_size: usize,
impression_weight_falloff: f64,
leaderboard_weight_threshold: f64,
- pub image_base: PathBuf,
+ pub ad_dir: PathBuf,
database_path: PathBuf,
pub port: u16,
+ #[serde(default)]
pub ads: HashMap<String, AdInfo>,
}