mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-16 05:42:04 +08:00
MAINT: Sort various lists (#1433)
* maint: sort lists in build/generate/featureMatrix.go * maint: sort lists in docs/byo-secrets.md * maint: sort lists in models/record.go * maint: sort lists in pkg/normalize/validate.go * maint: sort lists in providers/activedir/activedirProvider.go * maint: sort lists in providers/akamaiedgedns/akamaiEdgeDnsProvider.go * maint: sort lists in providers/axfrddns/axfrddnsProvider.go * maint: sort lists in providers/azuredns/azureDnsProvider.go * maint: sort lists in providers/cloudflare/cloudflareProvider.go * maint: sort lists in providers/cloudns/cloudnsProvider.go * maint: sort lists in providers/desec/desecProvider.go * maint: sort lists in providers/digitalocean/digitaloceanProvider.go * maint: sort lists in providers/dnsimple/dnsimpleProvider.go * maint: sort lists in providers/dnsmadeeasy/dnsMadeEasyProvider.go * maint: sort lists in providers/exoscale/exoscaleProvider.go * maint: sort lists in providers/gandiv5/gandi_v5Provider.go * maint: sort lists in providers/hedns/hednsProvider.go * maint: sort lists in providers/hetzner/hetznerProvider.go * maint: sort lists in providers/hexonet/hexonetProvider.go * maint: sort lists in providers/inwx/inwxProvider.go * maint: sort lists in providers/linode/linodeProvider.go * maint: sort lists in providers/namecheap/namecheapProvider.go * maint: sort lists in providers/namedotcom/namedotcomProvider.go * maint: sort lists in providers/netcup/netcupProvider.go * maint: sort lists in providers/ns1/ns1Provider.go * maint: sort lists in providers/octodns/octodnsProvider.go * maint: sort lists in providers/oracle/oracleProvider.go * maint: sort lists in providers/ovh/ovhProvider.go * maint: sort lists in providers/packetframe/packetframeProvider.go * maint: sort lists in providers/powerdns/powerdnsProvider.go * maint: sort lists in providers/route53/route53Provider.go * maint: sort lists in providers/vultr/vultrProvider.go * Update go:build pragmas for windows * More sorting * go generate
This commit is contained in:
parent
fc75f89271
commit
444b893e1b
41 changed files with 224 additions and 216 deletions
|
|
@ -78,22 +78,22 @@ func generateFeatureMatrix() error {
|
|||
setDoc("Official Support", providers.DocOfficiallySupported, true)
|
||||
fm.SetSimple("DNS Provider", false, func() bool { return providers.DNSProviderTypes[p].Initializer != nil })
|
||||
fm.SetSimple("Registrar", false, func() bool { return providers.RegistrarTypes[p] != nil })
|
||||
setCap("AKAMAICDN", providers.CanUseAKAMAICDN)
|
||||
setCap("ALIAS", providers.CanUseAlias)
|
||||
setCap("AUTODNSSEC", providers.CanAutoDNSSEC)
|
||||
setCap("AZURE_ALIAS", providers.CanUseAzureAlias)
|
||||
setCap("CAA", providers.CanUseCAA)
|
||||
setCap("DS", providers.CanUseDS)
|
||||
setCap("NAPTR", providers.CanUseNAPTR)
|
||||
setCap("PTR", providers.CanUsePTR)
|
||||
setCap("R53_ALIAS", providers.CanUseRoute53Alias)
|
||||
setCap("AZURE_ALIAS", providers.CanUseAzureAlias)
|
||||
setCap("SOA", providers.CanUseSOA)
|
||||
setCap("SRV", providers.CanUseSRV)
|
||||
setCap("SSHFP", providers.CanUseSSHFP)
|
||||
setCap("TLSA", providers.CanUseTLSA)
|
||||
setCap("AKAMAICDN", providers.CanUseAKAMAICDN)
|
||||
setCap("get-zones", providers.CanGetZones)
|
||||
setCap("DS", providers.CanUseDS)
|
||||
setDoc("dual host", providers.DocDualHost, false)
|
||||
setDoc("create-domains", providers.DocCreateDomains, true)
|
||||
setDoc("dual host", providers.DocDualHost, false)
|
||||
|
||||
// no purge is a freaky double negative
|
||||
cap := providers.CantUseNOPURGE
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ In this branch, edit `.github/workflows/build.yml`:
|
|||
provider:
|
||||
...
|
||||
- DIGITALOCEAN
|
||||
- GANDI_V5
|
||||
- FANCYDNS <<< NEW ITEM ADDED HERE
|
||||
- GANDI_V5
|
||||
- INWX
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//go:build js
|
||||
// +build js
|
||||
|
||||
package main
|
||||
|
|
|
|||
|
|
@ -1027,11 +1027,11 @@ func makeTests(t *testing.T) []*TestGroup {
|
|||
// - Gandi: page size is 100, therefore we test with 99, 100, and 101
|
||||
// - DIGITALOCEAN: page size is 100 (default: 20)
|
||||
not(
|
||||
"NS1", // Free acct only allows 50 records, therefore we skip
|
||||
"CLOUDFLAREAPI", // Infinite pagesize but due to slow speed, skipping.
|
||||
"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
|
||||
"MSDNS", // No paging done. No need to test.
|
||||
"NAMEDOTCOM", // Their API is so damn slow. We'll add it back as needed.
|
||||
"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
|
||||
"NS1", // Free acct only allows 50 records, therefore we skip
|
||||
),
|
||||
tc("99 records", manyA("rec%04d", "1.2.3.4", 99)...),
|
||||
tc("100 records", manyA("rec%04d", "1.2.3.4", 100)...),
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
// RecordConfig stores a DNS record.
|
||||
// Valid types:
|
||||
// Official:
|
||||
// Official: (alphabetical)
|
||||
// A
|
||||
// AAAA
|
||||
// ANAME // Technically not an official rtype yet.
|
||||
|
|
@ -25,27 +25,27 @@ import (
|
|||
// NAPTR
|
||||
// NS
|
||||
// PTR
|
||||
// SRV
|
||||
// SOA
|
||||
// SRV
|
||||
// SSHFP
|
||||
// TLSA
|
||||
// TXT
|
||||
// Pseudo-Types:
|
||||
// Pseudo-Types: (alphabetical)
|
||||
// ALIAS
|
||||
// CF_REDIRECT
|
||||
// CF_TEMP_REDIRECT
|
||||
// CF_WORKER_ROUTE
|
||||
// CLOUDNS_WR
|
||||
// FRAME
|
||||
// IMPORT_TRANSFORM
|
||||
// NAMESERVER
|
||||
// NO_PURGE
|
||||
// NS1_URLFWD
|
||||
// PAGE_RULE
|
||||
// WORKER_ROUTE
|
||||
// PURGE
|
||||
// URL
|
||||
// URL301
|
||||
// CLOUDNS_WR
|
||||
// WORKER_ROUTE
|
||||
//
|
||||
// Notes about the fields:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ func (rc *RecordConfig) PopulateFromString(rtype, contents, origin string) error
|
|||
return rc.SetTargetMXString(contents)
|
||||
case "NAPTR":
|
||||
return rc.SetTargetNAPTRString(contents)
|
||||
case "SRV":
|
||||
return rc.SetTargetSRVString(contents)
|
||||
case "SOA":
|
||||
return rc.SetTargetSOAString(contents)
|
||||
case "SPF", "TXT":
|
||||
return rc.SetTargetTXTString(contents)
|
||||
case "SRV":
|
||||
return rc.SetTargetSRVString(contents)
|
||||
case "SSHFP":
|
||||
return rc.SetTargetSSHFPString(contents)
|
||||
case "TLSA":
|
||||
return rc.SetTargetTLSAString(contents)
|
||||
case "SPF", "TXT":
|
||||
return rc.SetTargetTXTString(contents)
|
||||
default:
|
||||
return fmt.Errorf("unknown rtype (%s) when parsing (%s) domain=(%s)",
|
||||
rtype, contents, origin)
|
||||
|
|
|
|||
|
|
@ -98,12 +98,18 @@ func (rc *RecordConfig) GetTargetDebug() string {
|
|||
switch rc.Type { // #rtype_variations
|
||||
case "A", "AAAA", "CNAME", "NS", "PTR", "TXT", "AKAMAICDN":
|
||||
// Nothing special.
|
||||
case "AZURE_ALIAS":
|
||||
content += fmt.Sprintf(" type=%s", rc.AzureAlias["type"])
|
||||
case "CAA":
|
||||
content += fmt.Sprintf(" caatag=%s caaflag=%d", rc.CaaTag, rc.CaaFlag)
|
||||
case "DS":
|
||||
content += fmt.Sprintf(" ds_algorithm=%d ds_keytag=%d ds_digesttype=%d ds_digest=%s", rc.DsAlgorithm, rc.DsKeyTag, rc.DsDigestType, rc.DsDigest)
|
||||
case "NAPTR":
|
||||
content += fmt.Sprintf(" naptrorder=%d naptrpreference=%d naptrflags=%s naptrservice=%s naptrregexp=%s", rc.NaptrOrder, rc.NaptrPreference, rc.NaptrFlags, rc.NaptrService, rc.NaptrRegexp)
|
||||
case "MX":
|
||||
content += fmt.Sprintf(" pref=%d", rc.MxPreference)
|
||||
case "NAPTR":
|
||||
content += fmt.Sprintf(" naptrorder=%d naptrpreference=%d naptrflags=%s naptrservice=%s naptrregexp=%s", rc.NaptrOrder, rc.NaptrPreference, rc.NaptrFlags, rc.NaptrService, rc.NaptrRegexp)
|
||||
case "R53_ALIAS":
|
||||
content += fmt.Sprintf(" type=%s zone_id=%s", rc.R53Alias["type"], rc.R53Alias["zone_id"])
|
||||
case "SOA":
|
||||
content = fmt.Sprintf("%s ns=%v mbox=%v serial=%v refresh=%v retry=%v expire=%v minttl=%v", rc.Type, rc.target, rc.SoaMbox, rc.SoaSerial, rc.SoaRefresh, rc.SoaRetry, rc.SoaExpire, rc.SoaMinttl)
|
||||
case "SRV":
|
||||
|
|
@ -112,12 +118,6 @@ func (rc *RecordConfig) GetTargetDebug() string {
|
|||
content += fmt.Sprintf(" sshfpalgorithm=%d sshfpfingerprint=%d", rc.SshfpAlgorithm, rc.SshfpFingerprint)
|
||||
case "TLSA":
|
||||
content += fmt.Sprintf(" tlsausage=%d tlsaselector=%d tlsamatchingtype=%d", rc.TlsaUsage, rc.TlsaSelector, rc.TlsaMatchingType)
|
||||
case "CAA":
|
||||
content += fmt.Sprintf(" caatag=%s caaflag=%d", rc.CaaTag, rc.CaaFlag)
|
||||
case "R53_ALIAS":
|
||||
content += fmt.Sprintf(" type=%s zone_id=%s", rc.R53Alias["type"], rc.R53Alias["zone_id"])
|
||||
case "AZURE_ALIAS":
|
||||
content += fmt.Sprintf(" type=%s", rc.AzureAlias["type"])
|
||||
default:
|
||||
panic(fmt.Errorf("rc.String rtype %v unimplemented", rc.Type))
|
||||
// We panic so that we quickly find any switch statements
|
||||
|
|
|
|||
|
|
@ -54,20 +54,20 @@ func validateRecordTypes(rec *models.RecordConfig, domain string, pTypes []strin
|
|||
var validTypes = map[string]bool{
|
||||
"A": true,
|
||||
"AAAA": true,
|
||||
"CNAME": true,
|
||||
"ALIAS": false,
|
||||
"CAA": true,
|
||||
"CNAME": true,
|
||||
"DS": true,
|
||||
"TLSA": true,
|
||||
"IMPORT_TRANSFORM": false,
|
||||
"MX": true,
|
||||
"NAPTR": true,
|
||||
"NS": true,
|
||||
"PTR": true,
|
||||
"SOA": true,
|
||||
"SRV": true,
|
||||
"SSHFP": true,
|
||||
"TLSA": true,
|
||||
"TXT": true,
|
||||
"NS": true,
|
||||
"PTR": true,
|
||||
"NAPTR": true,
|
||||
"ALIAS": false,
|
||||
}
|
||||
_, ok := validTypes[rec.Type]
|
||||
if !ok {
|
||||
|
|
@ -168,6 +168,8 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||
check(checkIPv4(target))
|
||||
case "AAAA":
|
||||
check(checkIPv6(target))
|
||||
case "ALIAS":
|
||||
check(checkTarget(target))
|
||||
case "CNAME":
|
||||
check(checkTarget(target))
|
||||
if label == "@" {
|
||||
|
|
@ -175,6 +177,10 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||
}
|
||||
case "MX":
|
||||
check(checkTarget(target))
|
||||
case "NAPTR":
|
||||
if target != "" {
|
||||
check(checkTarget(target))
|
||||
}
|
||||
case "NS":
|
||||
check(checkTarget(target))
|
||||
if label == "@" {
|
||||
|
|
@ -182,12 +188,6 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||
}
|
||||
case "PTR":
|
||||
check(checkTarget(target))
|
||||
case "NAPTR":
|
||||
if target != "" {
|
||||
check(checkTarget(target))
|
||||
}
|
||||
case "ALIAS":
|
||||
check(checkTarget(target))
|
||||
case "SOA":
|
||||
check(checkSoa(rec.SoaExpire, rec.SoaMinttl, rec.SoaRefresh, rec.SoaRetry, rec.SoaSerial, rec.SoaMbox))
|
||||
check(checkTarget(target))
|
||||
|
|
@ -549,18 +549,18 @@ func checkDuplicates(records []*models.RecordConfig) (errs []error) {
|
|||
var providerCapabilityChecks = []pairTypeCapability{
|
||||
// If a zone uses rType X, the provider must support capability Y.
|
||||
//{"X", providers.Y},
|
||||
capabilityCheck("AKAMAICDN", providers.CanUseAKAMAICDN),
|
||||
capabilityCheck("ALIAS", providers.CanUseAlias),
|
||||
capabilityCheck("AUTODNSSEC", providers.CanAutoDNSSEC),
|
||||
capabilityCheck("AZURE_ALIAS", providers.CanUseAzureAlias),
|
||||
capabilityCheck("CAA", providers.CanUseCAA),
|
||||
capabilityCheck("NAPTR", providers.CanUseNAPTR),
|
||||
capabilityCheck("PTR", providers.CanUsePTR),
|
||||
capabilityCheck("R53_ALIAS", providers.CanUseRoute53Alias),
|
||||
capabilityCheck("SSHFP", providers.CanUseSSHFP),
|
||||
capabilityCheck("SOA", providers.CanUseSOA),
|
||||
capabilityCheck("SRV", providers.CanUseSRV),
|
||||
capabilityCheck("SSHFP", providers.CanUseSSHFP),
|
||||
capabilityCheck("TLSA", providers.CanUseTLSA),
|
||||
capabilityCheck("AZURE_ALIAS", providers.CanUseAzureAlias),
|
||||
capabilityCheck("AKAMAICDN", providers.CanUseAKAMAICDN),
|
||||
|
||||
// DS needs special record-level checks
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
// NOTE: main() updates these.
|
||||
var (
|
||||
BuildTime = ""
|
||||
SHA = ""
|
||||
Semver = ""
|
||||
BuildTime = ""
|
||||
)
|
||||
|
||||
var versionCache string
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ type activedirProvider struct {
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.CanUseAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Cannot(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
|
|
@ -24,7 +25,6 @@ var features = providers.DocumentationNotes{
|
|||
providers.DocCreateDomains: providers.Cannot("AD depends on the zone already existing on the dns server"),
|
||||
providers.DocDualHost: providers.Cannot("This driver does not manage NS records, so should not be used for dual-host scenarios"),
|
||||
providers.DocOfficiallySupported: providers.Can(),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
// Register with the dnscontrol system.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package activedir
|
||||
|
|
|
|||
|
|
@ -12,34 +12,35 @@ https://www.akamai.com/us/en/multimedia/documents/product-brief/edge-dns-product
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
// The default for unlisted capabilities is 'Cannot'.
|
||||
// See providers/capabilities.go for the entire list of capabilties.
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAKAMAICDN: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Cannot(),
|
||||
providers.CanUseDSForChildren: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSOA: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CantUseNOPURGE: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.CanUseSOA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAKAMAICDN: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
type edgeDNSProvider struct {
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@ const (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Can("Just warn when DNSSEC is requested but no RRSIG is found in the AXFR or warn when DNSSEC is not requested but RRSIG are found in the AXFR."),
|
||||
providers.CanGetZones: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Can("Just warn when DNSSEC is requested but no RRSIG is found in the AXFR or warn when DNSSEC is not requested but RRSIG are found in the AXFR."),
|
||||
providers.CantUseNOPURGE: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Cannot(),
|
||||
}
|
||||
|
||||
// axfrddnsProvider stores the client info for the provider.
|
||||
|
|
|
|||
|
|
@ -53,18 +53,18 @@ func newAzureDNS(m map[string]string, metadata json.RawMessage) (*azurednsProvid
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot("Azure DNS does not provide a generic ALIAS functionality. Use AZURE_ALIAS instead."),
|
||||
providers.CanUseAzureAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Cannot(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Cannot(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can("Azure does not permit modifying the existing NS records, only adding/removing additional records."),
|
||||
providers.DocOfficiallySupported: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Cannot(),
|
||||
providers.CanUseSSHFP: providers.Cannot(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAzureAlias: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -10,10 +10,26 @@ import (
|
|||
type Capability uint32
|
||||
|
||||
const (
|
||||
// If you add something to this list, you probably want to add it to pkg/normalize/validate.go checkProviderCapabilities() or somewhere near there.
|
||||
// Keep this list sorted.
|
||||
// If you add something here, you probably want to also add it to
|
||||
// pkg/normalize/validate.go checkProviderCapabilities() or
|
||||
// somewhere near there.
|
||||
|
||||
// CanAutoDNSSEC indicates that the provider can automatically handle DNSSEC,
|
||||
// so folks can ask for that.
|
||||
CanAutoDNSSEC Capability = iota
|
||||
|
||||
// CanGetZones indicates the provider supports the get-zones subcommand.
|
||||
CanGetZones
|
||||
|
||||
// CanUseAKAMAICDN indicates the provider support the specific AKAMAICDN records that only the Akamai EdgeDns provider supports
|
||||
CanUseAKAMAICDN
|
||||
|
||||
// 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
|
||||
|
||||
// CanUseAzureAlias indicates the provider support the specific Azure_ALIAS records that only the Azure provider supports
|
||||
CanUseAzureAlias
|
||||
|
||||
// CanUseCAA indicates the provider can handle CAA records
|
||||
CanUseCAA
|
||||
|
|
@ -26,11 +42,17 @@ const (
|
|||
// only for children records, not at the root of the zone.
|
||||
CanUseDSForChildren
|
||||
|
||||
// CanUseNAPTR indicates the provider can handle NAPTR records
|
||||
CanUseNAPTR
|
||||
|
||||
// CanUsePTR indicates the provider can handle PTR records
|
||||
CanUsePTR
|
||||
|
||||
// CanUseNAPTR indicates the provider can handle NAPTR records
|
||||
CanUseNAPTR
|
||||
// CanUseRoute53Alias indicates the provider support the specific R53_ALIAS records that only the Route53 provider supports
|
||||
CanUseRoute53Alias
|
||||
|
||||
// CanUseSOA indicates the provider supports full management of a zone's SOA record
|
||||
CanUseSOA
|
||||
|
||||
// CanUseSRV indicates the provider can handle SRV records
|
||||
CanUseSRV
|
||||
|
|
@ -41,37 +63,20 @@ const (
|
|||
// CanUseTLSA indicates the provider can handle TLSA records
|
||||
CanUseTLSA
|
||||
|
||||
// CanAutoDNSSEC indicates that the provider can automatically handle DNSSEC,
|
||||
// so folks can ask for that.
|
||||
CanAutoDNSSEC
|
||||
|
||||
// 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
|
||||
// provider.
|
||||
CantUseNOPURGE
|
||||
|
||||
// DocOfficiallySupported means it is actively used and maintained by stack exchange
|
||||
DocOfficiallySupported
|
||||
// DocDualHost means provider allows full management of apex NS records, so we can safely dual-host with anothe provider
|
||||
DocDualHost
|
||||
// DocCreateDomains means provider can add domains with the `dnscontrol create-domains` command
|
||||
DocCreateDomains
|
||||
|
||||
// CanUseRoute53Alias indicates the provider support the specific R53_ALIAS records that only the Route53 provider supports
|
||||
CanUseRoute53Alias
|
||||
// DocDualHost means provider allows full management of apex NS records, so we can safely dual-host with anothe provider
|
||||
DocDualHost
|
||||
|
||||
// CanGetZones indicates the provider supports the get-zones subcommand.
|
||||
CanGetZones
|
||||
|
||||
// CanUseAzureAlias indicates the provider support the specific Azure_ALIAS records that only the Azure provider supports
|
||||
CanUseAzureAlias
|
||||
|
||||
// CanUseSOA indicates the provider supports full management of a zone's SOA record
|
||||
CanUseSOA
|
||||
|
||||
// CanUseAKAMAICDN indicates the provider support the specific AKAMAICDN records that only the Akamai EdgeDns provider supports
|
||||
CanUseAKAMAICDN
|
||||
// DocOfficiallySupported means it is actively used and maintained by stack exchange
|
||||
DocOfficiallySupported
|
||||
)
|
||||
|
||||
var providerCapabilities = map[string]map[Capability]bool{}
|
||||
|
|
|
|||
|
|
@ -8,29 +8,30 @@ func _() {
|
|||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[CanUseAlias-0]
|
||||
_ = x[CanUseCAA-1]
|
||||
_ = x[CanUseDS-2]
|
||||
_ = x[CanUseDSForChildren-3]
|
||||
_ = x[CanUsePTR-4]
|
||||
_ = x[CanUseNAPTR-5]
|
||||
_ = x[CanUseSRV-6]
|
||||
_ = x[CanUseSSHFP-7]
|
||||
_ = x[CanUseTLSA-8]
|
||||
_ = x[CanAutoDNSSEC-9]
|
||||
_ = x[CantUseNOPURGE-10]
|
||||
_ = x[DocOfficiallySupported-11]
|
||||
_ = x[DocDualHost-12]
|
||||
_ = x[DocCreateDomains-13]
|
||||
_ = x[CanUseRoute53Alias-14]
|
||||
_ = x[CanGetZones-15]
|
||||
_ = x[CanUseAzureAlias-16]
|
||||
_ = x[CanUseSOA-17]
|
||||
_ = x[CanAutoDNSSEC-0]
|
||||
_ = x[CanGetZones-1]
|
||||
_ = x[CanUseAKAMAICDN-2]
|
||||
_ = x[CanUseAlias-3]
|
||||
_ = x[CanUseAzureAlias-4]
|
||||
_ = x[CanUseCAA-5]
|
||||
_ = x[CanUseDS-6]
|
||||
_ = x[CanUseDSForChildren-7]
|
||||
_ = x[CanUseNAPTR-8]
|
||||
_ = x[CanUsePTR-9]
|
||||
_ = x[CanUseRoute53Alias-10]
|
||||
_ = x[CanUseSOA-11]
|
||||
_ = x[CanUseSRV-12]
|
||||
_ = x[CanUseSSHFP-13]
|
||||
_ = x[CanUseTLSA-14]
|
||||
_ = x[CantUseNOPURGE-15]
|
||||
_ = x[DocCreateDomains-16]
|
||||
_ = x[DocDualHost-17]
|
||||
_ = x[DocOfficiallySupported-18]
|
||||
}
|
||||
|
||||
const _Capability_name = "CanUseAliasCanUseCAACanUseDSCanUseDSForChildrenCanUsePTRCanUseNAPTRCanUseSRVCanUseSSHFPCanUseTLSACanAutoDNSSECCantUseNOPURGEDocOfficiallySupportedDocDualHostDocCreateDomainsCanUseRoute53AliasCanGetZonesCanUseAzureAliasCanUseSOA"
|
||||
const _Capability_name = "CanAutoDNSSECCanGetZonesCanUseAKAMAICDNCanUseAliasCanUseAzureAliasCanUseCAACanUseDSCanUseDSForChildrenCanUseNAPTRCanUsePTRCanUseRoute53AliasCanUseSOACanUseSRVCanUseSSHFPCanUseTLSACantUseNOPURGEDocCreateDomainsDocDualHostDocOfficiallySupported"
|
||||
|
||||
var _Capability_index = [...]uint8{0, 11, 20, 28, 47, 56, 67, 76, 87, 97, 110, 124, 146, 157, 173, 191, 202, 218, 227}
|
||||
var _Capability_index = [...]uint8{0, 13, 24, 39, 50, 66, 75, 83, 102, 113, 122, 140, 149, 158, 169, 179, 193, 209, 220, 242}
|
||||
|
||||
func (i Capability) String() string {
|
||||
if i >= Capability(len(_Capability_index)-1) {
|
||||
|
|
|
|||
|
|
@ -37,17 +37,17 @@ Domain level metadata available:
|
|||
*/
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can("CF automatically flattens CNAME records into A records dynamically"),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseDSForChildren: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Cannot("Cloudflare will not work well in situations where it is not the only DNS server"),
|
||||
providers.DocOfficiallySupported: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -39,18 +39,18 @@ func NewCloudns(m map[string]string, metadata json.RawMessage) (providers.DNSSer
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.DocDualHost: providers.Unimplemented(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
//providers.CanUseDS: providers.Can(), // in ClouDNS we can add DS record just for a subdomain(child)
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDSForChildren: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseDSForChildren: providers.Can(),
|
||||
//providers.CanUseDS: providers.Can(), // in ClouDNS we can add DS record just for a subdomain(child)
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Unimplemented(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -39,19 +39,19 @@ func NewDeSec(m map[string]string, metadata json.RawMessage) (providers.DNSServi
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Can("deSEC always signs all records. When trying to disable, a notice is printed."),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Unimplemented("Apex aliasing is supported via new SVCB and HTTPS record types. For details, check the deSEC docs."),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Unimplemented(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.CanUseAlias: providers.Unimplemented("Apex aliasing is supported via new SVCB and HTTPS record types. For details, check the deSEC docs."),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseDS: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Can("deSEC always signs all records. When trying to disable, a notice is printed."),
|
||||
}
|
||||
|
||||
var defaultNameServerNames = []string{
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ retry:
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can("Semicolons not supported in issue/issuewild fields.", "https://www.digitalocean.com/docs/networking/dns/how-to/create-caa-records"),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can("Semicolons not supported in issue/issuewild fields.", "https://www.digitalocean.com/docs/networking/dns/how-to/create-caa-records"),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -289,6 +289,11 @@ func toReq(dc *models.DomainConfig, rc *models.RecordConfig) *godo.DomainRecordE
|
|||
priority := 0 // DO uses the same property for MX and SRV priority
|
||||
|
||||
switch rc.Type { // #rtype_variations
|
||||
case "CAA":
|
||||
// DO API requires that a CAA target ends in dot.
|
||||
// Interestingly enough, the value returned from API doesn't
|
||||
// contain a trailing dot.
|
||||
target = target + "."
|
||||
case "MX":
|
||||
priority = int(rc.MxPreference)
|
||||
case "SRV":
|
||||
|
|
@ -296,11 +301,6 @@ func toReq(dc *models.DomainConfig, rc *models.RecordConfig) *godo.DomainRecordE
|
|||
case "TXT":
|
||||
// TXT records are the one place where DO combines many items into one field.
|
||||
target = rc.GetTargetField()
|
||||
case "CAA":
|
||||
// DO API requires that a CAA target ends in dot.
|
||||
// Interestingly enough, the value returned from API doesn't
|
||||
// contain a trailing dot.
|
||||
target = target + "."
|
||||
default:
|
||||
// no action required
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,19 +18,19 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUseDS: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Cannot("DNSimple does not allow sufficient control over the apex NS records"),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -574,10 +574,16 @@ func getTargetRecordContent(rc *models.RecordConfig) string {
|
|||
switch rtype := rc.Type; rtype {
|
||||
case "CAA":
|
||||
return rc.GetTargetCombined()
|
||||
case "SSHFP":
|
||||
return fmt.Sprintf("%d %d %s", rc.SshfpAlgorithm, rc.SshfpFingerprint, rc.GetTargetField())
|
||||
case "DS":
|
||||
return fmt.Sprintf("%d %d %d %s", rc.DsKeyTag, rc.DsAlgorithm, rc.DsDigestType, rc.DsDigest)
|
||||
case "NAPTR":
|
||||
return fmt.Sprintf("%d %d %s %s %s %s",
|
||||
rc.NaptrOrder, rc.NaptrPreference,
|
||||
quoteDNSString(rc.NaptrFlags), quoteDNSString(rc.NaptrService),
|
||||
quoteDNSString(rc.NaptrRegexp),
|
||||
rc.GetTargetField())
|
||||
case "SSHFP":
|
||||
return fmt.Sprintf("%d %d %s", rc.SshfpAlgorithm, rc.SshfpFingerprint, rc.GetTargetField())
|
||||
case "SRV":
|
||||
return fmt.Sprintf("%d %d %s", rc.SrvWeight, rc.SrvPort, rc.GetTargetField())
|
||||
case "TXT":
|
||||
|
|
@ -586,12 +592,6 @@ func getTargetRecordContent(rc *models.RecordConfig) string {
|
|||
quoted[i] = quoteDNSString(rc.TxtStrings[i])
|
||||
}
|
||||
return strings.Join(quoted, " ")
|
||||
case "NAPTR":
|
||||
return fmt.Sprintf("%d %d %s %s %s %s",
|
||||
rc.NaptrOrder, rc.NaptrPreference,
|
||||
quoteDNSString(rc.NaptrFlags), quoteDNSString(rc.NaptrService),
|
||||
quoteDNSString(rc.NaptrRegexp),
|
||||
rc.GetTargetField())
|
||||
default:
|
||||
return rc.GetTargetField()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,18 +13,18 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.CanUseSSHFP: providers.Cannot(),
|
||||
providers.CanUseDS: providers.Cannot(),
|
||||
providers.CanUseDSForChildren: providers.Cannot(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Cannot(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can("System NS records cannot be edited. Custom apex NS records can be added/changed/deleted."),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ func NewExoscale(m map[string]string, metadata json.RawMessage) (providers.DNSSe
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
|
|
@ -33,7 +34,6 @@ var features = providers.DocumentationNotes{
|
|||
providers.DocCreateDomains: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Cannot("Exoscale does not allow sufficient control over the apex NS records"),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ func init() {
|
|||
|
||||
// features declares which features and options are available.
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can("Only on the bare domain. Otherwise CNAME will be substituted"),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Cannot("Only supports DS records at the apex"),
|
||||
|
|
@ -56,7 +57,6 @@ var features = providers.DocumentationNotes{
|
|||
providers.CantUseNOPURGE: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Cannot("Can only manage domains registered through their service"),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
// DNSSEC: platform supports it, but it doesn't fit our GetDomainCorrections
|
||||
|
|
|
|||
|
|
@ -43,20 +43,20 @@ Additionally
|
|||
*/
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUseDS: providers.Cannot(),
|
||||
providers.CanUseDSForChildren: providers.Cannot(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.CanAutoDNSSEC: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
|
|
@ -23,6 +20,9 @@ var features = providers.DocumentationNotes{
|
|||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Cannot(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ type HXClient struct {
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.CanUseAlias: providers.Cannot("Using ALIAS is possible through our extended DNS (X-DNS) service. Feel free to get in touch with us."),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
|
|
@ -29,7 +30,6 @@ var features = providers.DocumentationNotes{
|
|||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot("Actively maintained provider module."),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
func newProvider(conf map[string]string) (*HXClient, error) {
|
||||
|
|
|
|||
|
|
@ -42,20 +42,20 @@ var InwxSandboxDefaultNs = []string{"ns.ote.inwx.de", "ns2.ote.inwx.de"}
|
|||
|
||||
// features is used to let dnscontrol know which features are supported by INWX.
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Unimplemented("Supported by INWX but not implemented yet."),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot("INWX does not support the ALIAS or ANAME record type."),
|
||||
providers.CanUseAzureAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Unimplemented("DS records are only supported at the apex and require a different API call that hasn't been implemented yet."),
|
||||
providers.CanUsePTR: providers.Can("PTR records with empty targets are not supported"),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can("PTR records with empty targets are not supported"),
|
||||
providers.CanUseSRV: providers.Can("SRV records with empty targets are not supported."),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Unimplemented("Supported by INWX but not implemented yet."),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAzureAlias: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
// inwxAPI is a thin wrapper around goinwx.Client.
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ func NewLinode(m map[string]string, metadata json.RawMessage) (providers.DNSServ
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.DocDualHost: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ type namecheapProvider struct {
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
|
|
@ -36,7 +37,6 @@ var features = providers.DocumentationNotes{
|
|||
providers.DocCreateDomains: providers.Cannot("Requires domain registered through their service"),
|
||||
providers.DocDualHost: providers.Cannot("Doesn't allow control of apex NS records"),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ type namedotcomProvider struct {
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot("PTR records are not supported (See Link)", "https://www.name.com/support/articles/205188508-Reverse-DNS-records"),
|
||||
providers.CanUseSRV: providers.Can("SRV records with empty targets are not supported"),
|
||||
providers.DocCreateDomains: providers.Cannot("New domains require registration"),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func newReg(conf map[string]string) (providers.Registrar, error) {
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Cannot(),
|
||||
providers.DocDualHost: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanGetZones: providers.Cannot(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -124,21 +124,21 @@ func fromRecordConfig(in *models.RecordConfig) *record {
|
|||
switch rc.Type { // #rtype_variations
|
||||
case "A", "AAAA", "PTR", "TXT", "SOA", "ALIAS":
|
||||
// Nothing special.
|
||||
case "CAA":
|
||||
rc.Destination = strconv.Itoa(int(in.CaaFlag)) + " " + in.CaaTag + " \"" + in.GetTargetField() + "\""
|
||||
case "CNAME":
|
||||
rc.Destination = strings.TrimSuffix(in.GetTargetField(), ".")
|
||||
case "NS":
|
||||
return nil // API ignores NS records
|
||||
case "MX":
|
||||
rc.Destination = strings.TrimSuffix(in.GetTargetField(), ".")
|
||||
rc.Priority = strconv.Itoa(int(in.MxPreference))
|
||||
case "NS":
|
||||
return nil // API ignores NS records
|
||||
case "SRV":
|
||||
rc.Destination = strconv.Itoa(int(in.SrvPriority)) + " " + strconv.Itoa(int(in.SrvWeight)) + " " + strconv.Itoa(int(in.SrvPort)) + " " + in.GetTargetField()
|
||||
case "CAA":
|
||||
rc.Destination = strconv.Itoa(int(in.CaaFlag)) + " " + in.CaaTag + " \"" + in.GetTargetField() + "\""
|
||||
case "TLSA":
|
||||
rc.Destination = strconv.Itoa(int(in.TlsaUsage)) + " " + strconv.Itoa(int(in.TlsaSelector)) + " " + strconv.Itoa(int(in.TlsaMatchingType))
|
||||
case "SSHFP":
|
||||
rc.Destination = strconv.Itoa(int(in.SshfpAlgorithm)) + " " + strconv.Itoa(int(in.SshfpFingerprint))
|
||||
case "TLSA":
|
||||
rc.Destination = strconv.Itoa(int(in.TlsaUsage)) + " " + strconv.Itoa(int(in.TlsaSelector)) + " " + strconv.Itoa(int(in.TlsaMatchingType))
|
||||
default:
|
||||
msg := fmt.Sprintf("ClouDNS.toReq rtype %v unimplemented", rc.Type)
|
||||
panic(msg)
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ import (
|
|||
)
|
||||
|
||||
var docNotes = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,11 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
//providers.CanUseCAA: providers.Can(),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Cannot("Driver just maintains list of OctoDNS config files. You must manually create the master config files that refer these."),
|
||||
providers.DocDualHost: providers.Cannot("Research is needed."),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
func initProvider(config map[string]string, providermeta json.RawMessage) (providers.DNSServiceProvider, error) {
|
||||
|
|
|
|||
|
|
@ -19,19 +19,18 @@ import (
|
|||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Cannot(), // should be supported, but getting 500s in tests
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Cannot(), // should be supported, but getting 500s in tests
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -18,16 +18,16 @@ type ovhProvider struct {
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Cannot("New domains require registration"),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func newOVH(m map[string]string, metadata json.RawMessage) (*ovhProvider, error) {
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ func newPacketframe(m map[string]string, metadata json.RawMessage) (providers.DN
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.DocDualHost: providers.Cannot(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanGetZones: providers.Unimplemented(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||
|
|
@ -11,24 +14,22 @@ import (
|
|||
pdns "github.com/mittwald/go-powerdns"
|
||||
"github.com/mittwald/go-powerdns/apis/zones"
|
||||
"github.com/mittwald/go-powerdns/pdnshttp"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can("Needs to be enabled in PowerDNS first", "https://doc.powerdns.com/authoritative/guides/alias.html"),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanAutoDNSSEC: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -75,15 +75,15 @@ func newRoute53(m map[string]string, metadata json.RawMessage) (*route53Provider
|
|||
}
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot("R53 does not provide a generic ALIAS functionality. Use R53_ALIAS instead."),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseRoute53Alias: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocDualHost: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseRoute53Alias: providers.Can(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ Info required in `creds.json`:
|
|||
*/
|
||||
|
||||
var features = providers.DocumentationNotes{
|
||||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Cannot(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUsePTR: providers.Cannot(),
|
||||
providers.CanUseSRV: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.CanUseSSHFP: providers.Can(),
|
||||
providers.CanUseTLSA: providers.Cannot(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
providers.DocOfficiallySupported: providers.Cannot(),
|
||||
providers.CanGetZones: providers.Can(),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue