added an more concrete type to the dns args
Dieser Commit ist enthalten in:
Ursprung
64a2c7aa13
Commit
dd026c901f
2 geänderte Dateien mit 7 neuen und 4 gelöschten Zeilen
|
@ -15,6 +15,7 @@ use crate::{
|
|||
load_privkey,
|
||||
macros::match_error,
|
||||
types::{
|
||||
config::Dns,
|
||||
cryptography::Algorithm,
|
||||
structs::{
|
||||
ProcessorArgs,
|
||||
|
@ -215,7 +216,7 @@ pub async fn process_site(args: ProcessorArgs<'_>) {
|
|||
}
|
||||
}
|
||||
|
||||
pub async fn process_auth(auth: Authorization, challenge_dir: Option<PathBuf>, dnsserver: Option<()>) {
|
||||
pub async fn process_auth(auth: Authorization, challenge_dir: Option<PathBuf>, dnsserver: Option<Dns>) {
|
||||
if let Some(_dnschallenge) = auth.get_challenge("dns-01") {
|
||||
if let Some(_dnsserver) = dnsserver {
|
||||
} else {
|
||||
|
|
|
@ -26,6 +26,8 @@ use crate::{
|
|||
},
|
||||
};
|
||||
|
||||
use super::config::Dns;
|
||||
|
||||
|
||||
#[macro_rules_derive(DefDer)]
|
||||
#[derive(Parser)]
|
||||
|
@ -42,7 +44,7 @@ pub struct ProcessorArgs<'a> {
|
|||
certificate_dir: PathBuf,
|
||||
refresh_time: u32,
|
||||
challenge_dir: Option<PathBuf>,
|
||||
dnsserver: Option<()>,
|
||||
dnsserver: Option<Dns>,
|
||||
}
|
||||
|
||||
impl<'a: 'b, 'b> ProcessorArgs<'a> {
|
||||
|
@ -68,7 +70,7 @@ impl<'a: 'b, 'b> ProcessorArgs<'a> {
|
|||
|
||||
attr_function!(pub challenge_dir => Option<PathBuf>);
|
||||
|
||||
attr_function!(pub dnsserver => Option<()>);
|
||||
attr_function!(pub dnsserver => Option<Dns>);
|
||||
|
||||
pub fn new(
|
||||
site: SiteConfig,
|
||||
|
@ -77,7 +79,7 @@ impl<'a: 'b, 'b> ProcessorArgs<'a> {
|
|||
restart_services: &'a SafeSet<String>,
|
||||
certificate_dir: PathBuf,
|
||||
http_challenge_dir: Option<PathBuf>,
|
||||
dnsserver: Option<()>,
|
||||
dnsserver: Option<Dns>,
|
||||
) -> Self {
|
||||
ProcessorArgs {
|
||||
site,
|
||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren