]> git.proxmox.com Git - proxmox.git/commit - proxmox-notify/src/endpoints/gotify.rs
notify: add built-in config and 'origin' parameter
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 14 Nov 2023 12:59:23 +0000 (13:59 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 Nov 2023 07:31:36 +0000 (08:31 +0100)
commit9bea76c6b96084317ec04726e18e9e2f423a2666
tree7df8bc533dc945984492032544408d5805d7549b
parent306f4005a14fc3d4e5f74fb4e53234310866ef8a
notify: add built-in config and 'origin' parameter

This allows us to define a (modifiable) builtin-config, which is
at the moment hardcoded in PVEContext

The 'origin' parameter indicates whether a config entry was created by
a user, builtin or a modified builtin.

These changes require context to be set for tests, so we set
PVEContext by default if in a test context. There might be a nicer
solution for that, but for now this should work.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
12 files changed:
proxmox-notify/src/api/gotify.rs
proxmox-notify/src/api/matcher.rs
proxmox-notify/src/api/sendmail.rs
proxmox-notify/src/api/smtp.rs
proxmox-notify/src/context/mod.rs
proxmox-notify/src/context/pbs.rs
proxmox-notify/src/context/pve.rs
proxmox-notify/src/endpoints/gotify.rs
proxmox-notify/src/endpoints/sendmail.rs
proxmox-notify/src/endpoints/smtp.rs
proxmox-notify/src/lib.rs
proxmox-notify/src/matcher.rs