diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-11 16:42:00 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-11 16:42:00 +0100 |
commit | 2e3442faa9625f706b4131417381d8fd2fb3bda3 (patch) | |
tree | 7a757c029c0dd00005c7e0eb59fb46df55fc3aa1 /src/provider/mod.rs | |
parent | b26d4d7bbad7c77f466a00f0bd21e7e4ea09c3b1 (diff) | |
download | D53-2e3442faa9625f706b4131417381d8fd2fb3bda3.tar.gz D53-2e3442faa9625f706b4131417381d8fd2fb3bda3.zip |
Fix subdomain matching
Diffstat (limited to 'src/provider/mod.rs')
-rw-r--r-- | src/provider/mod.rs | 17 |
1 files changed, 14 insertions, 3 deletions
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 { |