From b5b17e5b3fb8c7f6713523023145ec0e6195ae4b Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 7 Dec 2021 10:59:51 +0100 Subject: [PATCH] Inline rgp module --- epp-client/src/extensions/rgp.rs | 6 ------ epp-client/src/extensions/rgp/report.rs | 4 ++-- epp-client/src/extensions/rgp/request.rs | 4 ++-- epp-client/src/lib.rs | 7 ++++++- 4 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 epp-client/src/extensions/rgp.rs diff --git a/epp-client/src/extensions/rgp.rs b/epp-client/src/extensions/rgp.rs deleted file mode 100644 index 708b874..0000000 --- a/epp-client/src/extensions/rgp.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! Types for EPP RGP restore requests - -pub mod report; -pub mod request; - -pub const EPP_DOMAIN_RGP_EXT_XMLNS: &str = "urn:ietf:params:xml:ns:rgp-1.0"; diff --git a/epp-client/src/extensions/rgp/report.rs b/epp-client/src/extensions/rgp/report.rs index e10a271..8ad1e83 100644 --- a/epp-client/src/extensions/rgp/report.rs +++ b/epp-client/src/extensions/rgp/report.rs @@ -7,7 +7,7 @@ use crate::request::EppExtension; use chrono::{DateTime, SecondsFormat, Utc}; use serde::{Deserialize, Serialize}; -use super::EPP_DOMAIN_RGP_EXT_XMLNS; +use super::XMLNS; /// Type that represents the domain rgp restore report extension /// @@ -99,7 +99,7 @@ impl RgpRestoreReport { let statements = statements.iter().map(|&s| s.into()).collect(); RgpRestoreReport { - xmlns: EPP_DOMAIN_RGP_EXT_XMLNS.to_string(), + xmlns: XMLNS.to_string(), restore: RgpRestoreReportSection { op: "report".to_string(), report: RgpRestoreReportSectionData { diff --git a/epp-client/src/extensions/rgp/request.rs b/epp-client/src/extensions/rgp/request.rs index 5612cb4..c564a51 100644 --- a/epp-client/src/extensions/rgp/request.rs +++ b/epp-client/src/extensions/rgp/request.rs @@ -8,7 +8,7 @@ use crate::request::EppExtension; use serde::{Deserialize, Serialize}; -use super::EPP_DOMAIN_RGP_EXT_XMLNS; +use super::XMLNS; /// Type that represents the <epp> request for a domain rgp restore request command /// @@ -67,7 +67,7 @@ impl RgpRestoreRequest { /// Creates a new instance of EppDomainRgpRestoreRequest pub fn new() -> RgpRestoreRequest { RgpRestoreRequest { - xmlns: EPP_DOMAIN_RGP_EXT_XMLNS.to_string(), + xmlns: XMLNS.to_string(), restore: RgpRestoreRequestData { op: "request".to_string(), }, diff --git a/epp-client/src/lib.rs b/epp-client/src/lib.rs index f2f940c..5a072f3 100644 --- a/epp-client/src/lib.rs +++ b/epp-client/src/lib.rs @@ -138,7 +138,12 @@ pub mod domain { pub mod extensions { pub mod consolidate; pub mod namestore; - pub mod rgp; + pub mod rgp { + pub mod report; + pub mod request; + + pub const XMLNS: &str = "urn:ietf:params:xml:ns:rgp-1.0"; + } } pub mod host {