diff --git a/models/dns.go b/models/dns.go index 2096d880f..92f6e1b87 100644 --- a/models/dns.go +++ b/models/dns.go @@ -61,25 +61,38 @@ type DNSProviderConfig struct { // This is the FQDN version of Name. // It should never have a trailiing ".". // Valid types: -// A -// AAAA -// ANAME -// CAA -// CNAME -// MX -// NS -// SRV -// TXT -// PAGE_RULE // pseudo rtype -// TODO(tal): Add all the pseudo types +// Official: +// A +// AAAA +// ANAME +// CAA +// CNAME +// MX +// NS +// PTR +// SRV +// TLSA +// TXT +// Pseudo-Types: +// ALIAs +// CF_REDIRECT +// CF_TEMP_REDIRECT +// FRAME +// IMPORT_TRANSFORM +// NAMESERVER +// NO_PURGE +// PAGE_RULE +// PURGE +// URL +// URL301 type RecordConfig struct { Type string `json:"type"` Name string `json:"name"` // The short name. See below. Target string `json:"target"` // If a name, must end with "." TTL uint32 `json:"ttl,omitempty"` Metadata map[string]string `json:"meta,omitempty"` - NameFQDN string `json:"-"` // Must end with ".$origin". See below. - MxPreference uint16 `json:"mxpreference,omitempty"` // FIXME(tlim): Rename to MxPreference + NameFQDN string `json:"-"` // Must end with ".$origin". See below. + MxPreference uint16 `json:"mxpreference,omitempty"` SrvPriority uint16 `json:"srvpriority,omitempty"` SrvWeight uint16 `json:"srvweight,omitempty"` SrvPort uint16 `json:"srvport,omitempty"` diff --git a/providers/bind/bindProvider.go b/providers/bind/bindProvider.go index 5ea433837..d8d6bdc33 100644 --- a/providers/bind/bindProvider.go +++ b/providers/bind/bindProvider.go @@ -56,8 +56,13 @@ func initBind(config map[string]string, providermeta json.RawMessage) (providers } func init() { - providers.RegisterDomainServiceProviderType("BIND", initBind, providers.CanUsePTR, - providers.CanUseSRV, providers.CanUseCAA, providers.CanUseTLSA, providers.CantUseNOPURGE, docNotes) + providers.RegisterDomainServiceProviderType("BIND", initBind, + providers.CanUsePTR, + providers.CanUseSRV, + providers.CanUseCAA, + providers.CanUseTLSA, + providers.CantUseNOPURGE, + docNotes) } type SoaInfo struct { diff --git a/providers/capabilities.go b/providers/capabilities.go index e3cf95d74..e9261c85a 100644 --- a/providers/capabilities.go +++ b/providers/capabilities.go @@ -8,17 +8,23 @@ import ( type Capability uint32 const ( - // CanUseAlias indicates the provider support ALIAS records (or flattened CNAMES). Up to the provider to translate them to the appropriate record type. // If you add something to this list, you probably want to add it to pkg/normalize/validate.go checkProviderCapabilities() or somewhere near there. + + // CanUseAlias indicates the provider support ALIAS records (or flattened CNAMES). Up to the provider to translate them to the appropriate record type. CanUseAlias Capability = iota + // CanUsePTR indicates the provider can handle PTR records CanUsePTR + // CanUseSRV indicates the provider can handle SRV records CanUseSRV + // CanUseCAA indicates the provider can handle CAA records CanUseCAA + // CanUseTLSA indicates the provider can handle TLSA records CanUseTLSA + // CantUseNOPURGE indicates NO_PURGE is broken for this provider. To make it // work would require complex emulation of an incremental update mechanism, // so it is easier to simply mark this feature as not working for this