diff --git a/README.md b/README.md index eed6802..106ac5d 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ You can create a mut variable of type `EppClient` with the domain registry confi ```rust use std::collections::HashMap; -use epp_client::config::{EppClientConfig, EppClientConnection}; +use epp_client::config::{EppClientConfig, RegistryConfig}; use epp_client::EppClient; use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse}; use epp_client::generate_client_tr_id; @@ -61,10 +61,10 @@ use epp_client::generate_client_tr_id; #[tokio::main] async fn main() { // Configure the client to connect to one of more registries - let mut registry: HashMap = HashMap::new(); + let mut registry: HashMap = HashMap::new(); registry.insert( "registry_name".to_owned(), - EppClientConnection { + RegistryConfig { host: "example.com".to_owned(), port: 700, username: "username".to_owned(), @@ -126,7 +126,6 @@ cert_chain = '/path/to/certificate/chain/pemfile' key = '/path/to/private/key/pemfile' ``` - ```rust use epp_client::config::{EppClientConfig}; diff --git a/epp-client/README.md b/epp-client/README.md index eed6802..106ac5d 100644 --- a/epp-client/README.md +++ b/epp-client/README.md @@ -53,7 +53,7 @@ You can create a mut variable of type `EppClient` with the domain registry confi ```rust use std::collections::HashMap; -use epp_client::config::{EppClientConfig, EppClientConnection}; +use epp_client::config::{EppClientConfig, RegistryConfig}; use epp_client::EppClient; use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse}; use epp_client::generate_client_tr_id; @@ -61,10 +61,10 @@ use epp_client::generate_client_tr_id; #[tokio::main] async fn main() { // Configure the client to connect to one of more registries - let mut registry: HashMap = HashMap::new(); + let mut registry: HashMap = HashMap::new(); registry.insert( "registry_name".to_owned(), - EppClientConnection { + RegistryConfig { host: "example.com".to_owned(), port: 700, username: "username".to_owned(), @@ -126,7 +126,6 @@ cert_chain = '/path/to/certificate/chain/pemfile' key = '/path/to/private/key/pemfile' ``` - ```rust use epp_client::config::{EppClientConfig}; diff --git a/epp-client/src/client.rs b/epp-client/src/client.rs index 8fd7d88..6bfcbbc 100644 --- a/epp-client/src/client.rs +++ b/epp-client/src/client.rs @@ -5,7 +5,7 @@ //! ```no_run //! use std::collections::HashMap; //! -//! use epp_client::config::{EppClientConfig, EppClientConnection}; +//! use epp_client::config::{EppClientConfig, RegistryConfig}; //! use epp_client::EppClient; //! use epp_client::domain::check::DomainCheck; //! use epp_client::generate_client_tr_id; @@ -15,10 +15,10 @@ //! async fn main() { //! //! // Create a config -//! let mut registry: HashMap = HashMap::new(); +//! let mut registry: HashMap = HashMap::new(); //! registry.insert( //! "registry_name".to_owned(), -//! EppClientConnection { +//! RegistryConfig { //! host: "example.com".to_owned(), //! port: 700, //! username: "username".to_owned(), diff --git a/epp-client/src/config.rs b/epp-client/src/config.rs index 3e7f29f..5647190 100644 --- a/epp-client/src/config.rs +++ b/epp-client/src/config.rs @@ -7,13 +7,13 @@ //! ```no_run //! use std::collections::HashMap; //! -//! use epp_client::config::{EppClientConfig, EppClientConnection}; +//! use epp_client::config::{EppClientConfig, RegistryConfig}; //! //! // Create a config -//! let mut registry: HashMap = HashMap::new(); +//! let mut registry: HashMap = HashMap::new(); //! registry.insert( //! "registry_name".to_owned(), -//! EppClientConnection { +//! RegistryConfig { //! host: "example.com".to_owned(), //! port: 700, //! username: "username".to_owned(), @@ -48,19 +48,19 @@ pub struct EppClientTlsFiles { /// Config that stores settings for multiple registries #[derive(Serialize, Deserialize, Debug)] pub struct EppClientConfig { - pub registry: HashMap, + pub registry: HashMap, } impl EppClientConfig { /// Returns the config for a particular registry - pub fn registry(&self, registry: &str) -> Option<&EppClientConnection> { + pub fn registry(&self, registry: &str) -> Option<&RegistryConfig> { self.registry.get(registry) } } /// Connection details to connect to and authenticate with a registry #[derive(Serialize, Deserialize, Debug)] -pub struct EppClientConnection { +pub struct RegistryConfig { pub host: String, pub port: u16, pub username: String, @@ -69,7 +69,7 @@ pub struct EppClientConnection { pub tls_files: Option, } -impl EppClientConnection { +impl RegistryConfig { /// Returns the EPP username and password as a tuple pub fn credentials(&self) -> (String, String) { (self.username.to_string(), self.password.to_string()) diff --git a/epp-client/src/contact/check.rs b/epp-client/src/contact/check.rs index 90e35aa..26f030f 100644 --- a/epp-client/src/contact/check.rs +++ b/epp-client/src/contact/check.rs @@ -30,7 +30,7 @@ impl EppRequest for ContactCheck { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::contact::check::ContactCheck; /// use epp_client::generate_client_tr_id; @@ -39,10 +39,10 @@ impl EppRequest for ContactCheck { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/contact/create.rs b/epp-client/src/contact/create.rs index 95cfdcc..ada6860 100644 --- a/epp-client/src/contact/create.rs +++ b/epp-client/src/contact/create.rs @@ -29,7 +29,7 @@ impl EppRequest for ContactCreate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::{Address, Phone, PostalInfo}; /// use epp_client::contact::create::ContactCreate; @@ -39,10 +39,10 @@ impl EppRequest for ContactCreate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/contact/delete.rs b/epp-client/src/contact/delete.rs index 479197a..f14349e 100644 --- a/epp-client/src/contact/delete.rs +++ b/epp-client/src/contact/delete.rs @@ -30,7 +30,7 @@ impl EppRequest for ContactDelete { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::contact::delete::ContactDelete; /// use epp_client::generate_client_tr_id; @@ -39,10 +39,10 @@ impl EppRequest for ContactDelete { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/contact/info.rs b/epp-client/src/contact/info.rs index f12287d..df0bf2a 100644 --- a/epp-client/src/contact/info.rs +++ b/epp-client/src/contact/info.rs @@ -31,7 +31,7 @@ impl EppRequest for ContactInfo { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::contact::info::ContactInfo; /// use epp_client::generate_client_tr_id; @@ -40,10 +40,10 @@ impl EppRequest for ContactInfo { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/contact/update.rs b/epp-client/src/contact/update.rs index bedaeb7..258604c 100644 --- a/epp-client/src/contact/update.rs +++ b/epp-client/src/contact/update.rs @@ -32,7 +32,7 @@ impl EppRequest for ContactUpdate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::contact::update::ContactUpdate; /// use epp_client::generate_client_tr_id; @@ -42,10 +42,10 @@ impl EppRequest for ContactUpdate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/check.rs b/epp-client/src/domain/check.rs index 86f199f..c0729c6 100644 --- a/epp-client/src/domain/check.rs +++ b/epp-client/src/domain/check.rs @@ -29,7 +29,7 @@ impl EppRequest for DomainCheck { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::check::DomainCheck; /// use epp_client::generate_client_tr_id; @@ -38,10 +38,10 @@ impl EppRequest for DomainCheck { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/create.rs b/epp-client/src/domain/create.rs index 9778092..7f4399b 100644 --- a/epp-client/src/domain/create.rs +++ b/epp-client/src/domain/create.rs @@ -32,7 +32,7 @@ impl EppRequest for DomainCreate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::DomainContact; /// use epp_client::domain::create::DomainCreate; @@ -45,10 +45,10 @@ impl EppRequest for DomainCreate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/delete.rs b/epp-client/src/domain/delete.rs index f7a4a91..5451247 100644 --- a/epp-client/src/domain/delete.rs +++ b/epp-client/src/domain/delete.rs @@ -30,7 +30,7 @@ impl EppRequest for DomainDelete { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::delete::DomainDelete; /// use epp_client::generate_client_tr_id; @@ -39,10 +39,10 @@ impl EppRequest for DomainDelete { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/info.rs b/epp-client/src/domain/info.rs index 3c462b2..4f01bd0 100644 --- a/epp-client/src/domain/info.rs +++ b/epp-client/src/domain/info.rs @@ -31,7 +31,7 @@ impl EppRequest for DomainInfo { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::info::DomainInfo; /// use epp_client::generate_client_tr_id; @@ -40,10 +40,10 @@ impl EppRequest for DomainInfo { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/renew.rs b/epp-client/src/domain/renew.rs index 29cc6cf..0528b31 100644 --- a/epp-client/src/domain/renew.rs +++ b/epp-client/src/domain/renew.rs @@ -32,7 +32,7 @@ impl EppRequest for DomainRenew { /// /// use chrono::NaiveDate; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::renew::DomainRenew; /// use epp_client::generate_client_tr_id; @@ -41,10 +41,10 @@ impl EppRequest for DomainRenew { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/rgp/report.rs b/epp-client/src/domain/rgp/report.rs index 980a6eb..5aa3897 100644 --- a/epp-client/src/domain/rgp/report.rs +++ b/epp-client/src/domain/rgp/report.rs @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize}; /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::{DomainStatus, DomainContact}; /// use epp_client::domain::rgp::report::RgpRestoreReport; @@ -28,10 +28,10 @@ use serde::{Deserialize, Serialize}; /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/rgp/request.rs b/epp-client/src/domain/rgp/request.rs index 87c6390..4ed1bc2 100644 --- a/epp-client/src/domain/rgp/request.rs +++ b/epp-client/src/domain/rgp/request.rs @@ -16,7 +16,7 @@ use serde::{Deserialize, Serialize}; /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::rgp::request::RgpRestoreRequest; /// use epp_client::domain::update::DomainUpdate; @@ -25,10 +25,10 @@ use serde::{Deserialize, Serialize}; /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/transfer.rs b/epp-client/src/domain/transfer.rs index 405e407..12a8a00 100644 --- a/epp-client/src/domain/transfer.rs +++ b/epp-client/src/domain/transfer.rs @@ -90,7 +90,7 @@ impl EppRequest for DomainTransferQuery { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::transfer::DomainTransferRequest; /// use epp_client::generate_client_tr_id; @@ -99,10 +99,10 @@ impl EppRequest for DomainTransferQuery { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), @@ -163,7 +163,7 @@ impl DomainTransferRequest { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::transfer::DomainTransferApprove; /// use epp_client::generate_client_tr_id; @@ -172,10 +172,10 @@ impl DomainTransferRequest { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), @@ -236,7 +236,7 @@ impl DomainTransferApprove { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::transfer::DomainTransferReject; /// use epp_client::generate_client_tr_id; @@ -245,10 +245,10 @@ impl DomainTransferApprove { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), @@ -309,7 +309,7 @@ impl DomainTransferReject { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::transfer::DomainTransferCancel; /// use epp_client::generate_client_tr_id; @@ -318,10 +318,10 @@ impl DomainTransferReject { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), @@ -382,7 +382,7 @@ impl DomainTransferCancel { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::domain::transfer::DomainTransferQuery; /// use epp_client::generate_client_tr_id; @@ -391,10 +391,10 @@ impl DomainTransferCancel { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/domain/update.rs b/epp-client/src/domain/update.rs index 41e3809..63a4de8 100644 --- a/epp-client/src/domain/update.rs +++ b/epp-client/src/domain/update.rs @@ -38,7 +38,7 @@ impl EppRequest for DomainUpdate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::{DomainStatus, DomainContact}; /// use epp_client::domain::update::{DomainUpdate, DomainAddRemove}; @@ -48,10 +48,10 @@ impl EppRequest for DomainUpdate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/host/check.rs b/epp-client/src/host/check.rs index 8c07ed3..e6bfda3 100644 --- a/epp-client/src/host/check.rs +++ b/epp-client/src/host/check.rs @@ -31,7 +31,7 @@ impl EppRequest for HostCheck { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::host::check::HostCheck; /// use epp_client::generate_client_tr_id; @@ -40,10 +40,10 @@ impl EppRequest for HostCheck { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/host/create.rs b/epp-client/src/host/create.rs index 16a5df9..bbc0805 100644 --- a/epp-client/src/host/create.rs +++ b/epp-client/src/host/create.rs @@ -29,7 +29,7 @@ impl EppRequest for HostCreate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::HostAddr; /// use epp_client::host::create::HostCreate; @@ -39,10 +39,10 @@ impl EppRequest for HostCreate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/host/delete.rs b/epp-client/src/host/delete.rs index 7a5780e..5d7a88f 100644 --- a/epp-client/src/host/delete.rs +++ b/epp-client/src/host/delete.rs @@ -30,7 +30,7 @@ impl EppRequest for HostDelete { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::host::delete::HostDelete; /// use epp_client::generate_client_tr_id; @@ -39,10 +39,10 @@ impl EppRequest for HostDelete { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/host/info.rs b/epp-client/src/host/info.rs index 29dbd73..3f6759c 100644 --- a/epp-client/src/host/info.rs +++ b/epp-client/src/host/info.rs @@ -29,7 +29,7 @@ impl EppRequest for HostInfo { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::host::info::HostInfo; /// use epp_client::generate_client_tr_id; @@ -38,10 +38,10 @@ impl EppRequest for HostInfo { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/host/update.rs b/epp-client/src/host/update.rs index 5b1c42e..c689fb6 100644 --- a/epp-client/src/host/update.rs +++ b/epp-client/src/host/update.rs @@ -30,7 +30,7 @@ impl EppRequest for HostUpdate { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::common::{HostAddr, HostStatus}; /// use epp_client::host::update::{HostUpdate, HostAddRemove, HostChangeInfo}; @@ -40,10 +40,10 @@ impl EppRequest for HostUpdate { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/lib.rs b/epp-client/src/lib.rs index 4295cd3..1927a8d 100644 --- a/epp-client/src/lib.rs +++ b/epp-client/src/lib.rs @@ -41,7 +41,7 @@ //! ```no_run //! use std::collections::HashMap; //! -//! use epp_client::config::{EppClientConfig, EppClientConnection}; +//! use epp_client::config::{EppClientConfig, RegistryConfig}; //! use epp_client::EppClient; //! use epp_client::domain::check::DomainCheck; //! use epp_client::generate_client_tr_id; @@ -51,10 +51,10 @@ //! async fn main() { //! //! // Create a config -//! let mut registry: HashMap = HashMap::new(); +//! let mut registry: HashMap = HashMap::new(); //! registry.insert( //! "registry_name".to_owned(), -//! EppClientConnection { +//! RegistryConfig { //! host: "example.com".to_owned(), //! port: 700, //! username: "username".to_owned(), diff --git a/epp-client/src/message/ack.rs b/epp-client/src/message/ack.rs index c744757..ad2cc20 100644 --- a/epp-client/src/message/ack.rs +++ b/epp-client/src/message/ack.rs @@ -27,7 +27,7 @@ impl EppRequest for MessageAck { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::message::ack::MessageAck; /// use epp_client::generate_client_tr_id; @@ -36,10 +36,10 @@ impl EppRequest for MessageAck { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/message/poll.rs b/epp-client/src/message/poll.rs index 132b68f..fe64c2a 100644 --- a/epp-client/src/message/poll.rs +++ b/epp-client/src/message/poll.rs @@ -28,7 +28,7 @@ impl EppRequest for MessagePoll { /// ```no_run /// use std::collections::HashMap; /// -/// use epp_client::config::{EppClientConfig, EppClientConnection}; +/// use epp_client::config::{EppClientConfig, RegistryConfig}; /// use epp_client::EppClient; /// use epp_client::message::poll::MessagePoll; /// use epp_client::generate_client_tr_id; @@ -37,10 +37,10 @@ impl EppRequest for MessagePoll { /// #[tokio::main] /// async fn main() { /// // Create a config -/// let mut registry: HashMap = HashMap::new(); +/// let mut registry: HashMap = HashMap::new(); /// registry.insert( /// "registry_name".to_owned(), -/// EppClientConnection { +/// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, /// username: "username".to_owned(), diff --git a/epp-client/src/registry.rs b/epp-client/src/registry.rs index 3b8f9cf..50c4025 100644 --- a/epp-client/src/registry.rs +++ b/epp-client/src/registry.rs @@ -13,7 +13,7 @@ use rustls_pemfile; use tokio::{io::AsyncReadExt, io::AsyncWriteExt, net::TcpStream}; use tokio_rustls::{client::TlsStream, rustls::ClientConfig, TlsConnector}; -use crate::config::EppClientConnection; +use crate::config::RegistryConfig; use crate::error; /// EPP Connection struct with some metadata for the connection @@ -118,7 +118,7 @@ impl EppConnection { /// Establishes a TLS connection to a registry and returns a ConnectionStream instance containing the /// socket stream to read/write to the connection pub async fn epp_connect( - registry_creds: &EppClientConnection, + registry_creds: &RegistryConfig, ) -> Result, error::Error> { info!( "Connecting: EPP Server: {} Port: {}",