infrastructure tier

infrastructure-dns

DNS record management with pluggable provider backends (GoDaddy, etc.)

DNS record management with pluggable provider backends (GoDaddy, etc.)

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/dns
Edition2021
Targetsinfrastructure_dns
Public items10 across 1 module
Tests11

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

# 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

Public surface

`godaddy`

ItemWhat it is
pub struct GodaddyProviderGoDaddy DNS provider.
GodaddyProvider :: fn new(api_key : impl Into <String>, api_secret : impl Into <String>) -> SelfCreate a new GoDaddy provider for the production API.
GodaddyProvider :: fn new_ote(api_key : impl Into <String>, api_secret : impl Into <String>) -> SelfCreate 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.

ExportDefined in
DnsErrorerror::DnsError
DnsProviderbackend::DnsProvider
GodaddyProvidergodaddy::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)
Locationcrates/infrastructure/dns
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
reqwest^0.12json, rustls-tlsnoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tokio^1fullnoalways
tracing^0.1noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio-test^0.4noalways

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

KindNameSource
libinfrastructure_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

PropertyEvidence
async public surfaceyes
async runtimeyes
database accessnone detected
network I/Oyes
unsafe codenone detected
environment variablesnone 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.

1 workspace crate depends on this one: application-dns.

Verification

KindCount
Unit tests11
Integration tests0
Examples0
Doctests1

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
godaddy101

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc310
Public modules with a //! block11
pie showData
    title Public items with rustdoc
    "Documented" : 3
    "No rustdoc detected" : 7

Metrics

MetricValue
Rust source files5
Source lines861
Code lines608
Public API items10
Public modules1
Tests11
Examples0
Cargo features0
Direct runtime dependencies8
Workspace reverse dependencies1
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.

All infrastructure · Manual