[−][src]Struct trust_dns_server::config::ZoneConfig
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]
zone: String,
zone_type: ZoneType,
file: String,
allow_update: Option<bool>,
allow_axfr: Option<bool>,
enable_dnssec: Option<bool>,
keys: Vec<KeyConfig>
) -> Self
Return a new zone configuration
Arguments
zone
- name of a zone, e.g. example.comzone_type
- Type of zone, e.g. Masterfile
- relative to Config base path, to the zone fileallow_update
- enable dynamic updatesallow_axfr
- enable AXFR transfersenable_dnssec
- enable signing of the zone for DNSSeckeys
- 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]
fn eq(&self, other: &ZoneConfig) -> bool
[src]
fn ne(&self, other: &ZoneConfig) -> bool
[src]
impl Debug for ZoneConfig
[src]
impl<'de> Deserialize<'de> for ZoneConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,