This commit is contained in:
Tom Limoncelli 2021-05-04 14:15:31 -04:00 committed by GitHub
parent 68dee3a8c5
commit 8d139d182f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 41 additions and 42 deletions

View file

@ -186,7 +186,6 @@ func GetZone(args GetZoneArgs) error {
zoneRecs[i] = recs zoneRecs[i] = recs
} }
// Write the heading: // Write the heading:
if args.OutputFormat == "js" || args.OutputFormat == "djs" { if args.OutputFormat == "js" || args.OutputFormat == "djs" {

View file

@ -31,7 +31,7 @@ var features = providers.DocumentationNotes{
// This establishes the name (all caps), and the function to call to initialize it. // This establishes the name (all caps), and the function to call to initialize it.
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDNS, Initializer: newDNS,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("ACTIVEDIRECTORY_PS", fns, features) providers.RegisterDomainServiceProviderType("ACTIVEDIRECTORY_PS", fns, features)

View file

@ -118,7 +118,7 @@ func initAxfrDdns(config map[string]string, providermeta json.RawMessage) (provi
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: initAxfrDdns, Initializer: initAxfrDdns,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("AXFRDDNS", fns, features) providers.RegisterDomainServiceProviderType("AXFRDDNS", fns, features)

View file

@ -78,7 +78,7 @@ func initBind(config map[string]string, providermeta json.RawMessage) (providers
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: initBind, Initializer: initBind,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("BIND", fns, features) providers.RegisterDomainServiceProviderType("BIND", fns, features)

View file

@ -54,7 +54,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newCloudflare, Initializer: newCloudflare,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("CLOUDFLAREAPI", fns, features) providers.RegisterDomainServiceProviderType("CLOUDFLAREAPI", fns, features)

View file

@ -57,7 +57,7 @@ var defaultNameServerNames = []string{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewDeSec, Initializer: NewDeSec,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("DESEC", fns, features) providers.RegisterDomainServiceProviderType("DESEC", fns, features)

View file

@ -81,7 +81,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewDo, Initializer: NewDo,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("DIGITALOCEAN", fns, features) providers.RegisterDomainServiceProviderType("DIGITALOCEAN", fns, features)

View file

@ -36,7 +36,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
providers.RegisterRegistrarType("DNSIMPLE", newReg) providers.RegisterRegistrarType("DNSIMPLE", newReg)
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDsp, Initializer: newDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("DNSIMPLE", fns, features) providers.RegisterDomainServiceProviderType("DNSIMPLE", fns, features)

View file

@ -38,7 +38,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewExoscale, Initializer: NewExoscale,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("EXOSCALE", fns, features) providers.RegisterDomainServiceProviderType("EXOSCALE", fns, features)

View file

@ -38,7 +38,7 @@ func sPtr(s string) *string {
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: New, Initializer: New,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("GCLOUD", fns, features) providers.RegisterDomainServiceProviderType("GCLOUD", fns, features)

View file

@ -61,7 +61,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newHEDNSProvider, Initializer: newHEDNSProvider,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("HEDNS", fns, features) providers.RegisterDomainServiceProviderType("HEDNS", fns, features)
@ -326,7 +326,7 @@ func (c *hednsProvider) GetZoneRecords(domain string) (models.Records, error) {
err = rc.SetTarget(data) err = rc.SetTarget(data)
case "MX": case "MX":
// dns.he.net omits the trailing "." on the hostnames for MX records // dns.he.net omits the trailing "." on the hostnames for MX records
err = rc.SetTargetMX(uint16(priority), data + ".") err = rc.SetTargetMX(uint16(priority), data+".")
case "SRV": case "SRV":
err = rc.SetTargetSRVPriorityString(uint16(priority), data) err = rc.SetTargetSRVPriorityString(uint16(priority), data)
case "SPF": case "SPF":

View file

@ -27,7 +27,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: New, Initializer: New,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("HETZNER", fns, features) providers.RegisterDomainServiceProviderType("HETZNER", fns, features)

View file

@ -67,7 +67,7 @@ func newDsp(conf map[string]string, meta json.RawMessage) (providers.DNSServiceP
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDsp, Initializer: newDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterRegistrarType("HEXONET", newReg) providers.RegisterRegistrarType("HEXONET", newReg)

View file

@ -34,7 +34,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
providers.RegisterRegistrarType("HOSTINGDE", newHostingdeReg) providers.RegisterRegistrarType("HOSTINGDE", newHostingdeReg)
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newHostingdeDsp, Initializer: newHostingdeDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("HOSTINGDE", fns, features) providers.RegisterDomainServiceProviderType("HOSTINGDE", fns, features)

View file

@ -69,7 +69,7 @@ type inwxAPI struct {
func init() { func init() {
providers.RegisterRegistrarType("INWX", newInwxReg) providers.RegisterRegistrarType("INWX", newInwxReg)
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newInwxDsp, Initializer: newInwxDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("INWX", fns, features) providers.RegisterDomainServiceProviderType("INWX", fns, features)

View file

@ -94,7 +94,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
// SRV support is in this provider, but Linode doesn't seem to support it properly // SRV support is in this provider, but Linode doesn't seem to support it properly
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewLinode, Initializer: NewLinode,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("LINODE", fns, features) providers.RegisterDomainServiceProviderType("LINODE", fns, features)

View file

@ -42,7 +42,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
providers.RegisterRegistrarType("NAMECHEAP", newReg) providers.RegisterRegistrarType("NAMECHEAP", newReg)
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDsp, Initializer: newDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("NAMECHEAP", fns, features) providers.RegisterDomainServiceProviderType("NAMECHEAP", fns, features)

View file

@ -56,7 +56,7 @@ func newProvider(conf map[string]string) (*namedotcomProvider, error) {
func init() { func init() {
providers.RegisterRegistrarType("NAMEDOTCOM", newReg) providers.RegisterRegistrarType("NAMEDOTCOM", newReg)
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDsp, Initializer: newDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("NAMEDOTCOM", fns, features) providers.RegisterDomainServiceProviderType("NAMEDOTCOM", fns, features)

View file

@ -169,8 +169,8 @@ func (n *namedotcomProvider) createRecord(rc *models.RecordConfig, domain string
} }
switch rc.Type { // #rtype_variations switch rc.Type { // #rtype_variations
case "A", "AAAA", "ANAME", "CNAME", "MX", "NS": case "A", "AAAA", "ANAME", "CNAME", "MX", "NS":
// nothing // nothing
case "TXT": case "TXT":
// record.Answer = encodeTxt(rc.TxtStrings) // record.Answer = encodeTxt(rc.TxtStrings)
case "SRV": case "SRV":
if rc.GetTargetField() == "." { if rc.GetTargetField() == "." {

View file

@ -22,7 +22,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: New, Initializer: New,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("NETCUP", fns, features) providers.RegisterDomainServiceProviderType("NETCUP", fns, features)

View file

@ -25,7 +25,7 @@ var docNotes = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newProvider, Initializer: newProvider,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("NS1", fns, providers.CanUseSRV, docNotes) providers.RegisterDomainServiceProviderType("NS1", fns, providers.CanUseSRV, docNotes)

View file

@ -36,8 +36,8 @@ import (
var features = providers.DocumentationNotes{ var features = providers.DocumentationNotes{
//providers.CanUseCAA: providers.Can(), //providers.CanUseCAA: providers.Can(),
providers.CanUsePTR: providers.Can(), providers.CanUsePTR: providers.Can(),
providers.CanUseSRV: 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.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.DocDualHost: providers.Cannot("Research is needed."),
providers.CanGetZones: providers.Unimplemented(), providers.CanGetZones: providers.Unimplemented(),
@ -64,7 +64,7 @@ func initProvider(config map[string]string, providermeta json.RawMessage) (provi
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: initProvider, Initializer: initProvider,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("OCTODNS", fns, features) providers.RegisterDomainServiceProviderType("OCTODNS", fns, features)

View file

@ -23,20 +23,20 @@ var features = providers.DocumentationNotes{
providers.DocDualHost: providers.Can(), providers.DocDualHost: providers.Can(),
providers.DocOfficiallySupported: providers.Cannot(), providers.DocOfficiallySupported: providers.Cannot(),
providers.CanGetZones: providers.Can(), providers.CanGetZones: providers.Can(),
providers.CanUseAlias: providers.Can(), providers.CanUseAlias: providers.Can(),
providers.CanUseCAA: providers.Can(), providers.CanUseCAA: providers.Can(),
providers.CanUseDS: providers.Cannot(), // should be supported, but getting 500s in tests providers.CanUseDS: providers.Cannot(), // should be supported, but getting 500s in tests
providers.CanUseNAPTR: providers.Can(), providers.CanUseNAPTR: providers.Can(),
providers.CanUsePTR: providers.Can(), providers.CanUsePTR: providers.Can(),
providers.CanUseSRV: providers.Can(), providers.CanUseSRV: providers.Can(),
providers.CanUseSSHFP: providers.Can(), providers.CanUseSSHFP: providers.Can(),
providers.CanUseTLSA: providers.Can(), providers.CanUseTLSA: providers.Can(),
} }
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: New, Initializer: New,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("ORACLE", fns, features) providers.RegisterDomainServiceProviderType("ORACLE", fns, features)

View file

@ -56,7 +56,7 @@ func newReg(conf map[string]string) (providers.Registrar, error) {
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newDsp, Initializer: newDsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterRegistrarType("OVH", newReg) providers.RegisterRegistrarType("OVH", newReg)

View file

@ -33,7 +33,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewProvider, Initializer: NewProvider,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("POWERDNS", fns, features) providers.RegisterDomainServiceProviderType("POWERDNS", fns, features)

View file

@ -47,7 +47,7 @@ type RecordAuditor func([]*models.RecordConfig) error
// DspFuncs lists functions registered with a provider. // DspFuncs lists functions registered with a provider.
type DspFuncs struct { type DspFuncs struct {
Initializer DspInitializer Initializer DspInitializer
RecordAuditor RecordAuditor RecordAuditor RecordAuditor
} }

View file

@ -80,7 +80,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newRoute53Dsp, Initializer: newRoute53Dsp,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("ROUTE53", fns, features) providers.RegisterDomainServiceProviderType("ROUTE53", fns, features)

View file

@ -28,7 +28,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: newReg, Initializer: newReg,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("SOFTLAYER", fns, features) providers.RegisterDomainServiceProviderType("SOFTLAYER", fns, features)

View file

@ -38,7 +38,7 @@ var features = providers.DocumentationNotes{
func init() { func init() {
fns := providers.DspFuncs{ fns := providers.DspFuncs{
Initializer: NewProvider, Initializer: NewProvider,
RecordAuditor: AuditRecords, RecordAuditor: AuditRecords,
} }
providers.RegisterDomainServiceProviderType("VULTR", fns, features) providers.RegisterDomainServiceProviderType("VULTR", fns, features)