From 2e3442faa9625f706b4131417381d8fd2fb3bda3 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 11 Dec 2022 16:42:00 +0100 Subject: Fix subdomain matching --- src/provider/mod.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/provider/mod.rs') diff --git a/src/provider/mod.rs b/src/provider/mod.rs index 6527631..1ef6b0f 100644 --- a/src/provider/mod.rs +++ b/src/provider/mod.rs @@ -8,9 +8,20 @@ use async_trait::async_trait; #[async_trait] pub trait DnsProvider: Send + Sync { fn provider(&self) -> &'static str; - async fn update_a(&self, domain: &str, subdomain: &str, targets: &[Ipv4Addr]) -> Result<()>; - async fn update_aaaa(&self, domain: &str, subdomain: &str, targets: &[Ipv6Addr]) -> Result<()>; - async fn update_cname(&self, domain: &str, subdomain: &str, target: &str) -> Result<()>; + async fn update_a( + &self, + domain: &str, + subdomain: Option<&str>, + targets: &[Ipv4Addr], + ) -> Result<()>; + async fn update_aaaa( + &self, + domain: &str, + subdomain: Option<&str>, + targets: &[Ipv6Addr], + ) -> Result<()>; + async fn update_cname(&self, domain: &str, subdomain: Option<&str>, target: &str) + -> Result<()>; } impl std::fmt::Debug for dyn DnsProvider { -- cgit v1.2.3