Skip to main content

dns_update/providers/
mod.rs

1/*
2 * Copyright Stalwart Labs LLC See the COPYING
3 * file at the top-level directory of this distribution.
4 *
5 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 * https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 * <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
8 * option. This file may not be copied, modified, or distributed
9 * except according to those terms.
10 */
11
12use crate::DnsRecord;
13
14pub mod bunny;
15pub mod cloudflare;
16pub mod desec;
17pub mod digitalocean;
18pub mod dnsimple;
19pub mod google_cloud_dns;
20#[cfg(feature = "test_provider")]
21pub mod in_memory;
22pub mod ovh;
23#[cfg(feature = "test_provider")]
24pub mod pebble;
25pub mod porkbun;
26pub mod rfc2136;
27pub mod route53;
28pub mod spaceship;
29
30impl DnsRecord {
31    pub fn priority(&self) -> Option<u16> {
32        match self {
33            DnsRecord::MX(record) => Some(record.priority),
34            DnsRecord::SRV(record) => Some(record.priority),
35            _ => None,
36        }
37    }
38}