Expand description
§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 (RFC 5730). It supports the following basic management requests.
Typically, you will start by initializing an EppClient
instance, which will connect to the EPP server.
From there, you can submit requests using EppClient::transact()
.
§Core requests
§Domains
Specified in RFC 5731.
domain::DomainCheck
domain::DomainCreate
domain::DomainInfo
domain::DomainUpdate
domain::DomainRenew
domain::DomainTransfer
domain::DomainDelete
§Contacts
Specified in RFC 5732.
contact::ContactCheck
contact::ContactCreate
contact::ContactInfo
contact::ContactUpdate
contact::ContactDelete
§Hosts
Specified in RFC 5733.
§Extensions
extensions::rgp::report::RgpRestoreReport
extensions::rgp::request::RgpRestoreRequest
extensions::namestore::NameStore
extensions::consolidate::Update
§Operation
use std::net::ToSocketAddrs;
use std::time::Duration;
use epp_client::EppClient;
use epp_client::domain::DomainCheck;
use epp_client::login::Login;
#[tokio::main]
async fn main() {
// Create an instance of EppClient
let timeout = Duration::from_secs(5);
let mut client = match EppClient::connect("registry_name".to_string(), ("example.com".to_owned(), 7000), None, timeout).await {
Ok(client) => client,
Err(e) => panic!("Failed to create EppClient: {}", e)
};
let login = Login::new("username", "password", None, None);
client.transact(&login, "transaction-id").await.unwrap();
// Execute an EPP Command against the registry with distinct request and response objects
let domain_check = DomainCheck { domains: &["eppdev.com", "eppdev.net"] };
let response = client.transact(&domain_check, "transaction-id").await.unwrap();
response.res_data.unwrap().list
.iter()
.for_each(|chk| println!("Domain: {}, Available: {}", chk.id, chk.available));
}
The output would look similar to the following
Domain: eppdev.com, Available: 1
Domain: eppdev.net, Available: 1
Re-exports§
pub use client::EppClient;
Modules§
- client
- common
- Common data types included in EPP Requests and Responses
- connection
- Manages registry connections and reading/writing to them
- contact
- domain
- extensions
- hello
- host
- login
- logout
- message
- request
- Types for EPP requests
- response
- Types for EPP responses
- xml
- Types to use in serialization to and deserialization from EPP XML
Enums§
- Error
- Error enum holding the possible error types