diff options
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 { |