DNS record management with pluggable provider backends (GoDaddy, etc.)
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/dns |
| Edition | 2021 |
| Targets | infrastructure_dns |
| Public items | 10 across 1 module |
| Tests | 11 |
What it is for
DNS record management with pluggable provider backends.
Operations are modeled around RRsets (Resource Record Sets) — all records sharing a type+name pair. This matches DNS semantics and avoids dangerous zone-wide replacement operations.
# Providers
GodaddyProvider—GoDaddyREST API
# Example
use infrastructure_dns::{DnsProvider, GodaddyProvider, DnsRecordInput, RecordType};
let provider = GodaddyProvider::new("api_key", "api_secret");
// Always snapshot before mutations
let backup = provider.snapshot("example.com").await?;
// Replace the A record for apex
provider.replace_rrset(
"example.com",
RecordType::A,
"@",
vecDnsRecordInput {
data: "1.2.3.4".to_string(),
ttl: Some(600),
priority: None,
weight: None,
port: None,
},
).await?;
Capabilities
GodaddyProvider
GoDaddy DNS provider implementation.
| Item |
|---|
pub struct GodaddyProvider |
GodaddyProvider :: fn new(api_key : impl Into <String>, api_secret : impl Into <String>) -> Self |
GodaddyProvider :: fn new_ote(api_key : impl Into <String>, api_secret : impl Into <String>) -> Self |
GodaddyProvider :: async fn list_records(& self, domain : & str) -> Result <Vec <DnsRecord>, DnsError> |
GodaddyProvider :: async fn get_rrset(& self, domain : & str, record_type : RecordType, name : & str,) -> Result <Vec <DnsRecord>, DnsError> |
GodaddyProvider :: async fn replace_rrset(& self, domain : & str, record_type : RecordType, name : & str, records : Vec <DnsRecordInput>,) -> Result <(), DnsError> |
GodaddyProvider :: async fn append_records(& self, domain : & str, records : Vec <(RecordType, String, DnsRecordInput)>,) -> Result <(), DnsError> |
GodaddyProvider :: async fn delete_rrset(& self, domain : & str, record_type : RecordType, name : & str,) -> Result <(), DnsError> |
GodaddyProvider :: async fn verify_authority(& self, domain : & str) -> Result <AuthorityStatus, DnsError> |
GodaddyRecord
GoDaddy DNS provider implementation.
| Item |
|---|
GodaddyRecord :: fn from(input : & DnsRecordInput) -> Self |
How to use it
From this crate's own rustdoc:
use infrastructure_dns::{DnsProvider, GodaddyProvider, DnsRecordInput, RecordType};
let provider = GodaddyProvider::new("api_key", "api_secret");
// Always snapshot before mutations
let backup = provider.snapshot("example.com").await?;
// Replace the A record for apex
provider.replace_rrset(
"example.com",
RecordType::A,
"@",
vec![DnsRecordInput {
data: "1.2.3.4".to_string(),
ttl: Some(600),
priority: None,
weight: None,
port: None,
}],
).await?;
Module structure
infrastructure_dns
godaddy
Public surface
`godaddy`
| Item | What it is |
|---|---|
pub struct GodaddyProvider | GoDaddy DNS provider. |
GodaddyProvider :: fn new(api_key : impl Into <String>, api_secret : impl Into <String>) -> Self | Create a new GoDaddy provider for the production API. |
GodaddyProvider :: fn new_ote(api_key : impl Into <String>, api_secret : impl Into <String>) -> Self | Create a provider pointing to GoDaddy's OTE (test) environment. |
GodaddyRecord :: fn from(input : & DnsRecordInput) -> Self | — |
GodaddyProvider :: async fn list_records(& self, domain : & str) -> Result <Vec <DnsRecord>, DnsError> | — |
GodaddyProvider :: async fn get_rrset(& self, domain : & str, record_type : RecordType, name : & str,) -> Result <Vec <DnsRecord>, DnsError> | — |
GodaddyProvider :: async fn replace_rrset(& self, domain : & str, record_type : RecordType, name : & str, records : Vec <DnsRecordInput>,) -> Result <(), DnsError> | — |
GodaddyProvider :: async fn append_records(& self, domain : & str, records : Vec <(RecordType, String, DnsRecordInput)>,) -> Result <(), DnsError> | — |
GodaddyProvider :: async fn delete_rrset(& self, domain : & str, record_type : RecordType, name : & str,) -> Result <(), DnsError> | — |
GodaddyProvider :: async fn verify_authority(& self, domain : & str) -> Result <AuthorityStatus, DnsError> | — |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
DnsError | error::DnsError |
DnsProvider | backend::DnsProvider |
GodaddyProvider | godaddy::GodaddyProvider |
{AuthorityStatus,DnsRecord,DnsRecordInput,DnsSnapshot,RecordType} | models::{AuthorityStatus,DnsRecord,DnsRecordInput,DnsSnapshot,RecordType} |
Boundary
Depends on no other workspace tier.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/dns |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
async-trait | ^0.1 | — | no | always |
chrono | ^0.4 | serde | no | always |
reqwest | ^0.12 | json, rustls-tls | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full | no | always |
tracing | ^0.1 | — | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_dns["application-dns"] -->|uses| SELF SELF["infrastructure-dns"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_dns | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | yes |
| database access | none detected |
| network I/O | yes |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: application-dns.
Verification
| Kind | Count |
|---|---|
| Unit tests | 11 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 1 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
godaddy | 1 | 0 | 1 |
What the tests establish, by name:
test_authority_status_variants—src/godaddy.rstest_dns_record_display—src/godaddy.rstest_dns_record_display_with_priority—src/godaddy.rstest_dns_record_input_default_ttl—src/godaddy.rstest_dns_record_input_to_godaddy—src/godaddy.rstest_dns_snapshot_serialization—src/godaddy.rstest_godaddy_record_into_dns_record—src/godaddy.rstest_godaddy_record_unknown_type—src/godaddy.rstest_record_type_display—src/godaddy.rstest_record_type_parse—src/godaddy.rstest_srv_record_display—src/godaddy.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 3 | 10 |
Public modules with a //! block | 1 | 1 |
pie showData
title Public items with rustdoc
"Documented" : 3
"No rustdoc detected" : 7
Metrics
| Metric | Value |
|---|---|
| Rust source files | 5 |
| Source lines | 861 |
| Code lines | 608 |
| Public API items | 10 |
| Public modules | 1 |
| Tests | 11 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 8 |
| Workspace reverse dependencies | 1 |
pie showData
title Public API by kind
"method" : 9
"struct" : 1
pie showData
title Rust source composition
"Code" : 608
"Blank or comment" : 253
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.