fix: add config.rs

should have pushed this before oops
This commit is contained in:
əlemi 2024-01-02 04:55:13 +01:00
parent 3c0ba7e35d
commit 4078963c9e
Signed by: alemi
GPG key ID: A4895B84D311642C

28
src/config.rs Normal file
View file

@ -0,0 +1,28 @@
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Config {
pub overrides: ConfigOverrides,
pub notifiers: Vec<ConfigNotifier>,
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct ConfigOverrides {
pub author: Option<String>,
pub public: Option<bool>,
pub date: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum ConfigNotifier {
ConsoleNotifier,
#[cfg(feature = "telegram")]
TelegramNotifier {
token: String,
chat_id: i64,
},
}