pub trait DnsProvider: Send + Sync {
// Required methods
fn backend(&self) -> &'static str;
fn publish_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn publish_wildcard_a<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv4Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn publish_wildcard_aaaa<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv6Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The interface a deployment’s DNS management layer implements.
Implementations live outside this crate (metal repo / product layer).
UnconfiguredDnsProvider is the in-crate fail-closed default used when a
deployment has not wired one up: every operation returns
DnsError::Unconfigured, so the ACME DNS-01 issuance path fails loudly
rather than silently no-op’ing or inventing records.
Required Methods§
Sourcefn backend(&self) -> &'static str
fn backend(&self) -> &'static str
Human-readable backend identifier (e.g. "unconfigured", "powerdns",
"route53"). Used in logs and the expiry alarm.
Sourcefn publish_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn publish_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Publish a TXT record at owner (a fully-qualified name, no trailing
dot) with value for the ACME DNS-01 challenge. ttl is a hint in
seconds; backends may clamp. The record must be retrievable by public
resolvers within ~minutes.
Implementations MUST reject owner values outside zone (the delegated
account zone) with DnsError::OutOfZone.
Sourcefn delete_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_txt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
owner: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Delete the TXT record previously published by Self::publish_txt.
Must be idempotent (deleting a record that is already gone is success).
Sourcefn publish_wildcard_a<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv4Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn publish_wildcard_a<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv4Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Publish the wildcard A record (*.<apex>) for the delegated zone. The
record covers exactly one label — alice.<apex> resolves, but
a.b.<apex> does not.
Sourcefn publish_wildcard_aaaa<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv6Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn publish_wildcard_aaaa<'life0, 'life1, 'async_trait>(
&'life0 self,
zone: &'life1 AccountZone,
target: Ipv6Addr,
ttl: u32,
) -> Pin<Box<dyn Future<Output = Result<(), DnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Publish the wildcard AAAA record (*.<apex>) for the delegated zone.