Skip to content

togo-framework/dns-cloudflare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

togo

togo-framework/dns-cloudflare

Cloudflare authoritative-DNS driver for togo dns.

marketplace pkg.go.dev MIT

Part of the togo framework.

Install

togo install togo-framework/dns-cloudflare

Cloudflare authoritative-DNS driver for togo's dns subsystem. Manages records over the Cloudflare v4 API (token auth).

Config

Env Meaning
DNS_DRIVER set to cloudflare
CLOUDFLARE_API_TOKEN API token with DNS:Edit on the zone (required)
CLOUDFLARE_ZONE_ID default zone id (optional — can pass per call)
svc, _ := dns.FromKernel(k)
svc.UpsertRecord(ctx, "", dns.Record{Type: "A", Name: "app", Content: "203.0.113.10", Proxied: true})

UpsertRecord is idempotent: it updates an existing record of the same type+name, otherwise creates one. Proxy hosts / gateway routes return dns.ErrUnsupported.


Premium sponsors

ID8 Media  ·  One Studio

Support togo — become a sponsor.

Sponsor this project

 

Packages

 
 
 

Contributors

Languages