Documentation
¶
Index ¶
- Variables
- func FormatHostForProvider(provider ProviderRules, host string) string
- func GenerateQuickReference(domain string, cfDomain string, records []ValidationRecord) string
- func GenerateServerlessGuide(domain string, cfDomain string, records []ValidationRecord) error
- func GenerateVPSGuide(domain string, serverIP string) error
- type ProviderRules
- type RoutingRecord
- type ValidationRecord
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Namecheap specific rules NamecheapRules = ProviderRules{ Name: "Namecheap", HostFormat: func(host string) string { host = strings.TrimSuffix(host, ".") if strings.Contains(host, ".") { parts := strings.SplitN(host, ".", 2) return parts[0] } return host }, NeedsTrailingDot: false, Notes: []string{ "NEVER include your domain name in the Host field", "For www SSL records: include '.www' in Host (e.g., '_hash.www')", "Root domain uses '@' or leave blank", "TTL can be left as 'Automatic'", }, } // Cloudflare specific rules CloudflareRules = ProviderRules{ Name: "Cloudflare", HostFormat: func(host string) string { return strings.TrimSuffix(host, ".") }, NeedsTrailingDot: false, Notes: []string{ "Set proxy status to DNS only (gray cloud) for SSL validation records", "Orange cloud (proxied) can be used for root/www AFTER SSL is issued", }, } // GoDaddy specific rules GoDaddyRules = ProviderRules{ Name: "GoDaddy", HostFormat: func(host string) string { return strings.TrimSuffix(host, ".") }, NeedsTrailingDot: false, Notes: []string{ "Points to field should NOT have trailing dot", "Use '@' for root domain", }, } )
Functions ¶
func FormatHostForProvider ¶
func FormatHostForProvider(provider ProviderRules, host string) string
FormatHostForProvider formats a host value according to provider rules
func GenerateQuickReference ¶
func GenerateQuickReference(domain string, cfDomain string, records []ValidationRecord) string
GenerateQuickReference generates a quick reference table for all records
func GenerateServerlessGuide ¶
func GenerateServerlessGuide(domain string, cfDomain string, records []ValidationRecord) error
GenerateServerlessGuide creates a comprehensive dns.md file for AWS Serverless deployments
func GenerateVPSGuide ¶
GenerateVPSGuide creates a dns.md file for VPS deployments
Types ¶
type ProviderRules ¶
type ProviderRules struct {
Name string
HostFormat func(host string) string // How to format the host field
NeedsTrailingDot bool // Whether values need trailing dots
Notes []string
}
Provider-specific formatting rules
type RoutingRecord ¶
type RoutingRecord struct {
Host string // "@", "www", or subdomain
Value string // Target (CloudFront domain or IP)
Type string // "CNAME" or "A"
}
RoutingRecord represents a traffic routing record
type ValidationRecord ¶
type ValidationRecord struct {
Name string // The host/subdomain part (e.g., "_5f2eb7..." or "_5ab8c33.www")
Value string // The target validation URL
Domain string // The full domain this record is for
}
ValidationRecord represents an SSL validation CNAME record
Click to show internal directories.
Click to hide internal directories.