Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ providers/namecheap @willpower232
# providers/namedotcom NEEDS VOLUNTEER
providers/netcup @kordianbruck
providers/netlify @SphericalKat
providers/none @TomOnTime
providers/ns1 @costasd
# providers/opensrs NEEDS VOLUNTEER
providers/oracle @kallsyms
Expand Down
4 changes: 4 additions & 0 deletions integrationTest/profiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@
"slug": "$NETLIFY_ACCOUNT_SLUG",
"token": "$NETLIFY_TOKEN"
},
"NONE": {
"TYPE": "NONE",
"domain": "$NONE_DOMAIN"
},
"NS1": {
"TYPE": "NS1",
"api_token": "$NS1_TOKEN",
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"runtime/debug"

"github.com/StackExchange/dnscontrol/v4/commands"
"github.com/StackExchange/dnscontrol/v4/pkg/providers"
_ "github.com/StackExchange/dnscontrol/v4/pkg/providers/_all"
_ "github.com/StackExchange/dnscontrol/v4/pkg/rtype"
"github.com/StackExchange/dnscontrol/v4/pkg/version"
Expand All @@ -21,5 +22,6 @@ func main() {
if info, ok := debug.ReadBuildInfo(); !ok && info == nil {
fmt.Fprint(os.Stderr, "Warning: dnscontrol was built without Go modules. See https://docs.dnscontrol.org/getting-started/getting-started#source for more information on how to build dnscontrol correctly.\n\n")
}
providers.PostInitAllProviders()
os.Exit(commands.Run("DNSControl version " + version.Version()))
}
1 change: 1 addition & 0 deletions pkg/providers/_all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import (
_ "github.com/StackExchange/dnscontrol/v4/providers/namedotcom"
_ "github.com/StackExchange/dnscontrol/v4/providers/netcup"
_ "github.com/StackExchange/dnscontrol/v4/providers/netlify"
_ "github.com/StackExchange/dnscontrol/v4/providers/none"
_ "github.com/StackExchange/dnscontrol/v4/providers/ns1"
_ "github.com/StackExchange/dnscontrol/v4/providers/opensrs"
_ "github.com/StackExchange/dnscontrol/v4/providers/oracle"
Expand Down
18 changes: 12 additions & 6 deletions pkg/providers/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ const (
CanConcur

// CanGetZones indicates the provider supports the get-zones subcommand.
// When using providers.Register(), this is set automatically for you.
CanGetZones

// CanOnlyDiff1Features indicates the provider has not yet been upgraded to
// use the "diff2" differencing engine. Instead, it uses the the backwards
// compatibility mode. The diff2 engine is required to repliably provide
// IGNORE(), NO_PURGE, and other features.
// This capability is set automatically for the provider during the call to
// RegisterDomainServiceProviderType. It is set to Can() if we detect
// compatibility mode is in use. All other values (Unimplemented and Cannot)
// are equivalent.
CanOnlyDiff1Features

// CanUseAKAMAICDN indicates the provider support the specific AKAMAICDN records that only the Akamai EdgeDns provider supports.
CanUseAKAMAICDN

// CanUseAKAMAITLC indicates the provider supports the specific AKAMAITLC records that only the Akamai EdgeDns provider supports
// When using providers.Register(), this is set if RecordTypes[] includes it.
CanUseAKAMAITLC

// CanUseAlias indicates the provider support ALIAS records (or flattened CNAMES). Up to the provider to translate them to the appropriate record type.
// When using providers.Register(), this is set if RecordTypes[] includes it.
CanUseAlias

// CanUseAzureAlias indicates the provider support the specific Azure_ALIAS records that only the Azure provider supports.
Expand All @@ -58,6 +60,7 @@ const (

// CanUseDS indicates that the provider can handle DS record types. This
// implies CanUseDSForChildren without specifying the latter explicitly.
// When using providers.Register(), this is set if RecordTypes[] includes it.
CanUseDS

// CanUseDSForChildren indicates the provider can handle DS record types, but
Expand Down Expand Up @@ -115,8 +118,11 @@ const (
// DocOfficiallySupported means it is actively used and maintained by stack exchange.
DocOfficiallySupported

// CanUseAKAMAITLC indicates the provider supports the specific AKAMAITLC records that only the Akamai EdgeDns provider supports.
CanUseAKAMAITLC
// IsRegistrar is true if this provider manages DNS Domain Nameserver Delegations.
IsRegistrar

// IsDnsServiceProvider is true if this provider manages DNS zones.
IsDnsServiceProvider
)

var providerCapabilities = map[string]map[Capability]bool{}
Expand Down
56 changes: 29 additions & 27 deletions pkg/providers/capability_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions pkg/providers/dualhostsupport.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package providers

//go:generate stringer -type DualHostSupport -trimprefix DualHostSupport

// DualHostSupport indicates the provider's level of support.
//
// if x < DualHostSupportSupported { // not supported }
// if x >= DualHostSupportSupported { // supported }
type DualHostSupport int

const (
// Enums that mean "not supported"

Check failure on line 12 in pkg/providers/dualhostsupport.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Comment should end in a period (godot)
DualHostSupportNotSupported DualHostSupport = iota
DualHostSupportUntested
DualHostSupportUnimplemented // Provider supports this but DNSControl does not have code to support it

// Enums that mean "supported"

Check failure on line 17 in pkg/providers/dualhostsupport.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Comment should end in a period (godot)
DualHostSupportAdditionsOnly // Provider does not permit modifying/deleting provider's NS records, only adding/removing additional records
DualHostSupportItsComplicated // Provider supports this, but check the documentation for limits and oddities.
DualHostSupportFull

// Pivot point. Below here means "not supported". Above here means "supported".
DualHostSupportSupported = DualHostSupportAdditionsOnly
)
29 changes: 29 additions & 0 deletions pkg/providers/dualhostsupport_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/providers/fieldtype.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package providers

//go:generate stringer -type FieldType -trimprefix FieldType

type FieldType int

const (
FieldTypeString FieldType = iota
FieldTypeBool
)
25 changes: 25 additions & 0 deletions pkg/providers/fieldtype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func init() {
}

// CustomRType stores an rtype that is only valid for this DSP.
// NB(tlim): This only applies to providers that don't use the new providers.Register() function.
type CustomRType struct {
Name string
Provider string
Expand Down
Loading
Loading