googledns

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, s string) bool

func Diff

func Diff(s1 []string, s2 []string) []string

func MakeResourceRecordSet

func MakeResourceRecordSet(domain string, ips []string, ttl int) []*dns.ResourceRecordSet

func UniqueMerge

func UniqueMerge(s1 []string, s2 []string) []string

Types

type Config

type Config struct {
	Project            string
	PropagationTimeout time.Duration
	PollingInterval    time.Duration
	TTL                int
	HTTPClient         *http.Client `json:"-"`
}

Config is used to configure the creation of the DNSProvider

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig returns a default configuration for the DNSProvider

type DNSProvider

type DNSProvider struct {
	Config *Config
	Client *dns.Service
}

DNSProvider is an implementation of the DNSProvider interface.

func NewDNSProvider

func NewDNSProvider() (*DNSProvider, error)

func NewDNSProviderConfig

func NewDNSProviderConfig(config *Config) (*DNSProvider, error)

NewDNSProviderConfig return a DNSProvider instance configured for Google Cloud DNS.

func NewDNSProviderServiceAccount

func NewDNSProviderServiceAccount(saFile string) (*DNSProvider, error)

NewDNSProviderServiceAccount uses the supplied service account JSON file to return a DNSProvider instance configured for Google Cloud DNS.

func (*DNSProvider) GetResourceRecordSets

func (d *DNSProvider) GetResourceRecordSets(domain string) ([]string, error)

func (*DNSProvider) MakeChange

func (d *DNSProvider) MakeChange(rec DNSRecord, adding bool) error

type DNSRecord

type DNSRecord struct {
	Ips    *[]net.IP
	Domain *string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL