Documentation
¶
Overview ¶
Package dns provides DNS record formatting and display utilities.
This package handles the formatting and display of DNS records required for AhaSend domain verification across different DNS providers and formats:
- DNS record parsing from AhaSend domain responses
- Multi-format output (BIND, Cloudflare, Terraform)
- Interactive DNS configuration instructions
- Provider-specific formatting and syntax
- Copy-paste friendly record formats
The package supports common DNS providers and infrastructure-as-code tools, making it easy for users to configure their domains regardless of their DNS setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Formats = []string{"bind", "cloudflare", "terraform"}
Formats are the provider formats FormatDNSRecordsForProvider writes.
Functions ¶
func FormatDNSRecordsForProvider ¶ added in v0.3.0
FormatDNSRecordsForProvider formats each record in provider, one of Formats. Terraform resources get labels unique among records.
func PrintDNSInstructions ¶
func PrintDNSInstructions(w io.Writer, recordSet *DNSRecordSet)
PrintDNSInstructions writes DNS configuration instructions to w
func ProviderComment ¶ added in v0.3.0
ProviderComment returns the comment line that goes before record in provider, one of Formats: whether the record is optional or required, with its note, or "" for a required record without a note. Bind comments start with ";", the others with "#".
Types ¶
type DNSRecord ¶
type DNSRecord struct {
Type string
Name string
Value string
TTL int
// Required is whether the domain needs the record to send email. An
// optional record enables a feature.
Required bool
// Note says what an optional record is for, or how to add a required
// record of a kind a name can have only one of; "" when there is
// nothing to say.
Note string
}
DNSRecord represents a DNS record with formatting options
type DNSRecordSet ¶
DNSRecordSet represents a collection of DNS records for a domain
func FormatDNSRecords ¶
func FormatDNSRecords(domain *responses.Domain) *DNSRecordSet
FormatDNSRecords formats DNS records for display