mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-23 07:03:01 +08:00
docs: Improve comments related to capabilities. (#287)
This commit is contained in:
parent
c520471ab7
commit
48de548826
3 changed files with 40 additions and 16 deletions
|
@ -61,25 +61,38 @@ type DNSProviderConfig struct {
|
||||||
// This is the FQDN version of Name.
|
// This is the FQDN version of Name.
|
||||||
// It should never have a trailiing ".".
|
// It should never have a trailiing ".".
|
||||||
// Valid types:
|
// Valid types:
|
||||||
// A
|
// Official:
|
||||||
// AAAA
|
// A
|
||||||
// ANAME
|
// AAAA
|
||||||
// CAA
|
// ANAME
|
||||||
// CNAME
|
// CAA
|
||||||
// MX
|
// CNAME
|
||||||
// NS
|
// MX
|
||||||
// SRV
|
// NS
|
||||||
// TXT
|
// PTR
|
||||||
// PAGE_RULE // pseudo rtype
|
// SRV
|
||||||
// TODO(tal): Add all the pseudo types
|
// 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 RecordConfig struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Name string `json:"name"` // The short name. See below.
|
Name string `json:"name"` // The short name. See below.
|
||||||
Target string `json:"target"` // If a name, must end with "."
|
Target string `json:"target"` // If a name, must end with "."
|
||||||
TTL uint32 `json:"ttl,omitempty"`
|
TTL uint32 `json:"ttl,omitempty"`
|
||||||
Metadata map[string]string `json:"meta,omitempty"`
|
Metadata map[string]string `json:"meta,omitempty"`
|
||||||
NameFQDN string `json:"-"` // Must end with ".$origin". See below.
|
NameFQDN string `json:"-"` // Must end with ".$origin". See below.
|
||||||
MxPreference uint16 `json:"mxpreference,omitempty"` // FIXME(tlim): Rename to MxPreference
|
MxPreference uint16 `json:"mxpreference,omitempty"`
|
||||||
SrvPriority uint16 `json:"srvpriority,omitempty"`
|
SrvPriority uint16 `json:"srvpriority,omitempty"`
|
||||||
SrvWeight uint16 `json:"srvweight,omitempty"`
|
SrvWeight uint16 `json:"srvweight,omitempty"`
|
||||||
SrvPort uint16 `json:"srvport,omitempty"`
|
SrvPort uint16 `json:"srvport,omitempty"`
|
||||||
|
|
|
@ -56,8 +56,13 @@ func initBind(config map[string]string, providermeta json.RawMessage) (providers
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
providers.RegisterDomainServiceProviderType("BIND", initBind, providers.CanUsePTR,
|
providers.RegisterDomainServiceProviderType("BIND", initBind,
|
||||||
providers.CanUseSRV, providers.CanUseCAA, providers.CanUseTLSA, providers.CantUseNOPURGE, docNotes)
|
providers.CanUsePTR,
|
||||||
|
providers.CanUseSRV,
|
||||||
|
providers.CanUseCAA,
|
||||||
|
providers.CanUseTLSA,
|
||||||
|
providers.CantUseNOPURGE,
|
||||||
|
docNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SoaInfo struct {
|
type SoaInfo struct {
|
||||||
|
|
|
@ -8,17 +8,23 @@ import (
|
||||||
type Capability uint32
|
type Capability uint32
|
||||||
|
|
||||||
const (
|
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.
|
// 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
|
CanUseAlias Capability = iota
|
||||||
|
|
||||||
// CanUsePTR indicates the provider can handle PTR records
|
// CanUsePTR indicates the provider can handle PTR records
|
||||||
CanUsePTR
|
CanUsePTR
|
||||||
|
|
||||||
// CanUseSRV indicates the provider can handle SRV records
|
// CanUseSRV indicates the provider can handle SRV records
|
||||||
CanUseSRV
|
CanUseSRV
|
||||||
|
|
||||||
// CanUseCAA indicates the provider can handle CAA records
|
// CanUseCAA indicates the provider can handle CAA records
|
||||||
CanUseCAA
|
CanUseCAA
|
||||||
|
|
||||||
// CanUseTLSA indicates the provider can handle TLSA records
|
// CanUseTLSA indicates the provider can handle TLSA records
|
||||||
CanUseTLSA
|
CanUseTLSA
|
||||||
|
|
||||||
// CantUseNOPURGE indicates NO_PURGE is broken for this provider. To make it
|
// CantUseNOPURGE indicates NO_PURGE is broken for this provider. To make it
|
||||||
// work would require complex emulation of an incremental update mechanism,
|
// work would require complex emulation of an incremental update mechanism,
|
||||||
// so it is easier to simply mark this feature as not working for this
|
// so it is easier to simply mark this feature as not working for this
|
||||||
|
|
Loading…
Reference in a new issue