mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 06:46:19 +08:00
CHORE: Linting (#1704)
* Remove deprecated io/ioutil * fixup! * staticcheck and linting * revert models/provider.go * Fix imports to new style * linting
This commit is contained in:
parent
e1b6b163d7
commit
ccb582b278
|
@ -1,8 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import "log"
|
||||||
"log"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := generateFeatureMatrix(); err != nil {
|
if err := generateFeatureMatrix(); err != nil {
|
||||||
|
|
|
@ -7,11 +7,10 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/js"
|
"github.com/StackExchange/dnscontrol/v3/pkg/js"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// categories of commands
|
// categories of commands
|
||||||
|
|
|
@ -2,10 +2,10 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = cmd(catUtils, func() *cli.Command {
|
var _ = cmd(catUtils, func() *cli.Command {
|
||||||
|
|
|
@ -6,9 +6,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/andreyvit/diff"
|
|
||||||
|
|
||||||
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
|
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
|
||||||
|
"github.com/andreyvit/diff"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFormatTypes(t *testing.T) {
|
func TestFormatTypes(t *testing.T) {
|
||||||
|
|
|
@ -6,8 +6,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
|
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
|
||||||
|
@ -15,7 +13,7 @@ import (
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/notifications"
|
"github.com/StackExchange/dnscontrol/v3/pkg/notifications"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
"golang.org/x/exp/slices"
|
"golang.org/x/exp/slices"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/js"
|
"github.com/StackExchange/dnscontrol/v3/pkg/js"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
|
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = cmd(catDebug, func() *cli.Command {
|
var _ = cmd(catDebug, func() *cli.Command {
|
||||||
|
|
|
@ -203,7 +203,7 @@ func makeChanges(t *testing.T, prv providers.DNSServiceProvider, dc *models.Doma
|
||||||
dom2, _ := dom.Copy()
|
dom2, _ := dom.Copy()
|
||||||
|
|
||||||
if err := providers.AuditRecords(*providerToRun, dom.Records); err != nil {
|
if err := providers.AuditRecords(*providerToRun, dom.Records); err != nil {
|
||||||
t.Skip(fmt.Sprintf("***SKIPPED(PROVIDER DOES NOT SUPPORT '%s' ::%q)", err, desc))
|
t.Skipf("***SKIPPED(PROVIDER DOES NOT SUPPORT '%s' ::%q)", err, desc)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestRR(t *testing.T) {
|
func TestRR(t *testing.T) {
|
||||||
experiment := RecordConfig{
|
experiment := RecordConfig{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestIsQuoted(t *testing.T) {
|
func TestIsQuoted(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestToNameservers(t *testing.T) {
|
func TestToNameservers(t *testing.T) {
|
||||||
nss, e := ToNameservers([]string{"example.com", "example2.tld"})
|
nss, e := ToNameservers([]string{"example.com", "example2.tld"})
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/go-acme/lego/certificate"
|
"github.com/go-acme/lego/certificate"
|
||||||
|
|
||||||
"github.com/hashicorp/vault/api"
|
"github.com/hashicorp/vault/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/gobwas/glob"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
"github.com/gobwas/glob"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Correlation stores a difference between two domains.
|
// Correlation stores a difference between two domains.
|
||||||
|
|
|
@ -9,17 +9,15 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
||||||
"github.com/robertkrimen/otto" // load underscore js into vm by default
|
"github.com/robertkrimen/otto" // load underscore js into vm by default
|
||||||
_ "github.com/robertkrimen/otto/underscore" // required by otto
|
_ "github.com/robertkrimen/otto/underscore" // required by otto
|
||||||
|
|
||||||
"github.com/xddxdd/ottoext/fetch"
|
"github.com/xddxdd/ottoext/fetch"
|
||||||
"github.com/xddxdd/ottoext/loop"
|
"github.com/xddxdd/ottoext/loop"
|
||||||
"github.com/xddxdd/ottoext/promise"
|
"github.com/xddxdd/ottoext/promise"
|
||||||
"github.com/xddxdd/ottoext/timers"
|
"github.com/xddxdd/ottoext/timers"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed helpers.js
|
//go:embed helpers.js
|
||||||
|
|
|
@ -9,12 +9,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
testifyrequire "github.com/stretchr/testify/require"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
|
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
|
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
|
||||||
|
testifyrequire "github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package rejectif
|
package rejectif
|
||||||
|
|
||||||
import (
|
import "github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Auditor stores a list of checks to be executed during Audit().
|
// Auditor stores a list of checks to be executed during Audit().
|
||||||
type Auditor struct {
|
type Auditor struct {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package transform
|
package transform
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
import "fmt"
|
"fmt"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
func TestReverse(t *testing.T) {
|
func TestReverse(t *testing.T) {
|
||||||
var tests = []struct {
|
var tests = []struct {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package txtutil
|
package txtutil
|
||||||
|
|
||||||
import (
|
import "github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SplitSingleLongTxt finds TXT records with a single long string and splits it
|
// SplitSingleLongTxt finds TXT records with a single long string and splits it
|
||||||
// into 255-octet chunks. This is used by providers that, when a user specifies
|
// into 255-octet chunks. This is used by providers that, when a user specifies
|
||||||
|
|
|
@ -10,6 +10,7 @@ https://github.com/akamai/AkamaiOPEN-edgegrid-golang
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
dnsv2 "github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2"
|
dnsv2 "github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2"
|
||||||
|
|
|
@ -25,7 +25,7 @@ type ZoneListRequest struct {
|
||||||
Filter []*ZoneListFilter `json:"filters"`
|
Filter []*ZoneListFilter `json:"filters"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *autoDnsProvider) request(method string, requestPath string, data interface{}) ([]byte, error) {
|
func (api *autoDNSProvider) request(method string, requestPath string, data interface{}) ([]byte, error) {
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
|
|
||||||
requestURL := api.baseURL
|
requestURL := api.baseURL
|
||||||
|
@ -57,7 +57,7 @@ func (api *autoDnsProvider) request(method string, requestPath string, data inte
|
||||||
return responseText, nil
|
return responseText, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *autoDnsProvider) findZoneSystemNameServer(domain string) (*models.Nameserver, error) {
|
func (api *autoDNSProvider) findZoneSystemNameServer(domain string) (*models.Nameserver, error) {
|
||||||
request := &ZoneListRequest{}
|
request := &ZoneListRequest{}
|
||||||
|
|
||||||
request.Filter = append(request.Filter, &ZoneListFilter{
|
request.Filter = append(request.Filter, &ZoneListFilter{
|
||||||
|
@ -82,7 +82,7 @@ func (api *autoDnsProvider) findZoneSystemNameServer(domain string) (*models.Nam
|
||||||
return systemNameServer, nil
|
return systemNameServer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *autoDnsProvider) getZone(domain string) (*Zone, error) {
|
func (api *autoDNSProvider) getZone(domain string) (*Zone, error) {
|
||||||
systemNameServer, err := api.findZoneSystemNameServer(domain)
|
systemNameServer, err := api.findZoneSystemNameServer(domain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -100,7 +100,7 @@ func (api *autoDnsProvider) getZone(domain string) (*Zone, error) {
|
||||||
return responseObject.Data[0], nil
|
return responseObject.Data[0], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *autoDnsProvider) updateZone(domain string, resourceRecords []*ResourceRecord, nameServers []*models.Nameserver, zoneTTL uint32) error {
|
func (api *autoDNSProvider) updateZone(domain string, resourceRecords []*ResourceRecord, nameServers []*models.Nameserver, zoneTTL uint32) error {
|
||||||
systemNameServer, err := api.findZoneSystemNameServer(domain)
|
systemNameServer, err := api.findZoneSystemNameServer(domain)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -3,7 +3,6 @@ package autodns
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
@ -12,6 +11,7 @@ import (
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,7 @@ var features = providers.DocumentationNotes{
|
||||||
providers.CanUseTLSA: providers.Cannot(),
|
providers.CanUseTLSA: providers.Cannot(),
|
||||||
}
|
}
|
||||||
|
|
||||||
type autoDnsProvider struct {
|
type autoDNSProvider struct {
|
||||||
baseURL url.URL
|
baseURL url.URL
|
||||||
defaultHeaders http.Header
|
defaultHeaders http.Header
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ func init() {
|
||||||
|
|
||||||
// New creates a new API handle.
|
// New creates a new API handle.
|
||||||
func New(settings map[string]string, _ json.RawMessage) (providers.DNSServiceProvider, error) {
|
func New(settings map[string]string, _ json.RawMessage) (providers.DNSServiceProvider, error) {
|
||||||
api := &autoDnsProvider{}
|
api := &autoDNSProvider{}
|
||||||
|
|
||||||
api.baseURL = url.URL{
|
api.baseURL = url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
|
@ -67,7 +67,7 @@ func New(settings map[string]string, _ json.RawMessage) (providers.DNSServicePro
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDomainCorrections returns the corrections for a domain.
|
// GetDomainCorrections returns the corrections for a domain.
|
||||||
func (api *autoDnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
func (api *autoDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||||
var changes []*models.RecordConfig
|
var changes []*models.RecordConfig
|
||||||
|
|
||||||
dc, err := dc.Copy()
|
dc, err := dc.Copy()
|
||||||
|
@ -169,7 +169,7 @@ func (api *autoDnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mo
|
||||||
err := api.updateZone(domain, resourceRecords, nameServers, zoneTTL)
|
err := api.updateZone(domain, resourceRecords, nameServers, zoneTTL)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf(err.Error())
|
return fmt.Errorf(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -181,7 +181,7 @@ func (api *autoDnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mo
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNameservers returns the nameservers for a domain.
|
// GetNameservers returns the nameservers for a domain.
|
||||||
func (api *autoDnsProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
func (api *autoDNSProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
||||||
zone, err := api.getZone(domain)
|
zone, err := api.getZone(domain)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -192,7 +192,7 @@ func (api *autoDnsProvider) GetNameservers(domain string) ([]*models.Nameserver,
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||||
func (api *autoDnsProvider) GetZoneRecords(domain string) (models.Records, error) {
|
func (api *autoDNSProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||||
zone, _ := api.getZone(domain)
|
zone, _ := api.getZone(domain)
|
||||||
existingRecords := make([]*models.RecordConfig, len(zone.ResourceRecords))
|
existingRecords := make([]*models.RecordConfig, len(zone.ResourceRecords))
|
||||||
for i, resourceRecord := range zone.ResourceRecords {
|
for i, resourceRecord := range zone.ResourceRecords {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers/bind"
|
"github.com/StackExchange/dnscontrol/v3/providers/bind"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ResourceRecord represents DNS records in API calls.
|
||||||
type ResourceRecord struct {
|
type ResourceRecord struct {
|
||||||
|
|
||||||
// The name of the record.
|
// The name of the record.
|
||||||
|
@ -29,6 +30,7 @@ type ResourceRecord struct {
|
||||||
Value string `json:"value,omitempty"`
|
Value string `json:"value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MainAddressRecord represents an address record in API calls.
|
||||||
type MainAddressRecord struct {
|
type MainAddressRecord struct {
|
||||||
|
|
||||||
// TTL of the record (Optionally if not set then Default SOA TTL is used)
|
// TTL of the record (Optionally if not set then Default SOA TTL is used)
|
||||||
|
@ -38,6 +40,7 @@ type MainAddressRecord struct {
|
||||||
Value string `json:"address,omitempty"`
|
Value string `json:"address,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Zone represents the Zone in API calls.
|
||||||
type Zone struct {
|
type Zone struct {
|
||||||
Origin string `json:"origin"`
|
Origin string `json:"origin"`
|
||||||
|
|
||||||
|
@ -60,6 +63,7 @@ type Zone struct {
|
||||||
SystemNameServer string `json:"virtualNameServer,omitempty"`
|
SystemNameServer string `json:"virtualNameServer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// JSONResponseDataZone represents the response to the DataZone call.
|
||||||
type JSONResponseDataZone struct {
|
type JSONResponseDataZone struct {
|
||||||
|
|
||||||
// The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response.
|
// The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response.
|
||||||
|
|
|
@ -17,19 +17,18 @@ import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
aauth "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
aauth "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||||
adns "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
|
adns "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
|
||||||
"github.com/Azure/go-autorest/autorest/to"
|
"github.com/Azure/go-autorest/autorest/to"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
|
|
@ -22,15 +22,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
var features = providers.DocumentationNotes{
|
var features = providers.DocumentationNotes{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package bind
|
package bind
|
||||||
|
|
||||||
import (
|
import "github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
func makeSoa(origin string, defSoa *SoaDefaults, existing, desired *models.RecordConfig) (*models.RecordConfig, uint32) {
|
func makeSoa(origin string, defSoa *SoaDefaults, existing, desired *models.RecordConfig) (*models.RecordConfig, uint32) {
|
||||||
// Create a SOA record. Take data from desired, existing, default,
|
// Create a SOA record. Take data from desired, existing, default,
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
package providers
|
package providers
|
||||||
|
|
||||||
import (
|
import "log"
|
||||||
"log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Capability is a bitmasked set of "features" that a provider supports. Only use constants from this package.
|
// Capability is a bitmasked set of "features" that a provider supports. Only use constants from this package.
|
||||||
type Capability uint32
|
type Capability uint32
|
||||||
|
|
|
@ -7,14 +7,13 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudflare/cloudflare-go"
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/cloudflare/cloudflare-go"
|
||||||
|
"github.com/miekg/dns/dnsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -150,13 +150,13 @@ func (c *cloudflareProvider) createRec(rec *models.RecordConfig, domainID string
|
||||||
} else if rec.Type == "DS" {
|
} else if rec.Type == "DS" {
|
||||||
cf.Data = cfDSData(rec)
|
cf.Data = cfDSData(rec)
|
||||||
}
|
}
|
||||||
if resp, err := c.cfClient.CreateDNSRecord(context.Background(), domainID, cf); err != nil {
|
resp, err := c.cfClient.CreateDNSRecord(context.Background(), domainID, cf)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
// Updating id (from the outer scope) by side-effect, required for updating proxy mode
|
|
||||||
id = resp.Result.ID
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
// Updating id (from the outer scope) by side-effect, required for updating proxy mode
|
||||||
|
id = resp.Result.ID
|
||||||
|
return nil
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
if rec.Metadata[metaProxy] != "off" {
|
if rec.Metadata[metaProxy] != "off" {
|
||||||
|
|
|
@ -6,11 +6,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/miekg/dns/dnsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -12,7 +12,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
|
||||||
"github.com/mattn/go-isatty"
|
"github.com/mattn/go-isatty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package desec
|
package desec
|
||||||
|
|
||||||
import (
|
import "github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AuditRecords returns a list of errors corresponding to the records
|
// AuditRecords returns a list of errors corresponding to the records
|
||||||
// that aren't supported by this provider. If all records are
|
// that aren't supported by this provider. If all records are
|
||||||
|
|
|
@ -4,6 +4,7 @@ package desec
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,9 +12,8 @@ import (
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
"github.com/miekg/dns/dnsutil"
|
|
||||||
|
|
||||||
"github.com/digitalocean/godo"
|
"github.com/digitalocean/godo"
|
||||||
|
"github.com/miekg/dns/dnsutil"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,12 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
dnsimpleapi "github.com/dnsimple/dnsimple-go/dnsimple"
|
|
||||||
"golang.org/x/oauth2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
dnsimpleapi "github.com/dnsimple/dnsimple-go/dnsimple"
|
||||||
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var features = providers.DocumentationNotes{
|
var features = providers.DocumentationNotes{
|
||||||
|
|
|
@ -2,9 +2,10 @@ package dnsmadeeasy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type dnsMadeEasyProvider struct {
|
type dnsMadeEasyProvider struct {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package domainnameshop
|
package domainnameshop
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestFixTTL(t *testing.T) {
|
func TestFixTTL(t *testing.T) {
|
||||||
for i, test := range []struct {
|
for i, test := range []struct {
|
||||||
|
|
|
@ -4,14 +4,13 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/exoscale/egoscale"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/exoscale/egoscale"
|
||||||
)
|
)
|
||||||
|
|
||||||
type exoscaleProvider struct {
|
type exoscaleProvider struct {
|
||||||
|
|
|
@ -5,10 +5,9 @@ package gandiv5
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-gandi/go-gandi/livedns"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
|
"github.com/go-gandi/go-gandi/livedns"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nativeToRecord takes a DNS record from Gandi and returns a native RecordConfig struct.
|
// nativeToRecord takes a DNS record from Gandi and returns a native RecordConfig struct.
|
||||||
|
|
|
@ -21,17 +21,14 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
//gandi "github.com/go-gandi/go-gandi"
|
|
||||||
"github.com/go-gandi/go-gandi"
|
|
||||||
"github.com/go-gandi/go-gandi/config"
|
|
||||||
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/go-gandi/go-gandi"
|
||||||
|
"github.com/go-gandi/go-gandi/config"
|
||||||
|
"github.com/miekg/dns/dnsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Section 1: Register this provider in the system.
|
// Section 1: Register this provider in the system.
|
||||||
|
|
|
@ -9,18 +9,15 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
|
|
||||||
"google.golang.org/api/googleapi"
|
|
||||||
"google.golang.org/api/option"
|
|
||||||
|
|
||||||
gauth "golang.org/x/oauth2/google"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
gauth "golang.org/x/oauth2/google"
|
||||||
gdns "google.golang.org/api/dns/v1"
|
gdns "google.golang.org/api/dns/v1"
|
||||||
|
"google.golang.org/api/googleapi"
|
||||||
|
"google.golang.org/api/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
var features = providers.DocumentationNotes{
|
var features = providers.DocumentationNotes{
|
||||||
|
@ -86,7 +83,7 @@ func New(cfg map[string]string, metadata json.RawMessage) (providers.DNSServiceP
|
||||||
var err error
|
var err error
|
||||||
hc, err = gauth.DefaultClient(ctx, "https://www.googleapis.com/auth/ndev.clouddns.readwrite")
|
hc, err = gauth.DefaultClient(ctx, "https://www.googleapis.com/auth/ndev.clouddns.readwrite")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("No creds.json private_key found and ADC failed with:\n%s", err)
|
return nil, fmt.Errorf("no creds.json private_key found and ADC failed with:\n%s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME(tlim): Is it a problem that ctx is included with hc and in
|
// FIXME(tlim): Is it a problem that ctx is included with hc and in
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package hetzner
|
package hetzner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type bulkCreateRecordsRequest struct {
|
type bulkCreateRecordsRequest struct {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package hexonet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/hexonet/go-sdk/v3/response"
|
"github.com/hexonet/go-sdk/v3/response"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ package hexonet
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/version"
|
"github.com/StackExchange/dnscontrol/v3/pkg/version"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
hxcl "github.com/hexonet/go-sdk/v3/apiclient"
|
hxcl "github.com/hexonet/go-sdk/v3/apiclient"
|
||||||
|
|
|
@ -4,13 +4,13 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -160,12 +160,13 @@ func toRecord(r *HXRecord, origin string) *models.RecordConfig {
|
||||||
return rc
|
return rc
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *HXClient) showCommand(cmd map[string]string) {
|
func (n *HXClient) showCommand(cmd map[string]string) error {
|
||||||
b, err := json.MarshalIndent(cmd, "", " ")
|
b, err := json.MarshalIndent(cmd, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("error: %w", err)
|
return fmt.Errorf("error: %w", err)
|
||||||
}
|
}
|
||||||
printer.Printf(string(b))
|
printer.Printf(string(b))
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *HXClient) updateZoneBy(params map[string]interface{}, domain string) error {
|
func (n *HXClient) updateZoneBy(params map[string]interface{}, domain string) error {
|
||||||
|
|
|
@ -3,16 +3,15 @@ package inwx
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
|
||||||
"github.com/nrdcg/goinwx"
|
"github.com/nrdcg/goinwx"
|
||||||
"github.com/pquerna/otp/totp"
|
"github.com/pquerna/otp/totp"
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,12 +9,11 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
|
||||||
"golang.org/x/oauth2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/miekg/dns/dnsutil"
|
||||||
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package linode
|
package linode
|
||||||
|
|
||||||
import (
|
import "testing"
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestFixTTL(t *testing.T) {
|
func TestFixTTL(t *testing.T) {
|
||||||
for i, test := range []struct {
|
for i, test := range []struct {
|
||||||
|
|
|
@ -114,7 +114,8 @@ func nativeToRecords(nr nativeRecord, origin string) (*models.RecordConfig, erro
|
||||||
// uprops["SerialNumber"], uprops["RefreshInterval"], uprops["RetryDelay"],
|
// uprops["SerialNumber"], uprops["RefreshInterval"], uprops["RetryDelay"],
|
||||||
// uprops["ExpireLimit"], uprops["MinimumTimeToLive"])
|
// uprops["ExpireLimit"], uprops["MinimumTimeToLive"])
|
||||||
case "TXT":
|
case "TXT":
|
||||||
rc.SetTargetTXTString(sprops["DescriptiveText"])
|
//rc.SetTargetTXTString(sprops["DescriptiveText"])
|
||||||
|
rc.SetTargetTXTfromRFC1035Quoted(sprops["DescriptiveText"])
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf(
|
return nil, fmt.Errorf(
|
||||||
"msdns/convert.go:nativeToRecord rtype=%q unknown: props=%+v and %+v",
|
"msdns/convert.go:nativeToRecord rtype=%q unknown: props=%+v and %+v",
|
||||||
|
|
|
@ -4,9 +4,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,11 +7,11 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"log"
|
"log"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func generatePSCreateNaptr(dnsServerName, domain string, rec *models.RecordConfig) string {
|
func generatePSCreateNaptr(dnsServerName, domain string, rec *models.RecordConfig) string {
|
||||||
|
|
|
@ -7,9 +7,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/TomOnTime/utfutil"
|
"github.com/TomOnTime/utfutil"
|
||||||
ps "github.com/bhendo/go-powershell"
|
ps "github.com/bhendo/go-powershell"
|
||||||
"github.com/bhendo/go-powershell/backend"
|
"github.com/bhendo/go-powershell/backend"
|
||||||
|
|
|
@ -7,13 +7,12 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
nc "github.com/billputer/go-namecheap"
|
|
||||||
"golang.org/x/net/publicsuffix"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
nc "github.com/billputer/go-namecheap"
|
||||||
|
"golang.org/x/net/publicsuffix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NamecheapDefaultNs lists the default nameservers for this provider.
|
// NamecheapDefaultNs lists the default nameservers for this provider.
|
||||||
|
|
|
@ -6,9 +6,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/namedotcom/go/namecom"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/namedotcom/go/namecom"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultAPIBase = "api.name.com"
|
const defaultAPIBase = "api.name.com"
|
||||||
|
|
|
@ -6,10 +6,9 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/namedotcom/go/namecom"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
|
"github.com/namedotcom/go/namecom"
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultNameservers = []*models.Nameserver{
|
var defaultNameservers = []*models.Nameserver{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package namedotcom
|
package namedotcom
|
||||||
|
|
||||||
import (
|
import "github.com/namedotcom/go/namecom"
|
||||||
"github.com/namedotcom/go/namecom"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ListZones returns all the zones in an account
|
// ListZones returns all the zones in an account
|
||||||
func (n *namedotcomProvider) ListZones() ([]string, error) {
|
func (n *namedotcomProvider) ListZones() ([]string, error) {
|
||||||
|
|
|
@ -3,10 +3,9 @@ package netcup
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
// no need for txtutil.SplitSingleLongTxt in function GetDomainCorrections
|
|
||||||
// "github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,12 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/ns1/ns1-go.v2/rest"
|
|
||||||
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
|
|
||||||
"gopkg.in/ns1/ns1-go.v2/rest/model/filter"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"gopkg.in/ns1/ns1-go.v2/rest"
|
||||||
|
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
|
||||||
|
"gopkg.in/ns1/ns1-go.v2/rest/model/filter"
|
||||||
)
|
)
|
||||||
|
|
||||||
var docNotes = providers.DocumentationNotes{
|
var docNotes = providers.DocumentationNotes{
|
||||||
|
|
|
@ -22,7 +22,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -30,6 +29,7 @@ import (
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"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/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers/octodns/octoyaml"
|
"github.com/StackExchange/dnscontrol/v3/providers/octodns/octoyaml"
|
||||||
|
|
|
@ -4,14 +4,10 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
"github.com/StackExchange/dnscontrol/v3/pkg/transform"
|
||||||
|
|
||||||
"github.com/robertkrimen/otto"
|
"github.com/robertkrimen/otto"
|
||||||
// load underscore js into vm by default
|
|
||||||
|
|
||||||
_ "github.com/robertkrimen/otto/underscore" // required by otto
|
_ "github.com/robertkrimen/otto/underscore" // required by otto
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
yaml "gopkg.in/yaml.v2"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
yaml "gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReadYaml parses a yaml input and returns a list of RecordConfigs
|
// ReadYaml parses a yaml input and returns a list of RecordConfigs
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
|
||||||
opensrs "github.com/philhug/opensrs-go/opensrs"
|
opensrs "github.com/philhug/opensrs-go/opensrs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,14 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/oracle/oci-go-sdk/v32/dns"
|
|
||||||
|
|
||||||
"github.com/oracle/oci-go-sdk/v32/common"
|
|
||||||
"github.com/oracle/oci-go-sdk/v32/example/helpers"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/oracle/oci-go-sdk/v32/common"
|
||||||
|
"github.com/oracle/oci-go-sdk/v32/dns"
|
||||||
|
"github.com/oracle/oci-go-sdk/v32/example/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var features = providers.DocumentationNotes{
|
var features = providers.DocumentationNotes{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package powerdns
|
package powerdns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/mittwald/go-powerdns/apis/zones"
|
"github.com/mittwald/go-powerdns/apis/zones"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// toRecordConfig converts a PowerDNS DNSRecord to a RecordConfig. #rtype_variations
|
// toRecordConfig converts a PowerDNS DNSRecord to a RecordConfig. #rtype_variations
|
||||||
|
|
|
@ -2,11 +2,12 @@ package powerdns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mittwald/go-powerdns/apis/zones"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/mittwald/go-powerdns/apis/zones"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
import "github.com/stretchr/testify/assert"
|
|
||||||
|
|
||||||
func TestToRecordConfig(t *testing.T) {
|
func TestToRecordConfig(t *testing.T) {
|
||||||
record := zones.Record{
|
record := zones.Record{
|
||||||
|
|
|
@ -2,12 +2,13 @@ package powerdns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/mittwald/go-powerdns/apis/zones"
|
"github.com/mittwald/go-powerdns/apis/zones"
|
||||||
"github.com/mittwald/go-powerdns/pdnshttp"
|
"github.com/mittwald/go-powerdns/pdnshttp"
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetNameservers returns the nameservers for a domain.
|
// GetNameservers returns the nameservers for a domain.
|
||||||
|
|
|
@ -3,6 +3,7 @@ package powerdns
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
pdns "github.com/mittwald/go-powerdns"
|
pdns "github.com/mittwald/go-powerdns"
|
||||||
|
|
|
@ -11,8 +11,11 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"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/printer"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
"github.com/aws/aws-sdk-go-v2/config"
|
"github.com/aws/aws-sdk-go-v2/config"
|
||||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||||
|
@ -20,11 +23,6 @@ import (
|
||||||
r53Types "github.com/aws/aws-sdk-go-v2/service/route53/types"
|
r53Types "github.com/aws/aws-sdk-go-v2/service/route53/types"
|
||||||
r53d "github.com/aws/aws-sdk-go-v2/service/route53domains"
|
r53d "github.com/aws/aws-sdk-go-v2/service/route53domains"
|
||||||
r53dTypes "github.com/aws/aws-sdk-go-v2/service/route53domains/types"
|
r53dTypes "github.com/aws/aws-sdk-go-v2/service/route53domains/types"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type route53Provider struct {
|
type route53Provider struct {
|
||||||
|
|
|
@ -22,6 +22,7 @@ const (
|
||||||
baseURL = "https://noc-portal.rz.rwth-aachen.de/dns-admin/api/v1"
|
baseURL = "https://noc-portal.rz.rwth-aachen.de/dns-admin/api/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RecordReply represents a DNS Record in an API.
|
||||||
type RecordReply struct {
|
type RecordReply struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
ZoneID int `json:"zone_id"`
|
ZoneID int `json:"zone_id"`
|
||||||
|
|
|
@ -2,11 +2,12 @@ package rwth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
"github.com/StackExchange/dnscontrol/v3/pkg/prettyzone"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"io"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Print the generateZoneFileHelper
|
// Print the generateZoneFileHelper
|
||||||
|
@ -46,6 +47,7 @@ func NewRR(s string) (dns.RR, error) {
|
||||||
return ReadRR(strings.NewReader(s))
|
return ReadRR(strings.NewReader(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReadRR reads an RR from r.
|
||||||
func ReadRR(r io.Reader) (dns.RR, error) {
|
func ReadRR(r io.Reader) (dns.RR, error) {
|
||||||
zp := dns.NewZoneParser(r, ".", "")
|
zp := dns.NewZoneParser(r, ".", "")
|
||||||
zp.SetDefaultTTL(172800)
|
zp.SetDefaultTTL(172800)
|
||||||
|
|
|
@ -2,11 +2,13 @@ package rwth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RWTHDefaultNs is the default DNS NS for this provider.
|
||||||
var RWTHDefaultNs = []string{"dns-1.dfn.de", "dns-2.dfn.de", "zs1.rz.rwth-aachen.de", "zs2.rz.rwth-aachen.de"}
|
var RWTHDefaultNs = []string{"dns-1.dfn.de", "dns-2.dfn.de", "zs1.rz.rwth-aachen.de", "zs2.rz.rwth-aachen.de"}
|
||||||
|
|
||||||
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||||
|
@ -27,6 +29,7 @@ func (api *rwthProvider) GetNameservers(domain string) ([]*models.Nameserver, er
|
||||||
return models.ToNameservers(RWTHDefaultNs)
|
return models.ToNameservers(RWTHDefaultNs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetDomainCorrections returns a list of corretions to execute.
|
||||||
func (api *rwthProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
func (api *rwthProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||||
dc, err := dc.Copy()
|
dc, err := dc.Copy()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package rwth
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ func init() {
|
||||||
providers.RegisterDomainServiceProviderType("RWTH", fns, features)
|
providers.RegisterDomainServiceProviderType("RWTH", fns, features)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New allocates a DNS service provider.
|
||||||
func New(settings map[string]string, _ json.RawMessage) (providers.DNSServiceProvider, error) {
|
func New(settings map[string]string, _ json.RawMessage) (providers.DNSServiceProvider, error) {
|
||||||
if settings["api_token"] == "" {
|
if settings["api_token"] == "" {
|
||||||
return nil, fmt.Errorf("missing RWTH api_token")
|
return nil, fmt.Errorf("missing RWTH api_token")
|
||||||
|
|
|
@ -3,18 +3,17 @@ package softlayer
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"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/providers"
|
||||||
"github.com/softlayer/softlayer-go/datatypes"
|
"github.com/softlayer/softlayer-go/datatypes"
|
||||||
"github.com/softlayer/softlayer-go/filter"
|
"github.com/softlayer/softlayer-go/filter"
|
||||||
"github.com/softlayer/softlayer-go/services"
|
"github.com/softlayer/softlayer-go/services"
|
||||||
"github.com/softlayer/softlayer-go/session"
|
"github.com/softlayer/softlayer-go/session"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// softlayerProvider is the protocol handle for this provider.
|
// softlayerProvider is the protocol handle for this provider.
|
||||||
|
|
|
@ -8,11 +8,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/vultr/govultr"
|
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||||
|
"github.com/vultr/govultr"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue