Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Lukas Wagner
On 2024-04-19 10:34, Fiona Ebner wrote: > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> +/// Get a list of all notification targets. >> +pub fn get_targets(config: ) -> Result, HttpError> { >> +let mut targets = Vec::new(); >> + >> +#[cfg(feature = "gotify")] >> +for endpoint in

Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > +#[api] > +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd)] > +#[serde(rename_all = "kebab-case")] > +/// Target information > +pub struct Target { > +/// Name of the endpoint > +name: String, > +/// Origin of the

Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > +/// Get a list of all notification targets. > +pub fn get_targets(config: ) -> Result, HttpError> { > +let mut targets = Vec::new(); > + > +#[cfg(feature = "gotify")] > +for endpoint in gotify::get_endpoints(config)? { > +

[pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-09 Thread Lukas Wagner
This method allows us to get a list of all notification targets. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 75 +++ 1 file changed, 75 insertions(+) diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src/api/mod.rs index