mirror of
https://git.alemi.dev/guestbook.rs.git
synced 2024-11-12 19:39:28 +01:00
fix: add config.rs
should have pushed this before oops
This commit is contained in:
parent
3c0ba7e35d
commit
4078963c9e
1 changed files with 28 additions and 0 deletions
28
src/config.rs
Normal file
28
src/config.rs
Normal 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,
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue