[][src]Struct trust_dns_server::config::ZoneConfig

pub struct ZoneConfig {
    pub zone: String,
    pub zone_type: ZoneType,
    pub file: Option<String>,
    pub allow_update: Option<bool>,
    pub allow_axfr: Option<bool>,
    pub enable_dnssec: Option<bool>,
    pub keys: Vec<KeyConfig>,
    pub stores: Option<StoreConfig>,
}

Configuration for a zone

Fields

zone: String

name of the zone

zone_type: ZoneType

type of the zone

file: Option<String>

location of the file (short for StoreConfig::FileConfig{zone_file_path})

allow_update: Option<bool>

Deprecated allow_update, this is a Store option

allow_axfr: Option<bool>

Allow AXFR (TODO: need auth)

enable_dnssec: Option<bool>

Enable DnsSec TODO: should this move to StoreConfig?

keys: Vec<KeyConfig>

Keys for use by the zone

stores: Option<StoreConfig>

Store configurations, TODO: allow chained Stores

Methods

impl ZoneConfig[src]

pub fn new(
    zone: String,
    zone_type: ZoneType,
    file: String,
    allow_update: Option<bool>,
    allow_axfr: Option<bool>,
    enable_dnssec: Option<bool>,
    keys: Vec<KeyConfig>
) -> Self
[src]

Return a new zone configuration

Arguments

  • zone - name of a zone, e.g. example.com
  • zone_type - Type of zone, e.g. Master
  • file - relative to Config base path, to the zone file
  • allow_update - enable dynamic updates
  • allow_axfr - enable AXFR transfers
  • enable_dnssec - enable signing of the zone for DNSSec
  • keys - list of private and public keys used to sign a zone

pub fn get_zone(&self) -> ProtoResult<Name>[src]

retuns the name of the Zone, i.e. the example.com of www.example.com.

pub fn get_zone_type(&self) -> ZoneType[src]

the type of the zone

pub fn get_file(&self) -> PathBuf[src]

path to the zone file, i.e. the base set of original records in the zone

this is ony used on first load, if dynamic update is enabled for the zone, then the journal file is the actual source of truth for the zone.

pub fn is_update_allowed(&self) -> bool[src]

enable dynamic updates for the zone (see SIG0 and the registered keys)

pub fn is_axfr_allowed(&self) -> bool[src]

enable AXFR transfers

pub fn is_dnssec_enabled(&self) -> bool[src]

declare that this zone should be signed, see keys for configuration of the keys for signing

pub fn get_keys(&self) -> &[KeyConfig][src]

the configuration for the keys used for auth and/or dnssec zone signing.

Trait Implementations

impl PartialEq<ZoneConfig> for ZoneConfig[src]

impl Debug for ZoneConfig[src]

impl<'de> Deserialize<'de> for ZoneConfig[src]

Auto Trait Implementations

impl Send for ZoneConfig

impl Sync for ZoneConfig

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T