Expand description
DNS provider domain — the pleme/dns surface.
Provides the slash-named functions every lareira-dns-reconciler
computeunit calls:
(dns/upsert :provider :route53 :zone-id Z :credentials C :record-type :CNAME :name “x.quero.lol” :value “lb…” :ttl 60 :proxied false) → {:status “ok” …} (dns/delete :provider … :zone-id … :credentials … :record-type … :name … :value … :ttl …) → {:status “ok” …} (dns/list :provider … :zone-id … :credentials …) → ((…) (…) …)
Two providers are wired end to end:
:cloudflare— REST overapi.cloudflare.com/client/v4, Bearer token auth (creds keyapi-token/token). JSON wire format.:route53—ChangeResourceRecordSets/ListResourceRecordSetsoverroute53.amazonaws.com, AWS SigV4 request signing (creds keysaccess-key-id+secret-access-key, optionalsession-token+region). XML wire format, built through a typed [ChangeBatch]Displayimpl — neverformat!()-of-XML.
:hetzner / :gcp are declared in the reconciler’s provider enum but
return a typed unimplemented provider error here — never a silent
wrong answer (org CLAUDE.md TYPED-SPEC rule).
§Testability
All network egress goes through the DnsTransport trait — the
Environment seam from the org CLAUDE.md typed-spec-triplet rule. The
production impl (UreqTransport) wraps the shared ureq::Agent;
tests drive a [MockTransport] that records the request and returns a
canned response, so every provider path + the SigV4 signer is unit
tested with zero network. The signer is validated against AWS’s
published GET-vanilla example vector.
Structs§
- AmzDate
- AWS request date in the two forms SigV4 needs:
YYYYMMDD(scope) andYYYYMMDDTHHMMSSZ(x-amz-date). Built from a Unix timestamp with a pure civil-date conversion so it’s deterministic + test-vector-able. - Change
Request - Credentials
- Provider-agnostic credentials, parsed from the
:credentialsmap a computeunit gets from(k8s/read-secret …). - Http
Request - Http
Response - Outcome
- Result returned to Lisp as a map.
- Record
- A single record returned by
dns/list. - Sigv4
- All inputs needed to sign one request. Pure — no IO — so it is unit tested against AWS’s published example vector.
- Ureq
Transport - Production transport — borrows a clone of the script’s shared agent.
Enums§
Traits§
- DnsTransport
- The single egress point every provider funnels through. Mockable in
tests; the production impl is
UreqTransport.