[−][src]Struct dns_online::Domain
A DNS domain. For API design reasons, we also store the API key inside the domain.
Fields
api_key: &'a str
id: usize
name: String
dnssec: bool
external: bool
Methods
impl<'a> Domain<'a>
[src]
pub fn find_and_extract_path(
full_domain_name: &'a str,
domains: Vec<Domain<'a>>
) -> Option<(Self, &'a str)>
[src]
full_domain_name: &'a str,
domains: Vec<Domain<'a>>
) -> Option<(Self, &'a str)>
Try to extract the longest matching domain from the list of our available domains and the internal part of the name. e.g. extract_domain("this.is.a.dummy.test.fr.", {Domain("test.fr"), Domain("nope.fr")}) should return the domain associated with "test.fr". and the internal path, aka "this.is.a.dummy."
pub fn filter_records(
&self,
zone: &Version,
entry_name: &str,
entry_value: Option<&str>
) -> Result<Option<Vec<Record>>, Error>
[src]
&self,
zone: &Version,
entry_name: &str,
entry_value: Option<&str>
) -> Result<Option<Vec<Record>>, Error>
Extract all records with a name of "entry_name" and with a value of "entry_value" (or any value if entry_value is None) from the zone 'zone'.
pub fn add_record(
&self,
destination: &Version,
record: &Record
) -> Result<Record, Error>
[src]
&self,
destination: &Version,
record: &Record
) -> Result<Record, Error>
Append a new entry 'record' to the zone 'destination'. The target zone MUST be inactive.
pub fn copy_records(
&self,
source: Vec<Record>,
destination: &Version
) -> Result<Vec<Record>, Error>
[src]
&self,
source: Vec<Record>,
destination: &Version
) -> Result<Vec<Record>, Error>
Copy all the records from 'source' to the zone 'destination' and return the updated zone records. This will not erase the current entries but append next to the them.
pub fn set_zone_entries(
&self,
destination: &Version,
records: &[Record]
) -> Result<(), Error>
[src]
&self,
destination: &Version,
records: &[Record]
) -> Result<(), Error>
Populate the zone "destination" with 'records'. Note this will destroy any prior entry in that zone. Internally this calls the endpoint /domain/{domain_name}/version/{version_id}/zone_from_bind
pub fn add_version(&self, name: &str) -> Result<Version, Error>
[src]
Create a new (disabled at the moment) zone.
pub fn enable_version(&self, v: &Version) -> Result<(), Error>
[src]
Enable a specific zone as the current one for the domain.
pub fn delete_version(&self, v: &Version) -> Result<(), Error>
[src]
Delete an old zone. As a result, deleting the current zone will fail.
pub fn get_version(&self, uuid: &str) -> Result<Version, Error>
[src]
Return the version of a given uuid
pub fn get_versions(&self) -> Result<Vec<Version>, Error>
[src]
Return the list of all available zones.
pub fn get_current_zone(&self) -> Result<Version, Error>
[src]
Retrieve the Version describing the currently enable zone
pub fn get_zone_records(&self, zone: &Version) -> Result<Vec<Record>, Error>
[src]
Return the list of all the records in the zone 'zone'.
pub fn delete_record(
&self,
zone: &Version,
record: &Record
) -> Result<(), Error>
[src]
&self,
zone: &Version,
record: &Record
) -> Result<(), Error>
Delete a record in 'zone' matching 'record'
Trait Implementations
impl<'a> Clone for Domain<'a>
[src]
fn clone(&self) -> Domain<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for Domain<'a>
[src]
impl<'de, 'a> Deserialize<'de> for Domain<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Send for Domain<'a>
impl<'a> Unpin for Domain<'a>
impl<'a> Sync for Domain<'a>
impl<'a> UnwindSafe for Domain<'a>
impl<'a> RefUnwindSafe for Domain<'a>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
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>,