mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-24 03:05:57 +00:00
notify: don't pass config structs by reference
proxmox_notify's api functions have been changed so that they take ownership of config structs. Signed-off-by: Lukas Wagner <l.wagner@proxmox.com> Tested-by: Max Carrara <m.carrara@proxmox.com> Reviewed-by: Max Carrara <m.carrara@proxmox.com>
This commit is contained in:
parent
627a95bf89
commit
7ac7fa5b00
@ -151,7 +151,7 @@ mod export {
|
|||||||
|
|
||||||
api::sendmail::add_endpoint(
|
api::sendmail::add_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
&SendmailConfig {
|
SendmailConfig {
|
||||||
name,
|
name,
|
||||||
mailto,
|
mailto,
|
||||||
mailto_user,
|
mailto_user,
|
||||||
@ -185,7 +185,7 @@ mod export {
|
|||||||
api::sendmail::update_endpoint(
|
api::sendmail::update_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
name,
|
name,
|
||||||
&SendmailConfigUpdater {
|
SendmailConfigUpdater {
|
||||||
mailto,
|
mailto,
|
||||||
mailto_user,
|
mailto_user,
|
||||||
from_address,
|
from_address,
|
||||||
@ -236,7 +236,7 @@ mod export {
|
|||||||
let mut config = this.config.lock().unwrap();
|
let mut config = this.config.lock().unwrap();
|
||||||
api::gotify::add_endpoint(
|
api::gotify::add_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
&GotifyConfig {
|
GotifyConfig {
|
||||||
name: name.clone(),
|
name: name.clone(),
|
||||||
server,
|
server,
|
||||||
comment,
|
comment,
|
||||||
@ -244,7 +244,7 @@ mod export {
|
|||||||
filter: None,
|
filter: None,
|
||||||
origin: None,
|
origin: None,
|
||||||
},
|
},
|
||||||
&GotifyPrivateConfig { name, token },
|
GotifyPrivateConfig { name, token },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,12 +266,12 @@ mod export {
|
|||||||
api::gotify::update_endpoint(
|
api::gotify::update_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
name,
|
name,
|
||||||
&GotifyConfigUpdater {
|
GotifyConfigUpdater {
|
||||||
server,
|
server,
|
||||||
comment,
|
comment,
|
||||||
disable,
|
disable,
|
||||||
},
|
},
|
||||||
&GotifyPrivateConfigUpdater { token },
|
GotifyPrivateConfigUpdater { token },
|
||||||
delete.as_deref(),
|
delete.as_deref(),
|
||||||
digest.as_deref(),
|
digest.as_deref(),
|
||||||
)
|
)
|
||||||
@ -323,7 +323,7 @@ mod export {
|
|||||||
let mut config = this.config.lock().unwrap();
|
let mut config = this.config.lock().unwrap();
|
||||||
api::smtp::add_endpoint(
|
api::smtp::add_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
&SmtpConfig {
|
SmtpConfig {
|
||||||
name: name.clone(),
|
name: name.clone(),
|
||||||
server,
|
server,
|
||||||
port,
|
port,
|
||||||
@ -337,7 +337,7 @@ mod export {
|
|||||||
disable,
|
disable,
|
||||||
origin: None,
|
origin: None,
|
||||||
},
|
},
|
||||||
&SmtpPrivateConfig { name, password },
|
SmtpPrivateConfig { name, password },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ mod export {
|
|||||||
api::smtp::update_endpoint(
|
api::smtp::update_endpoint(
|
||||||
&mut config,
|
&mut config,
|
||||||
name,
|
name,
|
||||||
&SmtpConfigUpdater {
|
SmtpConfigUpdater {
|
||||||
server,
|
server,
|
||||||
port,
|
port,
|
||||||
mode,
|
mode,
|
||||||
@ -378,7 +378,7 @@ mod export {
|
|||||||
comment,
|
comment,
|
||||||
disable,
|
disable,
|
||||||
},
|
},
|
||||||
&SmtpPrivateConfigUpdater { password },
|
SmtpPrivateConfigUpdater { password },
|
||||||
delete.as_deref(),
|
delete.as_deref(),
|
||||||
digest.as_deref(),
|
digest.as_deref(),
|
||||||
)
|
)
|
||||||
@ -427,7 +427,7 @@ mod export {
|
|||||||
let mut config = this.config.lock().unwrap();
|
let mut config = this.config.lock().unwrap();
|
||||||
api::matcher::add_matcher(
|
api::matcher::add_matcher(
|
||||||
&mut config,
|
&mut config,
|
||||||
&MatcherConfig {
|
MatcherConfig {
|
||||||
name,
|
name,
|
||||||
match_severity,
|
match_severity,
|
||||||
match_field,
|
match_field,
|
||||||
@ -464,7 +464,7 @@ mod export {
|
|||||||
api::matcher::update_matcher(
|
api::matcher::update_matcher(
|
||||||
&mut config,
|
&mut config,
|
||||||
name,
|
name,
|
||||||
&MatcherConfigUpdater {
|
MatcherConfigUpdater {
|
||||||
match_severity,
|
match_severity,
|
||||||
match_field,
|
match_field,
|
||||||
match_calendar,
|
match_calendar,
|
||||||
|
Loading…
Reference in New Issue
Block a user