use crate::app::Enableable; use serde::{Deserialize, Serialize}; /// Configuration for the ntfy notification service #[derive(Debug, Clone, Serialize, Deserialize)] pub struct NtfyConfig { /// Whether to enable the ntfy notification service #[serde(default)] pub enable: bool, /// The host URL of the ntfy server pub host: String, /// The username for authentication (optional) #[serde(default)] pub username: Option, /// The password for authentication (optional) #[serde(default)] pub password: Option, /// The topic to publish notifications to pub topic: String, } impl Enableable for NtfyConfig { fn is_enabled(&self) -> bool { self.enable } }