implement storage + improve code

This commit is contained in:
csehviktor
2025-07-06 02:28:29 +02:00
parent d2a82e973b
commit bf9d1e4da6
14 changed files with 357 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
use rumqttd::Config;
use serde::Deserialize;
use rumqttd::Config;
const CONFIG_PATH: &str = if cfg!(debug_assertions) {
"server/config.toml"
@@ -7,8 +7,15 @@ const CONFIG_PATH: &str = if cfg!(debug_assertions) {
"config.toml"
};
#[derive(Debug, Deserialize)]
pub struct StorageConfig {
pub sqlite: bool,
pub db_path: String,
}
#[derive(Debug, Deserialize)]
pub struct Configuration {
pub storage: StorageConfig,
pub mqtt: Config,
}