docs: Improve comments related to capabilities. (#287)

This commit is contained in:
Tom Limoncelli 2017-12-21 09:43:21 -05:00 committed by Craig Peterson
parent c520471ab7
commit 48de548826
3 changed files with 40 additions and 16 deletions

View file

@ -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"`

View file

@ -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 {

View file

@ -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