proxmox-serde.workspace = true
proxmox-sys = { workspace = true, optional = true }
proxmox-time.workspace = true
+proxmox-uuid = { workspace = true, features = ["serde"] }
[features]
default = ["sendmail", "gotify", "smtp"]
use proxmox_schema::api;
use proxmox_section_config::SectionConfigData;
+use proxmox_uuid::Uuid;
pub mod matcher;
use crate::config::CONFIG;
content: Content,
/// Metadata
metadata: Metadata,
+ /// Unique ID
+ id: Uuid,
}
impl Notification {
template_name: template_name.as_ref().to_string(),
data: template_data,
},
+ id: Uuid::generate(),
}
}
#[cfg(feature = "mail-forwarder")]
additional_fields,
timestamp: proxmox_time::epoch_i64(),
},
+ id: Uuid::generate(),
})
}
+
+ /// Return the unique ID of this notification.
+ pub fn id(&self) -> &Uuid {
+ &self.id
+ }
}
/// Notification configuration
template_name: "test".to_string(),
data: json!({ "target": target }),
},
+ id: Uuid::generate(),
};
if let Some(endpoint) = self.endpoints.get(target) {