From 1b4cf39c69ef7a1d9dade1d656d06ce56e32986a Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangi Date: Tue, 27 Jul 2021 03:27:18 +0800 Subject: [PATCH] fixed comments for rustdoc --- epp-client-macros/src/lib.rs | 6 +- epp-client/src/connection/client.rs | 8 +-- epp-client/src/epp/object.rs | 8 +-- epp-client/src/epp/object/data.rs | 66 +++++++++---------- epp-client/src/epp/request.rs | 8 +-- epp-client/src/epp/request/contact/check.rs | 12 ++-- epp-client/src/epp/request/contact/create.rs | 24 +++---- epp-client/src/epp/request/contact/delete.rs | 12 ++-- epp-client/src/epp/request/contact/info.rs | 12 ++-- epp-client/src/epp/request/contact/update.rs | 24 +++---- epp-client/src/epp/request/domain/check.rs | 8 +-- epp-client/src/epp/request/domain/create.rs | 24 +++---- epp-client/src/epp/request/domain/delete.rs | 10 +-- epp-client/src/epp/request/domain/info.rs | 12 ++-- epp-client/src/epp/request/domain/renew.rs | 10 +-- epp-client/src/epp/request/domain/transfer.rs | 26 ++++---- epp-client/src/epp/request/domain/update.rs | 38 +++++------ epp-client/src/epp/request/host/check.rs | 8 +-- epp-client/src/epp/request/host/create.rs | 8 +-- epp-client/src/epp/request/host/delete.rs | 8 +-- epp-client/src/epp/request/host/info.rs | 8 +-- epp-client/src/epp/request/host/update.rs | 20 +++--- epp-client/src/epp/request/message/ack.rs | 6 +- epp-client/src/epp/request/message/poll.rs | 6 +- epp-client/src/epp/response.rs | 10 +-- epp-client/src/epp/response/contact/check.rs | 20 +++--- epp-client/src/epp/response/contact/create.rs | 8 +-- epp-client/src/epp/response/contact/delete.rs | 2 +- epp-client/src/epp/response/contact/info.rs | 8 +-- epp-client/src/epp/response/contact/update.rs | 2 +- epp-client/src/epp/response/domain/check.rs | 16 ++--- epp-client/src/epp/response/domain/create.rs | 8 +-- epp-client/src/epp/response/domain/delete.rs | 2 +- epp-client/src/epp/response/domain/info.rs | 12 ++-- epp-client/src/epp/response/domain/renew.rs | 8 +-- .../src/epp/response/domain/transfer.rs | 16 ++--- epp-client/src/epp/response/domain/update.rs | 2 +- epp-client/src/epp/response/host/check.rs | 16 ++--- epp-client/src/epp/response/host/create.rs | 8 +-- epp-client/src/epp/response/host/delete.rs | 2 +- epp-client/src/epp/response/host/info.rs | 8 +-- epp-client/src/epp/response/host/update.rs | 2 +- epp-client/src/epp/response/message/ack.rs | 2 +- epp-client/src/epp/response/message/poll.rs | 8 +-- epp-client/src/lib.rs | 48 ++++++++------ 45 files changed, 295 insertions(+), 285 deletions(-) diff --git a/epp-client-macros/src/lib.rs b/epp-client-macros/src/lib.rs index aab8768..83eca6c 100644 --- a/epp-client-macros/src/lib.rs +++ b/epp-client-macros/src/lib.rs @@ -1,9 +1,9 @@ -//! Macros for the EPP Client Library for the Extensible Provisioning Protocol (EPP). +//! # Macros for the epp-client Library. //! //! ## Description //! -//! epp-client is a client library for Internet domain registration and management for domain registrars. -//! This macro crate contains a fe macros to simplify serialization of generic types used in some places +//! `epp-client` is a client library for Internet domain registration and management for domain registrars. +//! This macro crate contains a few macros to simplify serialization of generic types used in some places //! in the `epp-client` library //! diff --git a/epp-client/src/connection/client.rs b/epp-client/src/connection/client.rs index 1b1263c..b1cc53d 100644 --- a/epp-client/src/connection/client.rs +++ b/epp-client/src/connection/client.rs @@ -79,7 +79,7 @@ async fn connect(registry: &'static str) -> Result> { Ok(client) } -/// Instances of the EppClient type are used to transact with the registry +/// Instances of the EppClient type are used to transact with the registry. /// Once initialized, the EppClient instance can serialize EPP requests to XML and send them /// to the registry and deserialize the XML responses from the registry to local types pub struct EppClient { @@ -133,7 +133,7 @@ impl EppClient { Ok(client) } - /// Executes an EPP Hello call and return the response as an `EppGreeting` + /// Executes an EPP Hello call and returns the response as an `EppGreeting` pub async fn hello(&mut self) -> Result> { let hello = EppHello::new(); let hello_xml = hello.serialize()?; @@ -162,7 +162,7 @@ impl EppClient { } /// Accepts raw EPP XML and returns the raw EPP XML response to it. - /// Not recommended to use directly but sometimes can be useful for debugging + /// Not recommended for direct use but sometimes can be useful for debugging pub async fn transact_xml(&mut self, xml: &str) -> Result> { self.connection.transact(&xml).await } @@ -172,7 +172,7 @@ impl EppClient { return String::from(&self.connection.greeting) } - /// Returns the greeting received on establishment of the connection as an `EppGreeting` instance + /// Returns the greeting received on establishment of the connection as an `EppGreeting` pub fn greeting(&self) -> Result { EppGreeting::deserialize(&self.connection.greeting) } diff --git a/epp-client/src/epp/object.rs b/epp-client/src/epp/object.rs index 87ee3ab..a1ebbe1 100644 --- a/epp-client/src/epp/object.rs +++ b/epp-client/src/epp/object.rs @@ -51,12 +51,12 @@ pub trait ElementName { #[derive(Deserialize, Debug, PartialEq)] #[serde(rename = "epp")] pub struct EppObject { - /// XML namespace for the tag + /// XML namespace for the <epp> tag pub xmlns: String, - /// Schema namespace for the tag + /// Schema namespace for the <epp> tag #[serde(rename = "xmlns:xsi")] pub xmlns_xsi: String, - /// Schema location attribute for + /// Schema location attribute for <epp> #[serde(rename = "xsi:schemaLocation")] pub xsi_schema_location: String, /// the request or response object that is set or received in the EPP XML document @@ -123,7 +123,7 @@ pub struct Services { } impl EppObject { - /// Create the enclosing EPP XML tag for data that represents an EPP XML request or response + /// Create the enclosing EPP XML tag <epp> for data that represents an EPP XML request or response pub fn build(data: T) -> EppObject { EppObject { // xml: None, diff --git a/epp-client/src/epp/object/data.rs b/epp-client/src/epp/object/data.rs index e3b6003..edffbed 100644 --- a/epp-client/src/epp/object/data.rs +++ b/epp-client/src/epp/object/data.rs @@ -3,12 +3,12 @@ use crate::epp::object::{StringValue, StringValueTrait}; use serde::{Deserialize, Serialize}; -/// The attribute on EPP XML for domain transactions +/// The <status> attribute on EPP XML for domain transactions pub type DomainStatus = ContactStatus; -/// The attribute on EPP XML for host transactions +/// The <status> attribute on EPP XML for host transactions pub type HostStatus = ContactStatus; -/// The types domain or host transactions +/// The <hostAddr> types domain or host transactions #[derive(Serialize, Deserialize, Debug)] pub struct HostAddr { #[serde(rename = "ip")] @@ -43,44 +43,44 @@ impl HostAddr { } } -/// The type for host transactions +/// The <host> type for host transactions #[derive(Serialize, Deserialize, Debug)] pub struct Host { - /// The tag + /// The <hostName> tag pub name: StringValue, - /// The tags + /// The <hostAddr> tags #[serde(rename = "addr")] pub addresses: Option>, } -/// The type for domain transactions +/// The <hostAttr> type for domain transactions #[derive(Serialize, Deserialize, Debug)] pub struct HostAttr { - /// The tag + /// The <hostName> tag #[serde(rename = "hostName")] pub name: StringValue, - /// The tags + /// The <hostAddr> tags #[serde(rename = "hostAddr")] pub addresses: Option>, } -/// The list of types for domain transactions. Typically under an tag +/// The list of <hostAttr> types for domain transactions. Typically under an <ns> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostAttrList { - /// The list of tags + /// The list of <hostAttr> tags #[serde(rename = "hostAttr")] pub hosts: Vec, } -/// The list of types for domain transactions. Typically under an tag +/// The list of <hostObj> types for domain transactions. Typically under an <ns> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostObjList { - /// The list of tags + /// The list of <hostObj> tags #[serde(rename = "hostObj")] pub hosts: Vec, } -/// The type on domain creation and update requests +/// The <contact> type on domain creation and update requests #[derive(Serialize, Deserialize, Debug)] pub struct DomainContact { /// The contact id @@ -91,7 +91,7 @@ pub struct DomainContact { pub contact_type: String, } -/// The type for registration, renewal or transfer on domain transactions +/// The <period> type for registration, renewal or transfer on domain transactions #[derive(Serialize, Deserialize, Debug)] pub struct Period { /// The interval (usually 'y' indicating years) @@ -116,63 +116,63 @@ impl Period { } } -/// The type on contact transactions +/// The <status> type on contact transactions #[derive(Serialize, Deserialize, Debug)] pub struct ContactStatus { - /// The status name, represented by the 's' attr on tags + /// The status name, represented by the 's' attr on <status> tags #[serde(rename = "s")] pub status: String, } -/// The data for and types on domain transactions +/// The data for <voice> and <fax> types on domain transactions #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Phone { - /// The inner text on the and tags + /// The inner text on the <voice> and <fax> tags #[serde(rename = "$value")] pub number: String, - /// The value of the 'x' attr on and tags + /// The value of the 'x' attr on <voice> and <fax> tags #[serde(rename = "x")] pub extension: Option, } -/// The type on contact transactions +/// The <addr> type on contact transactions #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Address { - /// The tags under + /// The <street> tags under <addr> pub street: Vec, - /// The tag under + /// The <city> tag under <addr> pub city: StringValue, - /// The tag under + /// The <sp> tag under <addr> #[serde(rename = "sp")] pub province: StringValue, - /// The tag under + /// The <pc> tag under <addr> #[serde(rename = "pc")] pub postal_code: StringValue, - /// The tag under + /// The <cc> tag under <addr> #[serde(rename = "cc")] pub country_code: StringValue, } -/// The type on contact transactions +/// The <postalInfo> type on contact transactions #[derive(Serialize, Deserialize, Debug, Clone)] pub struct PostalInfo { - /// The 'type' attr on + /// The 'type' attr on <postalInfo> #[serde(rename = "type")] pub info_type: String, - /// The tag under + /// The <name> tag under <postalInfo> pub name: StringValue, - /// The tag under + /// The <org> tag under <postalInfo> #[serde(rename = "org")] pub organization: StringValue, - /// The tag under + /// The <addr> tag under <postalInfo> #[serde(rename = "addr")] pub address: Address, } -/// The tag for domain and contact transactions +/// The <authInfo> tag for domain and contact transactions #[derive(Serialize, Deserialize, Debug, Clone)] pub struct AuthInfo { - /// The tag under + /// The <pw> tag under <authInfo> #[serde(rename = "pw")] pub password: StringValue, } diff --git a/epp-client/src/epp/request.rs b/epp-client/src/epp/request.rs index eb5d256..87ab4df 100644 --- a/epp-client/src/epp/request.rs +++ b/epp-client/src/epp/request.rs @@ -24,9 +24,9 @@ pub type EppLogout = EppObject>; #[derive(Deserialize, Debug, PartialEq, ElementName)] #[element_name(name = "command")] -/// Type corresponding to the tag in an EPP XML request +/// Type corresponding to the <command> tag in an EPP XML request pub struct Command { - /// The instance that will be used to populate the tag + /// The instance that will be used to populate the <command> tag pub command: T, /// The client TRID #[serde(rename = "clTRID")] @@ -67,7 +67,7 @@ impl EppHello { #[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)] #[element_name(name = "login")] -/// Type corresponding to the tag in an EPP XML login request +/// Type corresponding to the <login> tag in an EPP XML login request pub struct Login { /// The username to use for the login #[serde(rename(serialize = "clID", deserialize = "clID"))] @@ -135,7 +135,7 @@ impl EppLogin { #[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)] #[element_name(name = "logout")] -/// Type corresponding to the tag in an EPP XML logout request +/// Type corresponding to the <logout> tag in an EPP XML logout request pub struct Logout; impl EppLogout { diff --git a/epp-client/src/epp/request/contact/check.rs b/epp-client/src/epp/request/contact/check.rs index 8118612..14f4fec 100644 --- a/epp-client/src/epp/request/contact/check.rs +++ b/epp-client/src/epp/request/contact/check.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_CONTACT_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for contact command +/// Type that represents the <epp> request for contact <check> command /// /// ## Usage /// @@ -39,10 +39,10 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppContactCheck = EppObject>; -/// Type that represents the command for contact transactions +/// Type that represents the <check> command for contact transactions #[derive(Serialize, Deserialize, Debug)] pub struct ContactList { - /// The XML namespace for the contact + /// The XML namespace for the contact <check> xmlns: String, /// The list of contact ids to check for availability #[serde(rename = "id")] @@ -51,15 +51,15 @@ pub struct ContactList { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "check")] -/// The type for contact check command +/// The <command> type for contact check command pub struct ContactCheck { - /// The tag for the contact check command + /// The <check> tag for the contact check command #[serde(rename = "check")] list: ContactList, } impl EppContactCheck { - /// Creates an EppObject corresponding to the tag with data for a contact check request + /// Creates an EppObject corresponding to the <epp> tag with data for a contact check request pub fn new(contact_ids: Vec<&str>, client_tr_id: &str) -> EppContactCheck { let contact_ids = contact_ids .iter() diff --git a/epp-client/src/epp/request/contact/create.rs b/epp-client/src/epp/request/contact/create.rs index 4535ec7..d374715 100644 --- a/epp-client/src/epp/request/contact/create.rs +++ b/epp-client/src/epp/request/contact/create.rs @@ -8,7 +8,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_CONTACT_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for contact command +/// Type that represents the <epp> request for contact <create> command /// /// ## Usage /// @@ -55,38 +55,38 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppContactCreate = EppObject>; -/// Type for elements under the contact tag +/// Type for elements under the contact <create> tag #[derive(Serialize, Deserialize, Debug)] pub struct Contact { /// XML namespace for contact commands xmlns: String, - /// Contact tag + /// Contact <id> tag id: StringValue, - /// Contact tag + /// Contact <postalInfo> tag #[serde(rename = "postalInfo")] postal_info: data::PostalInfo, - /// Contact tag + /// Contact <voice> tag voice: data::Phone, - /// Contact tag, + /// Contact <fax> tag, fax: Option, - /// Contact tag + /// Contact <email> tag email: StringValue, - /// Contact tag + /// Contact <authInfo> tag #[serde(rename = "authInfo")] auth_info: data::AuthInfo, } #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "create")] -/// Type for EPP XML command for contacts +/// Type for EPP XML <create> command for contacts pub struct ContactCreate { - /// Data for command for contact + /// Data for <create> command for contact #[serde(rename = "create")] pub contact: Contact, } impl EppContactCreate { - /// Creates a new EppObject for contact create corresponding to the tag in EPP XML + /// Creates a new EppObject for contact create corresponding to the <epp> tag in EPP XML pub fn new( id: &str, email: &str, @@ -113,7 +113,7 @@ impl EppContactCreate { }) } - /// Sets the data for the request + /// Sets the <fax> data for the request pub fn set_fax(&mut self, fax: data::Phone) { self.data.command.contact.fax = Some(fax); } diff --git a/epp-client/src/epp/request/contact/delete.rs b/epp-client/src/epp/request/contact/delete.rs index a8fe0a5..3909999 100644 --- a/epp-client/src/epp/request/contact/delete.rs +++ b/epp-client/src/epp/request/contact/delete.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_CONTACT_XMLNS; use serde::{Deserialize, Serialize}; -/// Type for the request for contact command +/// Type for the <epp> request for contact <delete> command /// /// ## Usage /// @@ -39,10 +39,10 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppContactDelete = EppObject>; -/// Type containing the data for the tag for contacts +/// Type containing the data for the <delete> tag for contacts #[derive(Serialize, Deserialize, Debug)] pub struct ContactDeleteData { - /// XML namespace for the command for contacts + /// XML namespace for the <delete> command for contacts xmlns: String, /// The id of the contact to be deleted id: StringValue, @@ -50,15 +50,15 @@ pub struct ContactDeleteData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "delete")] -/// The type for the contact delete EPP command +/// The <delete> type for the contact delete EPP command pub struct ContactDelete { #[serde(rename = "delete")] - /// The data for the tag for a contact delete command + /// The data for the <delete> tag for a contact delete command contact: ContactDeleteData, } impl EppContactDelete { - /// Creates a new EppObject for contact delete corresponding to the tag in EPP XML + /// Creates a new EppObject for contact delete corresponding to the <epp> tag in EPP XML pub fn new(id: &str, client_tr_id: &str) -> EppContactDelete { EppObject::build(Command:: { command: ContactDelete { diff --git a/epp-client/src/epp/request/contact/info.rs b/epp-client/src/epp/request/contact/info.rs index d8008c3..5e1eb26 100644 --- a/epp-client/src/epp/request/contact/info.rs +++ b/epp-client/src/epp/request/contact/info.rs @@ -8,7 +8,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_CONTACT_XMLNS; use serde::{Deserialize, Serialize}; -/// Type for the request for contact command +/// Type for the <epp> request for contact <info> command /// /// ## Usage /// @@ -41,29 +41,29 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppContactInfo = EppObject>; -/// Type for elements under the contact tag +/// Type for elements under the contact <info> tag #[derive(Serialize, Deserialize, Debug)] pub struct ContactInfoData { /// XML namespace for contact commands xmlns: String, /// The contact id for the info command id: StringValue, - /// The data + /// The <authInfo> data #[serde(rename = "authInfo")] auth_info: AuthInfo, } #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "info")] -/// Type for EPP XML command for contacts +/// Type for EPP XML <info> command for contacts pub struct ContactInfo { - /// Data for command for contact + /// Data for <info> command for contact #[serde(rename = "info")] info: ContactInfoData, } impl EppContactInfo { - /// Creates a new EppObject for contact info corresponding to the tag in EPP XML + /// Creates a new EppObject for contact info corresponding to the <epp> tag in EPP XML pub fn new(id: &str, auth_password: &str, client_tr_id: &str) -> EppContactInfo { EppObject::build(Command:: { command: ContactInfo { diff --git a/epp-client/src/epp/request/contact/update.rs b/epp-client/src/epp/request/contact/update.rs index f377956..1fe6613 100644 --- a/epp-client/src/epp/request/contact/update.rs +++ b/epp-client/src/epp/request/contact/update.rs @@ -10,7 +10,7 @@ use crate::epp::xml::EPP_CONTACT_XMLNS; use crate::error; use serde::{Deserialize, Serialize}; -/// Type that represents the request for contact command +/// Type that represents the <epp> request for contact <update> command /// /// ## Usage /// @@ -50,7 +50,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppContactUpdate = EppObject>; -/// Type for elements under the tag for contact update request +/// Type for elements under the <chg> tag for contact update request #[derive(Serialize, Deserialize, Debug)] pub struct ContactChangeInfo { #[serde(rename = "postalInfo")] @@ -62,13 +62,13 @@ pub struct ContactChangeInfo { auth_info: Option, } -/// Type for list of elements of the tag for contact update request +/// Type for list of elements of the <status> tag for contact update request #[derive(Serialize, Deserialize, Debug)] pub struct StatusList { status: Vec, } -/// Type for elements under the contact tag +/// Type for elements under the contact <update> tag #[derive(Serialize, Deserialize, Debug)] pub struct ContactUpdateData { xmlns: String, @@ -83,15 +83,15 @@ pub struct ContactUpdateData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "update")] -/// Type for EPP XML command for contacts +/// Type for EPP XML <update> command for contacts pub struct ContactUpdate { - /// The data under the tag for the contact update + /// The data under the <update> tag for the contact update #[serde(rename = "update")] contact: ContactUpdateData, } impl EppContactUpdate { - /// Creates a new EppObject for contact update corresponding to the tag in EPP XML + /// Creates a new EppObject for contact update corresponding to the <epp> tag in EPP XML pub fn new(id: &str, client_tr_id: &str) -> EppContactUpdate { EppObject::build(Command:: { command: ContactUpdate { @@ -107,7 +107,7 @@ impl EppContactUpdate { }) } - /// Sets the data for the tag for the contact update request + /// Sets the data for the <chg> tag for the contact update request pub fn set_info( &mut self, email: &str, @@ -124,7 +124,7 @@ impl EppContactUpdate { }); } - /// Sets the data for the tag under for the contact update request + /// Sets the data for the <fax> tag under <chg> for the contact update request pub fn set_fax(&mut self, fax: Phone) { match &mut self.data.command.contact.change_info { Some(ref mut info) => info.fax = Some(fax), @@ -132,17 +132,17 @@ impl EppContactUpdate { } } - /// Sets the data for the tag for the contact update request + /// Sets the data for the <add> tag for the contact update request pub fn add(&mut self, statuses: Vec) { self.data.command.contact.add_statuses = Some(StatusList { status: statuses }); } - /// Sets the data for the tag for the contact update request + /// Sets the data for the <rem> tag for the contact update request pub fn remove(&mut self, statuses: Vec) { self.data.command.contact.remove_statuses = Some(StatusList { status: statuses }); } - /// Loads data into the tag from an existing EppContactInfoResponse object + /// Loads data into the <chg> tag from an existing EppContactInfoResponse object pub fn load_from_epp_contact_info( &mut self, contact_info: EppContactInfoResponse, diff --git a/epp-client/src/epp/request/domain/check.rs b/epp-client/src/epp/request/domain/check.rs index 2543cca..a3b9cfc 100644 --- a/epp-client/src/epp/request/domain/check.rs +++ b/epp-client/src/epp/request/domain/check.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command +/// Type that represents the <epp> request for domain <check> command /// /// ## Usage /// @@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppDomainCheck = EppObject>; -/// Type for elements under the domain tag +/// Type for <name> elements under the domain <check> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainList { /// XML namespace for domain commands @@ -51,7 +51,7 @@ pub struct DomainList { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "check")] -/// Type for EPP XML command for domains +/// Type for EPP XML <check> command for domains pub struct DomainCheck { /// The object holding the list of domains to be checked #[serde(rename = "check")] @@ -59,7 +59,7 @@ pub struct DomainCheck { } impl EppDomainCheck { - /// Creates a new EppObject for domain check corresponding to the tag in EPP XML + /// Creates a new EppObject for domain check corresponding to the <epp> tag in EPP XML pub fn new(domains: Vec<&str>, client_tr_id: &str) -> EppDomainCheck { let domains = domains .iter() diff --git a/epp-client/src/epp/request/domain/create.rs b/epp-client/src/epp/request/domain/create.rs index d2cde51..063744b 100644 --- a/epp-client/src/epp/request/domain/create.rs +++ b/epp-client/src/epp/request/domain/create.rs @@ -10,8 +10,8 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command -/// with elements in the request for list +/// Type that represents the <epp> request for domain <create> command +/// with <hostObj> elements in the request for <ns> list /// /// ## Usage /// @@ -58,11 +58,11 @@ use serde::{Deserialize, Serialize}; /// } /// ``` pub type EppDomainCreate = EppObject>>; -/// Type that represents the request for domain command -/// with elements in the request for list +/// Type that represents the <epp> request for domain <create> command +/// with <hostAttr> elements in the request for <ns> list pub type EppDomainCreateWithHostAttr = EppObject>>; -/// Type for elements under the domain tag +/// Type for elements under the domain <create> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainCreateData { /// XML namespace for domain commands @@ -86,7 +86,7 @@ pub struct DomainCreateData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "create")] -/// Type for EPP XML command for domains +/// Type for EPP XML <create> command for domains pub struct DomainCreate { /// The data for the domain to be created with /// T being the type of nameserver list (`HostObjList` or `HostAttrList`) @@ -96,8 +96,8 @@ pub struct DomainCreate { } impl EppDomainCreate { - /// Creates a new EppObject for domain create corresponding to the tag in EPP XML - /// with the tag containing tags + /// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML + /// with the <ns> tag containing <hostObj> tags pub fn new_with_ns( name: &str, period: u16, @@ -128,7 +128,7 @@ impl EppDomainCreate { }) } - /// Creates a new EppObject for domain create corresponding to the tag in EPP XML + /// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML /// without any nameservers pub fn new( name: &str, @@ -154,7 +154,7 @@ impl EppDomainCreate { }) } - /// Creates a new EppObject for domain create corresponding to the tag in EPP XML + /// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML /// without any contacts pub fn new_without_contacts( name: &str, @@ -178,8 +178,8 @@ impl EppDomainCreate { }) } - /// Creates a new EppObject for domain create corresponding to the tag in EPP XML - /// with the tag containing tags + /// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML + /// with the <ns> tag containing <hostAttr> tags pub fn new_with_host_attr( name: &str, period: u16, diff --git a/epp-client/src/epp/request/domain/delete.rs b/epp-client/src/epp/request/domain/delete.rs index e3f7164..1be0a7a 100644 --- a/epp-client/src/epp/request/domain/delete.rs +++ b/epp-client/src/epp/request/domain/delete.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command +/// Type that represents the <epp> request for domain <delete> command /// /// ## Usage /// @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppDomainDelete = EppObject>; -/// Type for element under the domain tag +/// Type for <name> element under the domain <delete> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainDeleteData { /// XML namespace for domain commands @@ -47,15 +47,15 @@ pub struct DomainDeleteData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "delete")] -/// Type for EPP XML command for domains +/// Type for EPP XML <delete> command for domains pub struct DomainDelete { - /// The data under the tag for domain deletion + /// The data under the <delete> tag for domain deletion #[serde(rename = "delete")] domain: DomainDeleteData, } impl EppDomainDelete { - /// Creates a new EppObject for domain delete corresponding to the tag in EPP XML + /// Creates a new EppObject for domain delete corresponding to the <epp> tag in EPP XML pub fn new(name: &str, client_tr_id: &str) -> EppDomainDelete { EppObject::build(Command:: { command: DomainDelete { diff --git a/epp-client/src/epp/request/domain/info.rs b/epp-client/src/epp/request/domain/info.rs index 11ae09d..bc80973 100644 --- a/epp-client/src/epp/request/domain/info.rs +++ b/epp-client/src/epp/request/domain/info.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command +/// Type that represents the <epp> request for domain <info> command /// /// ## Usage /// @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppDomainInfo = EppObject>; -/// Type for data under the element tag for the domain tag +/// Type for data under the <name> element tag for the domain <info> tag #[derive(Serialize, Deserialize, Debug)] pub struct Domain { /// The hosts attribute. Default value is "all" @@ -46,7 +46,7 @@ pub struct Domain { name: String, } -/// Type for element under the domain tag +/// Type for <name> element under the domain <info> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainInfoData { /// XML namespace for domain commands @@ -58,15 +58,15 @@ pub struct DomainInfoData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "info")] -/// Type for EPP XML command for domains +/// Type for EPP XML <info> command for domains pub struct DomainInfo { - /// The data under the tag for domain info + /// The data under the <info> tag for domain info #[serde(rename = "info")] info: DomainInfoData, } impl EppDomainInfo { - /// Creates a new EppObject for domain info corresponding to the tag in EPP XML + /// Creates a new EppObject for domain info corresponding to the <epp> tag in EPP XML pub fn new(name: &str, client_tr_id: &str) -> EppDomainInfo { EppObject::build(Command:: { command: DomainInfo { diff --git a/epp-client/src/epp/request/domain/renew.rs b/epp-client/src/epp/request/domain/renew.rs index 18cce27..01a39b4 100644 --- a/epp-client/src/epp/request/domain/renew.rs +++ b/epp-client/src/epp/request/domain/renew.rs @@ -9,7 +9,7 @@ use crate::epp::xml::EPP_DOMAIN_XMLNS; use chrono::NaiveDate; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command +/// Type that represents the <epp> request for domain <renew> command /// /// ## Usage /// @@ -42,7 +42,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppDomainRenew = EppObject>; -/// Type for data under the domain tag +/// Type for data under the domain <renew> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainRenewData { /// XML namespace for domain commands @@ -58,15 +58,15 @@ pub struct DomainRenewData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "renew")] -/// Type for EPP XML command for domains +/// Type for EPP XML <renew> command for domains pub struct DomainRenew { - /// The data under the tag for the domain renewal + /// The data under the <renew> tag for the domain renewal #[serde(rename = "renew")] domain: DomainRenewData, } impl EppDomainRenew { - /// Creates a new EppObject for domain renew corresponding to the tag in EPP XML + /// Creates a new EppObject for domain renew corresponding to the <epp> tag in EPP XML pub fn new( name: &str, current_expiry_date: NaiveDate, diff --git a/epp-client/src/epp/request/domain/transfer.rs b/epp-client/src/epp/request/domain/transfer.rs index 2996c28..c7b7a24 100644 --- a/epp-client/src/epp/request/domain/transfer.rs +++ b/epp-client/src/epp/request/domain/transfer.rs @@ -8,7 +8,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for transfer request for domain +/// Type that represents the <epp> request for transfer request for domain /// /// ## Usage /// @@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppDomainTransferRequest = EppObject>; -/// Type that represents the request for transfer approval for domains +/// Type that represents the <epp> request for transfer approval for domains /// /// ## Usage /// @@ -70,7 +70,7 @@ pub type EppDomainTransferRequest = EppObject>; /// ``` pub type EppDomainTransferApprove = EppObject>; -/// Type that represents the request for transfer rejection for domains +/// Type that represents the <epp> request for transfer rejection for domains /// /// ## Usage /// @@ -101,7 +101,7 @@ pub type EppDomainTransferApprove = EppObject>; /// ``` pub type EppDomainTransferReject = EppObject>; -/// Type that represents the request for transfer request cancellation for domains +/// Type that represents the <epp> request for transfer request cancellation for domains /// /// ## Usage /// @@ -132,7 +132,7 @@ pub type EppDomainTransferReject = EppObject>; /// ``` pub type EppDomainTransferCancel = EppObject>; -/// Type that represents the request for transfer request query for domains +/// Type that represents the <epp> request for transfer request query for domains /// /// ## Usage /// @@ -163,7 +163,7 @@ pub type EppDomainTransferCancel = EppObject>; /// ``` pub type EppDomainTransferQuery = EppObject>; -/// Type for elements under the domain tag +/// Type for elements under the domain <transfer> tag #[derive(Serialize, Deserialize, Debug)] pub struct DomainTransferData { /// XML namespace for domain commands @@ -181,19 +181,19 @@ pub struct DomainTransferData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "transfer")] -/// Type for EPP XML command for domains +/// Type for EPP XML <transfer> command for domains pub struct DomainTransfer { /// The transfer operation to perform indicated by the 'op' attr /// The values are one of transfer, approve, reject, cancel, or query #[serde(rename = "op")] operation: String, - /// The data under the tag in the transfer request + /// The data under the <transfer> tag in the transfer request #[serde(rename = "transfer")] domain: DomainTransferData, } impl EppDomainTransferRequest { - /// Creates a new EppObject for domain transfer request corresponding to the tag in EPP XML + /// Creates a new EppObject for domain transfer request corresponding to the <epp> tag in EPP XML pub fn request( name: &str, years: u16, @@ -221,7 +221,7 @@ impl EppDomainTransferRequest { } impl EppDomainTransferApprove { - /// Creates a new EppObject for domain transfer approval corresponding to the tag in EPP XML + /// Creates a new EppObject for domain transfer approval corresponding to the <epp> tag in EPP XML pub fn approve(name: &str, client_tr_id: &str) -> EppDomainTransferApprove { EppObject::build(Command:: { command: DomainTransfer { @@ -239,7 +239,7 @@ impl EppDomainTransferApprove { } impl EppDomainTransferCancel { - /// Creates a new EppObject for domain transfer request cancellation corresponding to the tag in EPP XML + /// Creates a new EppObject for domain transfer request cancellation corresponding to the <epp> tag in EPP XML pub fn cancel(name: &str, client_tr_id: &str) -> EppDomainTransferCancel { EppObject::build(Command:: { command: DomainTransfer { @@ -257,7 +257,7 @@ impl EppDomainTransferCancel { } impl EppDomainTransferReject { - /// Creates a new EppObject for domain transfer rejection corresponding to the tag in EPP XML + /// Creates a new EppObject for domain transfer rejection corresponding to the <epp> tag in EPP XML pub fn reject(name: &str, client_tr_id: &str) -> EppDomainTransferReject { EppObject::build(Command:: { command: DomainTransfer { @@ -275,7 +275,7 @@ impl EppDomainTransferReject { } impl EppDomainTransferQuery { - /// Creates a new EppObject for domain transfer request query corresponding to the tag in EPP XML + /// Creates a new EppObject for domain transfer request query corresponding to the <epp> tag in EPP XML pub fn query(name: &str, auth_password: &str, client_tr_id: &str) -> EppDomainTransferQuery { EppObject::build(Command:: { command: DomainTransfer { diff --git a/epp-client/src/epp/request/domain/update.rs b/epp-client/src/epp/request/domain/update.rs index f9ef80c..cd50a09 100644 --- a/epp-client/src/epp/request/domain/update.rs +++ b/epp-client/src/epp/request/domain/update.rs @@ -8,8 +8,8 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_DOMAIN_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for domain command -/// with elements in the request for list +/// Type that represents the <epp> request for domain <update> command +/// with <hostObj> elements in the request for <ns> list /// /// ## Usage /// @@ -62,11 +62,11 @@ use serde::{Deserialize, Serialize}; /// } /// ``` pub type EppDomainUpdate = EppObject>>; -/// Type that represents the request for domain command -/// with elements in the request for list +/// Type that represents the <epp> request for domain <update> command +/// with <hostAttr> elements in the request for <ns> list pub type EppDomainUpdateWithHostAttr = EppObject>>; -/// Type for elements under the tag for domain update +/// Type for elements under the <chg> tag for domain update #[derive(Serialize, Deserialize, Debug)] pub struct DomainChangeInfo { /// The new registrant contact for the domain @@ -76,7 +76,7 @@ pub struct DomainChangeInfo { pub auth_info: Option, } -/// Type for elements under the and tags for domain update +/// Type for elements under the <add> and <rem> tags for domain update #[derive(Serialize, Deserialize, Debug)] pub struct DomainAddRemove { /// The list of nameservers to add or remove @@ -91,7 +91,7 @@ pub struct DomainAddRemove { pub statuses: Option>, } -/// Type for elements under the tag for domain update +/// Type for elements under the <update> tag for domain update #[derive(Serialize, Deserialize, Debug)] pub struct DomainUpdateData { /// XML namespace for domain commands @@ -105,22 +105,22 @@ pub struct DomainUpdateData { /// from the domain #[serde(rename = "rem")] remove: Option>, - /// The data under the tag for domain update + /// The data under the <chg> tag for domain update #[serde(rename = "chg")] change_info: Option, } #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "update")] -/// Type for EPP XML command for domains +/// Type for EPP XML <update> command for domains pub struct DomainUpdate { #[serde(rename = "update")] domain: DomainUpdateData, } impl EppDomainUpdate { - /// Creates a new EppObject for domain update corresponding to the tag in EPP XML - /// with the tag containing tags + /// Creates a new EppObject for domain update corresponding to the <epp> tag in EPP XML + /// with the <ns> tag containing <hostObj> tags pub fn new(name: &str, client_tr_id: &str) -> EppDomainUpdate { EppObject::build(Command::> { command: DomainUpdate { @@ -136,25 +136,25 @@ impl EppDomainUpdate { }) } - /// Sets the data for the tag + /// Sets the data for the <chg> tag pub fn info(&mut self, info: DomainChangeInfo) { self.data.command.domain.change_info = Some(info); } - /// Sets the data for the tag + /// Sets the data for the <add> tag pub fn add(&mut self, add: DomainAddRemove) { self.data.command.domain.add = Some(add); } - /// Sets the data for the tag + /// Sets the data for the <rem> tag pub fn remove(&mut self, remove: DomainAddRemove) { self.data.command.domain.remove = Some(remove); } } impl EppDomainUpdateWithHostAttr { - /// Creates a new EppObject for domain update corresponding to the tag in EPP XML - /// with the tag containing tags + /// Creates a new EppObject for domain update corresponding to the <epp> tag in EPP XML + /// with the <ns> tag containing <hostAttr> tags pub fn new(name: &str, client_tr_id: &str) -> EppDomainUpdateWithHostAttr { EppObject::build(Command::> { command: DomainUpdate { @@ -170,17 +170,17 @@ impl EppDomainUpdateWithHostAttr { }) } - /// Sets the data for the tag + /// Sets the data for the <chg> tag pub fn info(&mut self, info: DomainChangeInfo) { self.data.command.domain.change_info = Some(info); } - /// Sets the data for the tag + /// Sets the data for the <add> tag pub fn add(&mut self, add: DomainAddRemove) { self.data.command.domain.add = Some(add); } - /// Sets the data for the tag + /// Sets the data for the <rem> tag pub fn remove(&mut self, remove: DomainAddRemove) { self.data.command.domain.remove = Some(remove); } diff --git a/epp-client/src/epp/request/host/check.rs b/epp-client/src/epp/request/host/check.rs index 6a929a2..8fa16f9 100644 --- a/epp-client/src/epp/request/host/check.rs +++ b/epp-client/src/epp/request/host/check.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_HOST_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for host command +/// Type that represents the <epp> request for host <check> command /// /// ## Usage /// @@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppHostCheck = EppObject>; -/// Type for data under the host tag +/// Type for data under the host <check> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostList { /// XML namespace for host commands @@ -51,7 +51,7 @@ pub struct HostList { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "check")] -/// Type for EPP XML command for hosts +/// Type for EPP XML <check> command for hosts pub struct HostCheck { /// The instance holding the list of hosts to be checked #[serde(rename = "check")] @@ -59,7 +59,7 @@ pub struct HostCheck { } impl EppHostCheck { - /// Creates a new EppObject for host check corresponding to the tag in EPP XML + /// Creates a new EppObject for host check corresponding to the <epp> tag in EPP XML pub fn new(hosts: Vec<&str>, client_tr_id: &str) -> EppHostCheck { let hosts = hosts .iter() diff --git a/epp-client/src/epp/request/host/create.rs b/epp-client/src/epp/request/host/create.rs index fea5427..2bf2e18 100644 --- a/epp-client/src/epp/request/host/create.rs +++ b/epp-client/src/epp/request/host/create.rs @@ -8,7 +8,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_HOST_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for host command +/// Type that represents the <epp> request for host <create> command /// /// ## Usage /// @@ -44,7 +44,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppHostCreate = EppObject>; -/// Type for data under the host tag +/// Type for data under the host <create> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostCreateData { /// XML namespace for host commands @@ -58,7 +58,7 @@ pub struct HostCreateData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "create")] -/// Type for EPP XML command for hosts +/// Type for EPP XML <create> command for hosts pub struct HostCreate { /// The instance holding the data for the host to be created #[serde(rename = "create")] @@ -66,7 +66,7 @@ pub struct HostCreate { } impl EppHostCreate { - /// Creates a new EppObject for host create corresponding to the tag in EPP XML + /// Creates a new EppObject for host create corresponding to the <epp> tag in EPP XML pub fn new(host: &str, addresses: Vec, client_tr_id: &str) -> EppHostCreate { let host_create = HostCreate { host: HostCreateData { diff --git a/epp-client/src/epp/request/host/delete.rs b/epp-client/src/epp/request/host/delete.rs index 3db9791..4d1732b 100644 --- a/epp-client/src/epp/request/host/delete.rs +++ b/epp-client/src/epp/request/host/delete.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_HOST_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for host command +/// Type that represents the <epp> request for host <delete> command /// /// ## Usage /// @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppHostDelete = EppObject>; -/// Type for data under the host tag +/// Type for data under the host <delete> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostDeleteData { /// XML namespace for host commands @@ -47,7 +47,7 @@ pub struct HostDeleteData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "delete")] -/// Type for EPP XML command for hosts +/// Type for EPP XML <delete> command for hosts pub struct HostDelete { /// The instance holding the data for the host to be deleted #[serde(rename = "delete")] @@ -55,7 +55,7 @@ pub struct HostDelete { } impl EppHostDelete { - /// Creates a new EppObject for host delete corresponding to the tag in EPP XML + /// Creates a new EppObject for host delete corresponding to the <epp> tag in EPP XML pub fn new(name: &str, client_tr_id: &str) -> EppHostDelete { EppObject::build(Command:: { command: HostDelete { diff --git a/epp-client/src/epp/request/host/info.rs b/epp-client/src/epp/request/host/info.rs index 7956312..b40096e 100644 --- a/epp-client/src/epp/request/host/info.rs +++ b/epp-client/src/epp/request/host/info.rs @@ -7,7 +7,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_HOST_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for host command +/// Type that represents the <epp> request for host <info> command /// /// ## Usage /// @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppHostInfo = EppObject>; -/// Type for data under the host tag +/// Type for data under the host <info> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostInfoData { /// XML namespace for host commands @@ -47,7 +47,7 @@ pub struct HostInfoData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "info")] -/// Type for EPP XML command for hosts +/// Type for EPP XML <info> command for hosts pub struct HostInfo { /// The instance holding the data for the host query #[serde(rename = "info")] @@ -55,7 +55,7 @@ pub struct HostInfo { } impl EppHostInfo { - /// Creates a new EppObject for host info corresponding to the tag in EPP XML + /// Creates a new EppObject for host info corresponding to the <epp> tag in EPP XML pub fn new(name: &str, client_tr_id: &str) -> EppHostInfo { EppObject::build(Command:: { command: HostInfo { diff --git a/epp-client/src/epp/request/host/update.rs b/epp-client/src/epp/request/host/update.rs index fdf1fc8..a178a3e 100644 --- a/epp-client/src/epp/request/host/update.rs +++ b/epp-client/src/epp/request/host/update.rs @@ -8,7 +8,7 @@ use crate::epp::request::Command; use crate::epp::xml::EPP_HOST_XMLNS; use serde::{Deserialize, Serialize}; -/// Type that represents the request for host command +/// Type that represents the <epp> request for host <update> command /// /// ## Usage /// @@ -49,7 +49,7 @@ use serde::{Deserialize, Serialize}; /// host_update.add(add); /// host_update.remove(remove); /// -/// // Send a section as well +/// // Send a <chg> section as well /// host_update.info(HostChangeInfo { name: "ns2.eppdev-101.com".to_string_value() }); /// /// // send it to the registry and receive a response of type EppHostUpdateResponse @@ -60,14 +60,14 @@ use serde::{Deserialize, Serialize}; /// ``` pub type EppHostUpdate = EppObject>; -/// Type for data under the tag +/// Type for data under the <chg> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostChangeInfo { /// The new name for the host pub name: StringValue, } -/// Type for data under the and tags +/// Type for data under the <add> and <rem> tags #[derive(Serialize, Deserialize, Debug)] pub struct HostAddRemove { /// The IP addresses to be added to or removed from the host @@ -78,7 +78,7 @@ pub struct HostAddRemove { pub statuses: Option>, } -/// Type for data under the host tag +/// Type for data under the host <update> tag #[derive(Serialize, Deserialize, Debug)] pub struct HostUpdateData { /// XML namespace for host commands @@ -97,7 +97,7 @@ pub struct HostUpdateData { #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "update")] -/// Type for EPP XML command for hosts +/// Type for EPP XML <update> command for hosts pub struct HostUpdate { /// The instance holding the data for the host to be updated #[serde(rename = "update")] @@ -105,7 +105,7 @@ pub struct HostUpdate { } impl EppHostUpdate { - /// Creates a new EppObject for host update corresponding to the tag in EPP XML + /// Creates a new EppObject for host update corresponding to the <epp> tag in EPP XML pub fn new(name: &str, client_tr_id: &str) -> EppHostUpdate { EppObject::build(Command:: { command: HostUpdate { @@ -121,17 +121,17 @@ impl EppHostUpdate { }) } - /// Sets the data for the element of the host update + /// Sets the data for the <chg> element of the host update pub fn info(&mut self, info: HostChangeInfo) { self.data.command.host.change_info = Some(info); } - /// Sets the data for the element of the host update + /// Sets the data for the <add> element of the host update pub fn add(&mut self, add: HostAddRemove) { self.data.command.host.add = Some(add); } - /// Sets the data for the element of the host update + /// Sets the data for the <rem> element of the host update pub fn remove(&mut self, remove: HostAddRemove) { self.data.command.host.remove = Some(remove); } diff --git a/epp-client/src/epp/request/message/ack.rs b/epp-client/src/epp/request/message/ack.rs index 90a831a..cb71185 100644 --- a/epp-client/src/epp/request/message/ack.rs +++ b/epp-client/src/epp/request/message/ack.rs @@ -6,7 +6,7 @@ use crate::epp::object::{ElementName, EppObject, StringValueTrait}; use crate::epp::request::Command; use serde::{Deserialize, Serialize}; -/// Type that represents the request for registry command +/// Type that represents the <epp> request for registry command /// ## Usage /// /// ```ignore @@ -36,7 +36,7 @@ pub type EppMessageAck = EppObject>; #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "poll")] -/// Type for EPP XML command for message ack +/// Type for EPP XML <poll> command for message ack pub struct MessageAck { /// The type of operation to perform /// The value is "ack" for message acknowledgement @@ -47,7 +47,7 @@ pub struct MessageAck { } impl EppMessageAck { - /// Creates a new EppObject for ack corresponding to the tag in EPP XML + /// Creates a new EppObject for <poll> ack corresponding to the <epp> tag in EPP XML pub fn new(message_id: u32, client_tr_id: &str) -> EppMessageAck { EppObject::build(Command:: { command: MessageAck { diff --git a/epp-client/src/epp/request/message/poll.rs b/epp-client/src/epp/request/message/poll.rs index 49bb734..67d2da0 100644 --- a/epp-client/src/epp/request/message/poll.rs +++ b/epp-client/src/epp/request/message/poll.rs @@ -6,7 +6,7 @@ use crate::epp::object::{ElementName, EppObject, StringValueTrait}; use crate::epp::request::Command; use serde::{Deserialize, Serialize}; -/// Type that represents the request for registry command +/// Type that represents the <epp> request for registry command /// /// ## Usage /// @@ -37,7 +37,7 @@ pub type EppMessagePoll = EppObject>; #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "poll")] -/// Type for EPP XML command for message poll +/// Type for EPP XML <poll> command for message poll pub struct MessagePoll { /// The type of operation to perform /// The value is "req" for message polling @@ -45,7 +45,7 @@ pub struct MessagePoll { } impl EppMessagePoll { - /// Creates a new EppObject for req corresponding to the tag in EPP XML + /// Creates a new EppObject for <poll> req corresponding to the <epp> tag in EPP XML pub fn new(client_tr_id: &str) -> EppMessagePoll { EppObject::build(Command:: { command: MessagePoll { diff --git a/epp-client/src/epp/response.rs b/epp-client/src/epp/response.rs index cdd8914..bb500e0 100644 --- a/epp-client/src/epp/response.rs +++ b/epp-client/src/epp/response.rs @@ -223,7 +223,7 @@ pub struct MessageQueue { #[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)] #[serde(rename_all = "lowercase")] #[element_name(name = "response")] -/// Type corresponding to the tag in an EPP response XML +/// Type corresponding to the <response> tag in an EPP response XML pub struct CommandResponse { /// Data under the tag pub result: EppResult, @@ -231,7 +231,7 @@ pub struct CommandResponse { #[serde(rename = "msgQ")] pub message_queue: Option, #[serde(rename = "resData")] - /// Data under the tag + /// Data under the <resData> tag pub res_data: Option, /// Data under the tag #[serde(rename = "trID")] @@ -240,8 +240,8 @@ pub struct CommandResponse { #[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)] #[element_name(name = "response")] -/// Type corresponding to the tag in an EPP response XML -/// without or sections. Generally used for error handling +/// Type corresponding to the <response> tag in an EPP response XML +/// without or <resData> sections. Generally used for error handling pub struct CommandResponseStatus { /// Data under the tag pub result: EppResult, @@ -251,7 +251,7 @@ pub struct CommandResponseStatus { } impl CommandResponse { - /// Returns the data under the corresponding from the EPP XML + /// Returns the data under the corresponding <resData> from the EPP XML pub fn res_data(&self) -> Option<&T> { match &self.res_data { Some(res_data) => Some(&res_data), diff --git a/epp-client/src/epp/response/contact/check.rs b/epp-client/src/epp/response/contact/check.rs index 4476ebe..b541799 100644 --- a/epp-client/src/epp/response/contact/check.rs +++ b/epp-client/src/epp/response/contact/check.rs @@ -5,31 +5,31 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML contact check response +/// Type that represents the <epp> tag for the EPP XML contact check response pub type EppContactCheckResponse = EppObject>; -/// Type that represents the tag for contact check response +/// Type that represents the <id> tag for contact check response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCheck { - /// The text of the tag + /// The text of the <id> tag #[serde(rename = "$value")] pub id: StringValue, - /// The avail attr on the tag + /// The avail attr on the <id> tag #[serde(rename = "avail")] pub available: u16, } -/// Type that represents the tag for contact check response +/// Type that represents the <cd> tag for contact check response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCheckDataItem { - /// Data under the tag + /// Data under the <id> tag #[serde(rename = "id")] pub contact: ContactCheck, /// The reason for (un)availability pub reason: Option, } -/// Type that represents the tag for contact check response +/// Type that represents the <chkData> tag for contact check response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCheckData { /// XML namespace for contact response data @@ -38,15 +38,15 @@ pub struct ContactCheckData { /// XML schema location for contact response data #[serde(rename = "xsi:schemaLocation")] schema_location: String, - /// Data under the tag + /// Data under the <cd> tag #[serde(rename = "cd")] pub contact_list: Vec, } -/// Type that represents the tag for contact check response +/// Type that represents the <resData> tag for contact check response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCheckResult { - /// Data under the tag + /// Data under the <chkData> tag #[serde(rename = "chkData")] pub check_data: ContactCheckData, } diff --git a/epp-client/src/epp/response/contact/create.rs b/epp-client/src/epp/response/contact/create.rs index 21dec5b..2354915 100644 --- a/epp-client/src/epp/response/contact/create.rs +++ b/epp-client/src/epp/response/contact/create.rs @@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML contact create response +/// Type that represents the <epp> tag for the EPP XML contact create response pub type EppContactCreateResponse = EppObject>; -/// Type that represents the tag for contact create response +/// Type that represents the <creData> tag for contact create response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCreateData { /// XML namespace for contact response data @@ -24,10 +24,10 @@ pub struct ContactCreateData { pub created_at: StringValue, } -/// Type that represents the tag for contact create response +/// Type that represents the <resData> tag for contact create response #[derive(Serialize, Deserialize, Debug)] pub struct ContactCreateResult { - /// Data under the tag + /// Data under the <creData> tag #[serde(rename = "creData")] pub create_data: ContactCreateData, } diff --git a/epp-client/src/epp/response/contact/delete.rs b/epp-client/src/epp/response/contact/delete.rs index ca2242b..ec4833e 100644 --- a/epp-client/src/epp/response/contact/delete.rs +++ b/epp-client/src/epp/response/contact/delete.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML contact delete response +/// Type that represents the <epp> tag for the EPP XML contact delete response pub type EppContactDeleteResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/contact/info.rs b/epp-client/src/epp/response/contact/info.rs index 27f55d0..10fbb65 100644 --- a/epp-client/src/epp/response/contact/info.rs +++ b/epp-client/src/epp/response/contact/info.rs @@ -6,10 +6,10 @@ use crate::epp::object::data::{AuthInfo, ContactStatus, Phone, PostalInfo}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML contact info response +/// Type that represents the <epp> tag for the EPP XML contact info response pub type EppContactInfoResponse = EppObject>; -/// Type that represents the tag for contact check response +/// Type that represents the <infData> tag for contact check response #[derive(Serialize, Deserialize, Debug)] pub struct ContactInfoData { /// XML namespace for contact response data @@ -57,10 +57,10 @@ pub struct ContactInfoData { pub auth_info: Option, } -/// Type that represents the tag for contact info response +/// Type that represents the <resData> tag for contact info response #[derive(Serialize, Deserialize, Debug)] pub struct ContactInfoResult { - /// Data under the tag + /// Data under the <infData> tag #[serde(rename = "infData")] pub info_data: ContactInfoData, } diff --git a/epp-client/src/epp/response/contact/update.rs b/epp-client/src/epp/response/contact/update.rs index 9afe771..a85c812 100644 --- a/epp-client/src/epp/response/contact/update.rs +++ b/epp-client/src/epp/response/contact/update.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML contact update response +/// Type that represents the <epp> tag for the EPP XML contact update response pub type EppContactUpdateResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/domain/check.rs b/epp-client/src/epp/response/domain/check.rs index ef7bd58..2734e9d 100644 --- a/epp-client/src/epp/response/domain/check.rs +++ b/epp-client/src/epp/response/domain/check.rs @@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML domain check response +/// Type that represents the <epp> tag for the EPP XML domain check response pub type EppDomainCheckResponse = EppObject>; -/// Type that represents the tag for domain check response +/// Type that represents the <name> tag for domain check response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCheck { /// The domain name @@ -19,17 +19,17 @@ pub struct DomainCheck { pub available: u16, } -/// Type that represents the tag for domain check response +/// Type that represents the <cd> tag for domain check response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCheckDataItem { - /// Data under the tag + /// Data under the <name> tag #[serde(rename = "name")] pub domain: DomainCheck, /// The reason for (un)availability pub reason: Option, } -/// Type that represents the tag for domain check response +/// Type that represents the <chkData> tag for domain check response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCheckData { /// XML namespace for domain response data @@ -38,15 +38,15 @@ pub struct DomainCheckData { /// XML schema location for domain response data #[serde(rename = "xsi:schemaLocation")] schema_location: String, - /// Data under the tag + /// Data under the <cd> tag #[serde(rename = "cd")] pub domain_list: Vec, } -/// Type that represents the tag for domain check response +/// Type that represents the <resData> tag for domain check response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCheckResult { - /// Data under the tag + /// Data under the <chkData> tag #[serde(rename = "chkData")] pub check_data: DomainCheckData, } diff --git a/epp-client/src/epp/response/domain/create.rs b/epp-client/src/epp/response/domain/create.rs index 4cf16ae..45db4a0 100644 --- a/epp-client/src/epp/response/domain/create.rs +++ b/epp-client/src/epp/response/domain/create.rs @@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML domain create response +/// Type that represents the <epp> tag for the EPP XML domain create response pub type EppDomainCreateResponse = EppObject>; -/// Type that represents the tag for domain create response +/// Type that represents the <chkData> tag for domain create response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCreateData { /// XML namespace for domain response data @@ -27,10 +27,10 @@ pub struct DomainCreateData { pub expiring_at: StringValue, } -/// Type that represents the tag for domain create response +/// Type that represents the <resData> tag for domain create response #[derive(Serialize, Deserialize, Debug)] pub struct DomainCreateResult { - /// Data under the tag + /// Data under the <chkData> tag #[serde(rename = "creData")] pub create_data: DomainCreateData, } diff --git a/epp-client/src/epp/response/domain/delete.rs b/epp-client/src/epp/response/domain/delete.rs index 9c702b2..b127fbc 100644 --- a/epp-client/src/epp/response/domain/delete.rs +++ b/epp-client/src/epp/response/domain/delete.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML domain delete response +/// Type that represents the <epp> tag for the EPP XML domain delete response pub type EppDomainDeleteResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/domain/info.rs b/epp-client/src/epp/response/domain/info.rs index 5e5d77b..cb7e18d 100644 --- a/epp-client/src/epp/response/domain/info.rs +++ b/epp-client/src/epp/response/domain/info.rs @@ -6,18 +6,21 @@ use crate::epp::object::data::{AuthInfo, DomainContact, DomainStatus, HostAttr}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML domain info response +/// Type that represents the <epp> tag for the EPP XML domain info response pub type EppDomainInfoResponse = EppObject>; +/// The two types of ns lists, hostObj and hostAttr, that may be returned in the +/// domain info response #[derive(Serialize, Deserialize, Debug)] pub struct DomainNsList { + /// List of <hostObj> ns elements #[serde(rename = "hostObj")] pub host_obj: Option>, - #[serde(rename = "hostAttr")] + /// List of <hostAttr> ns elements pub host_attr: Option>, } -/// Type that represents the tag for domain info response +/// Type that represents the <infData> tag for domain info response #[derive(Serialize, Deserialize, Debug)] pub struct DomainInfoData { /// XML namespace for domain response data @@ -70,9 +73,10 @@ pub struct DomainInfoData { pub auth_info: Option, } -/// Type that represents the tag for domain info response +/// Type that represents the <resData> tag for domain info response #[derive(Serialize, Deserialize, Debug)] pub struct DomainInfoResult { + /// Data under the <resData> tag #[serde(rename = "infData")] pub info_data: DomainInfoData, } diff --git a/epp-client/src/epp/response/domain/renew.rs b/epp-client/src/epp/response/domain/renew.rs index eed370e..c935f88 100644 --- a/epp-client/src/epp/response/domain/renew.rs +++ b/epp-client/src/epp/response/domain/renew.rs @@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML domain renew response +/// Type that represents the <epp> tag for the EPP XML domain renew response pub type EppDomainRenewResponse = EppObject>; -/// Type that represents the tag for domain renew response +/// Type that represents the <renData> tag for domain renew response #[derive(Serialize, Deserialize, Debug)] pub struct DomainRenewData { /// XML namespace for domain response data @@ -23,10 +23,10 @@ pub struct DomainRenewData { pub expiring_at: StringValue, } -/// Type that represents the tag for domain renew response +/// Type that represents the <resData> tag for domain renew response #[derive(Serialize, Deserialize, Debug)] pub struct DomainRenewResult { - /// Data under the tag + /// Data under the <renData> tag #[serde(rename = "renData")] pub renew_data: DomainRenewData, } diff --git a/epp-client/src/epp/response/domain/transfer.rs b/epp-client/src/epp/response/domain/transfer.rs index bdf4987..4e4c96a 100644 --- a/epp-client/src/epp/response/domain/transfer.rs +++ b/epp-client/src/epp/response/domain/transfer.rs @@ -5,18 +5,18 @@ use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML domain transfer request response +/// Type that represents the <epp> tag for the EPP XML domain transfer request response pub type EppDomainTransferRequestResponse = EppObject>; -/// Type that represents the tag for the EPP XML domain transfer approval response +/// Type that represents the <epp> tag for the EPP XML domain transfer approval response pub type EppDomainTransferApproveResponse = EppCommandResponse; -/// Type that represents the tag for the EPP XML domain transfer rejection response +/// Type that represents the <epp> tag for the EPP XML domain transfer rejection response pub type EppDomainTransferRejectResponse = EppCommandResponse; -/// Type that represents the tag for the EPP XML domain transfer cancellation response +/// Type that represents the <epp> tag for the EPP XML domain transfer cancellation response pub type EppDomainTransferCancelResponse = EppCommandResponse; -/// Type that represents the tag for the EPP XML domain transfer query response +/// Type that represents the <epp> tag for the EPP XML domain transfer query response pub type EppDomainTransferQueryResponse = EppObject>; -/// Type that represents the tag for domain transfer response +/// Type that represents the <trnData> tag for domain transfer response #[derive(Serialize, Deserialize, Debug)] pub struct DomainTransferData { /// XML namespace for domain response data @@ -47,10 +47,10 @@ pub struct DomainTransferData { pub expiring_at: StringValue, } -/// Type that represents the tag for domain transfer response +/// Type that represents the <resData> tag for domain transfer response #[derive(Serialize, Deserialize, Debug)] pub struct DomainTransferResult { - /// Data under the tag + /// Data under the <trnData> tag #[serde(rename = "trnData")] pub transfer_data: DomainTransferData, } diff --git a/epp-client/src/epp/response/domain/update.rs b/epp-client/src/epp/response/domain/update.rs index 4c5bea2..716ced3 100644 --- a/epp-client/src/epp/response/domain/update.rs +++ b/epp-client/src/epp/response/domain/update.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML domain update response +/// Type that represents the <epp> tag for the EPP XML domain update response pub type EppDomainUpdateResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/host/check.rs b/epp-client/src/epp/response/host/check.rs index 3e40114..06b2bf3 100644 --- a/epp-client/src/epp/response/host/check.rs +++ b/epp-client/src/epp/response/host/check.rs @@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML host check response +/// Type that represents the <epp> tag for the EPP XML host check response pub type EppHostCheckResponse = EppObject>; -/// Type that represents the tag for host check response +/// Type that represents the <name> tag for host check response #[derive(Serialize, Deserialize, Debug)] pub struct HostCheck { /// The host name @@ -19,17 +19,17 @@ pub struct HostCheck { pub available: u16, } -/// Type that represents the tag for host check response +/// Type that represents the <cd> tag for host check response #[derive(Serialize, Deserialize, Debug)] pub struct HostCheckDataItem { - /// Data under the tag + /// Data under the <name> tag #[serde(rename = "name")] pub host: HostCheck, /// The reason for (un)availability pub reason: Option, } -/// Type that represents the tag for host check response +/// Type that represents the <chkData> tag for host check response #[derive(Serialize, Deserialize, Debug)] pub struct HostCheckData { /// XML namespace for host response data @@ -38,15 +38,15 @@ pub struct HostCheckData { /// XML schema location for host response data #[serde(rename = "xsi:schemaLocation")] schema_location: String, - /// Data under the tag + /// Data under the <cd> tag #[serde(rename = "cd")] pub host_list: Vec, } -/// Type that represents the tag for host check response +/// Type that represents the <resData> tag for host check response #[derive(Serialize, Deserialize, Debug)] pub struct HostCheckResult { - /// Data under the tag + /// Data under the <chkData> tag #[serde(rename = "chkData")] pub check_data: HostCheckData, } diff --git a/epp-client/src/epp/response/host/create.rs b/epp-client/src/epp/response/host/create.rs index c99890b..a26e97a 100644 --- a/epp-client/src/epp/response/host/create.rs +++ b/epp-client/src/epp/response/host/create.rs @@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML host create response +/// Type that represents the <epp> tag for the EPP XML host create response pub type EppHostCreateResponse = EppObject>; -/// Type that represents the tag for host create response +/// Type that represents the <creData> tag for host create response #[derive(Serialize, Deserialize, Debug)] pub struct HostCreateData { /// XML namespace for host response data @@ -24,10 +24,10 @@ pub struct HostCreateData { pub created_at: StringValue, } -/// Type that represents the tag for host check response +/// Type that represents the <resData> tag for host check response #[derive(Serialize, Deserialize, Debug)] pub struct HostCreateResult { - /// Data under the tag + /// Data under the <creData> tag #[serde(rename = "creData")] pub create_data: HostCreateData, } diff --git a/epp-client/src/epp/response/host/delete.rs b/epp-client/src/epp/response/host/delete.rs index c209ff7..3b3d9c8 100644 --- a/epp-client/src/epp/response/host/delete.rs +++ b/epp-client/src/epp/response/host/delete.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML host delete response +/// Type that represents the <epp> tag for the EPP XML host delete response pub type EppHostDeleteResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/host/info.rs b/epp-client/src/epp/response/host/info.rs index 7ce8750..23e679c 100644 --- a/epp-client/src/epp/response/host/info.rs +++ b/epp-client/src/epp/response/host/info.rs @@ -6,10 +6,10 @@ use crate::epp::object::data::{HostAddr, HostStatus}; use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML host info response +/// Type that represents the <epp> tag for the EPP XML host info response pub type EppHostInfoResponse = EppObject>; -/// Type that represents the tag for host info response +/// Type that represents the <infData> tag for host info response #[derive(Serialize, Deserialize, Debug)] pub struct HostInfoData { /// XML namespace for host response data @@ -48,10 +48,10 @@ pub struct HostInfoData { pub transferred_at: Option, } -/// Type that represents the tag for host info response +/// Type that represents the <resData> tag for host info response #[derive(Serialize, Deserialize, Debug)] pub struct HostInfoResult { - /// Data under the tag + /// Data under the <infData> tag #[serde(rename = "infData")] pub info_data: HostInfoData, } diff --git a/epp-client/src/epp/response/host/update.rs b/epp-client/src/epp/response/host/update.rs index d77ad2e..43b5c14 100644 --- a/epp-client/src/epp/response/host/update.rs +++ b/epp-client/src/epp/response/host/update.rs @@ -2,5 +2,5 @@ use crate::epp::response::EppCommandResponse; -/// Type that represents the tag for the EPP XML host update response +/// Type that represents the <epp> tag for the EPP XML host update response pub type EppHostUpdateResponse = EppCommandResponse; diff --git a/epp-client/src/epp/response/message/ack.rs b/epp-client/src/epp/response/message/ack.rs index 94806e0..fb08d40 100644 --- a/epp-client/src/epp/response/message/ack.rs +++ b/epp-client/src/epp/response/message/ack.rs @@ -3,5 +3,5 @@ use crate::epp::object::EppObject; use crate::epp::response::CommandResponse; -/// Type that represents the tag for the EPP XML message ack response +/// Type that represents the <epp> tag for the EPP XML message ack response pub type EppMessageAckResponse = EppObject>; diff --git a/epp-client/src/epp/response/message/poll.rs b/epp-client/src/epp/response/message/poll.rs index 32f84e1..1eddd65 100644 --- a/epp-client/src/epp/response/message/poll.rs +++ b/epp-client/src/epp/response/message/poll.rs @@ -4,10 +4,10 @@ use crate::epp::object::{EppObject, StringValue}; use crate::epp::response::CommandResponse; use serde::{Deserialize, Serialize}; -/// Type that represents the tag for the EPP XML message poll response +/// Type that represents the <epp> tag for the EPP XML message poll response pub type EppMessagePollResponse = EppObject>; -/// Type that represents the tag for message poll response +/// Type that represents the <trnData> tag for message poll response #[derive(Serialize, Deserialize, Debug)] pub struct MessageDomainTransferData { /// XML namespace for message response data @@ -35,10 +35,10 @@ pub struct MessageDomainTransferData { pub expiring_at: StringValue, } -/// Type that represents the tag for message poll response +/// Type that represents the <resData> tag for message poll response #[derive(Serialize, Deserialize, Debug)] pub struct MessagePollResult { - /// Data under the tag + /// Data under the <trnData> tag #[serde(rename = "trnData")] pub message_data: MessageDomainTransferData, } diff --git a/epp-client/src/lib.rs b/epp-client/src/lib.rs index fd85dba..123b022 100644 --- a/epp-client/src/lib.rs +++ b/epp-client/src/lib.rs @@ -1,31 +1,34 @@ -//! EPP Client Library for the Extensible Provisioning Protocol (EPP). +//! # EPP (Extensible Provisioning Protocol) Client Library for Domain Registration and Management. //! //! ## Description //! //! epp-client is a client library for Internet domain registration and management for domain registrars. //! -//! It supports the following basic Domain, Contact and Host management calls, with plans to add more calls +//! It supports the following basic Domain, Contact, Host, and Message management calls, with plans to add more calls //! and other EPP extensions in the future, and to eventually be RFC compliant with the EPP protocol. //! -//! - Domain Check -//! - Domain Create -//! - Domain Info -//! - Domain Update -//! - Domain Delete -//! - Domain Renew -//! - Domain Transfer +//! - Domain Check - [`EppDomainCheck`](epp/request/domain/check/type.EppDomainCheck.html) +//! - Domain Create - [`EppDomainCreate`](epp/request/domain/create/type.EppDomainCreate.html) +//! - Domain Info - [`EppDomainInfo`](epp/request/domain/info/type.EppDomainInfo.html) +//! - Domain Update - [`EppDomainUpdate`](epp/request/domain/update/type.EppDomainUpdate.html) +//! - Domain Delete - [`EppDomainDelete`](epp/request/domain/delete/type.EppDomainDelete.html) +//! - Domain Renew - [`EppDomainRenew`](epp/request/domain/renew/type.EppDomainRenew.html) +//! - Domain Transfer - [`EppDomainTransferRequest`](epp/request/domain/transfer/type.EppDomainTransferRequest.html) //! -//! - Contact Check -//! - Contact Create -//! - Contact Info -//! - Contact Update -//! - Contact Delete +//! - Contact Check - [`EppContactCheck`](epp/request/contact/check/type.EppContactCheck.html) +//! - Contact Create - [`EppContactCreate`](epp/request/contact/create/type.EppContactCreate.html) +//! - Contact Info - [`EppContactInfo`](epp/request/contact/info/type.EppContactInfo.html) +//! - Contact Update - [`EppContactUpdate`](epp/request/contact/update/type.EppContactUpdate.html) +//! - Contact Delete - [`EppContactDelete`](epp/request/contact/delete/type.EppContactDelete.html) //! -//! - Host Check -//! - Host Create -//! - Host Info -//! - Host Update -//! - Host Delete +//! - Host Check - [`EppHostCheck`](epp/request/host/check/type.EppHostCheck.html) +//! - Host Create - [`EppHostCreate`](epp/request/host/create/type.EppHostCreate.html) +//! - Host Info - [`EppHostInfo`](epp/request/host/info/type.EppHostInfo.html) +//! - Host Update - [`EppHostUpdate`](epp/request/host/update/type.EppHostUpdate.html) +//! - Host Delete - [`EppHostDelete`](epp/request/host/delete/type.EppHostDelete.html) +//! +//! - Message Poll - [`EppMessagePoll`](epp/request/message/poll/type.EppMessagePoll.html) +//! - Message Ack - [`EppMessageAck`](epp/request/message/ack/type.EppMessageAck.html) //! //! ## Prerequisites //! @@ -44,7 +47,7 @@ //! # service extensions //! ext_uris = [] //! -//! [registry.hexonet.tls_files] +//! [registry.verisign.tls_files] //! # the full client certificate chain in PEM format //! cert_chain = '/path/to/certificate/chain/pemfile' //! # the RSA private key for your certificate @@ -72,7 +75,10 @@ //! //! // Make a domain check call, which returns an object of type EppDomainCheckResponse //! // that contains the result of the call -//! let domain_check = EppDomainCheck::new(vec!["eppdev.com", "eppdev.net"], generate_client_tr_id(&client).as_str()); +//! let domain_check = EppDomainCheck::new( +//! vec!["eppdev.com", "eppdev.net"], +//! generate_client_tr_id(&client).as_str() +//! ); //! //! let response = client.transact::<_, EppDomainCheckResponse>(&domain_check).await.unwrap(); //!