imgurs/src/config/mod.rs

35 lines
718 B
Rust
Raw Normal View History

2022-05-18 18:52:47 +00:00
use serde::Serialize;
2022-01-24 22:15:55 +00:00
use serde_derive::Deserialize;
2022-01-22 21:02:51 +00:00
pub mod toml;
2022-01-24 22:15:55 +00:00
2022-05-18 18:52:47 +00:00
#[derive(Debug, Serialize, Deserialize)]
2022-01-24 22:15:55 +00:00
pub struct Config {
pub imgur: ConfigImgur,
pub notification: ConfigNotification,
pub clipboard: ConfigClipboard,
pub discord_webhook: ConfigDiscordWebhook,
2022-01-24 22:15:55 +00:00
}
2022-05-18 18:52:47 +00:00
#[derive(Debug, Serialize, Deserialize)]
2022-01-24 22:15:55 +00:00
pub struct ConfigImgur {
pub id: String,
pub image_cdn: String,
2022-01-24 22:15:55 +00:00
}
2022-05-18 18:52:47 +00:00
#[derive(Debug, Serialize, Deserialize)]
2022-01-24 22:15:55 +00:00
pub struct ConfigNotification {
pub enabled: bool,
}
2022-05-18 18:52:47 +00:00
#[derive(Debug, Serialize, Deserialize)]
pub struct ConfigClipboard {
pub enabled: bool,
}
2022-05-18 18:52:47 +00:00
#[derive(Debug, Serialize, Deserialize)]
pub struct ConfigDiscordWebhook {
pub enabled: bool,
pub uri: String,
}