provider

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 79 Imported by: 35

Documentation

Index

Constants

View Source
const (
	// DigitalOceanCreate is a ChangeAction enum value
	DigitalOceanCreate = "CREATE"
	// DigitalOceanDelete is a ChangeAction enum value
	DigitalOceanDelete = "DELETE"
	// DigitalOceanUpdate is a ChangeAction enum value
	DigitalOceanUpdate = "UPDATE"
)
View Source
const (

	// PdnsDelete : PowerDNS changetype used for deleting rrsets
	// ref: https://doc.powerdns.com/authoritative/http-api/zone.html#rrset (see "changetype")
	PdnsDelete pdnsChangeType = "DELETE"
	// PdnsReplace : PowerDNS changetype for creating, updating and patching rrsets
	PdnsReplace pdnsChangeType = "REPLACE"
)

Variables

View Source
var (
	// ErrZoneAlreadyExists error returned when zone cannot be created when it already exists
	ErrZoneAlreadyExists = errors.New("specified zone already exists")
	// ErrZoneNotFound error returned when specified zone does not exists
	ErrZoneNotFound = errors.New("specified zone not found")
	// ErrRecordAlreadyExists when create request is sent but record already exists
	ErrRecordAlreadyExists = errors.New("record already exists")
	// ErrRecordNotFound when update/delete request is sent but record not found
	ErrRecordNotFound = errors.New("record not found")
	// ErrDuplicateRecordFound when record is repeated in create/update/delete
	ErrDuplicateRecordFound = errors.New("invalid batch request")
)
View Source
var RecordsContextKey = &contextKey{"records"}

RecordsContextKey is a context key. It can be used during ApplyChanges to access previously cached records. The associated value will be of type []*endpoint.Endpoint.

Functions

This section is empty.

Types

type AWSConfig added in v0.5.4

type AWSConfig struct {
	DomainFilter         DomainFilter
	ZoneIDFilter         ZoneIDFilter
	ZoneTypeFilter       ZoneTypeFilter
	ZoneTagFilter        ZoneTagFilter
	BatchChangeSize      int
	BatchChangeInterval  time.Duration
	EvaluateTargetHealth bool
	AssumeRole           string
	APIRetries           int
	PreferCNAME          bool
	DryRun               bool
}

AWSConfig contains configuration to create a new AWS provider.

type AWSProvider

type AWSProvider struct {
	// contains filtered or unexported fields
}

AWSProvider is an implementation of Provider for AWS Route53.

func NewAWSProvider

func NewAWSProvider(awsConfig AWSConfig) (*AWSProvider, error)

NewAWSProvider initializes a new AWS Route53 based Provider.

func (*AWSProvider) ApplyChanges

func (p *AWSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*AWSProvider) CreateRecords

func (p *AWSProvider) CreateRecords(ctx context.Context, endpoints []*endpoint.Endpoint) error

CreateRecords creates a given set of DNS records in the given hosted zone.

func (*AWSProvider) DeleteRecords

func (p *AWSProvider) DeleteRecords(ctx context.Context, endpoints []*endpoint.Endpoint) error

DeleteRecords deletes a given set of DNS records in a given zone.

func (*AWSProvider) Records

func (p *AWSProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records returns the list of records in a given hosted zone.

func (*AWSProvider) UpdateRecords

func (p *AWSProvider) UpdateRecords(ctx context.Context, endpoints, _ []*endpoint.Endpoint) error

UpdateRecords updates a given set of old records to a new set of records in a given hosted zone.

func (*AWSProvider) Zones

func (p *AWSProvider) Zones(ctx context.Context) (map[string]*route53.HostedZone, error)

Zones returns the list of hosted zones.

type AWSSDClient added in v0.5.2

type AWSSDClient interface {
	CreateService(input *sd.CreateServiceInput) (*sd.CreateServiceOutput, error)
	DeregisterInstance(input *sd.DeregisterInstanceInput) (*sd.DeregisterInstanceOutput, error)
	GetService(input *sd.GetServiceInput) (*sd.GetServiceOutput, error)
	ListInstancesPages(input *sd.ListInstancesInput, fn func(*sd.ListInstancesOutput, bool) bool) error
	ListNamespacesPages(input *sd.ListNamespacesInput, fn func(*sd.ListNamespacesOutput, bool) bool) error
	ListServicesPages(input *sd.ListServicesInput, fn func(*sd.ListServicesOutput, bool) bool) error
	RegisterInstance(input *sd.RegisterInstanceInput) (*sd.RegisterInstanceOutput, error)
	UpdateService(input *sd.UpdateServiceInput) (*sd.UpdateServiceOutput, error)
}

AWSSDClient is the subset of the AWS Cloud Map API that we actually use. Add methods as required. Signatures must match exactly. Taken from https://github.com/aws/aws-sdk-go/blob/master/service/servicediscovery/api.go

type AWSSDProvider added in v0.5.2

type AWSSDProvider struct {
	// contains filtered or unexported fields
}

AWSSDProvider is an implementation of Provider for AWS Cloud Map.

func NewAWSSDProvider added in v0.5.2

func NewAWSSDProvider(domainFilter DomainFilter, namespaceType string, assumeRole string, dryRun bool) (*AWSSDProvider, error)

NewAWSSDProvider initializes a new AWS Cloud Map based Provider.

func (*AWSSDProvider) ApplyChanges added in v0.5.2

func (p *AWSSDProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies Kubernetes changes in endpoints to AWS API

func (*AWSSDProvider) CreateService added in v0.5.2

func (p *AWSSDProvider) CreateService(namespaceID *string, srvName *string, ep *endpoint.Endpoint) (*sd.Service, error)

CreateService creates a new service in AWS API. Returns the created service.

func (*AWSSDProvider) DeregisterInstance added in v0.5.2

func (p *AWSSDProvider) DeregisterInstance(service *sd.Service, ep *endpoint.Endpoint) error

DeregisterInstance removes an instance from given service.

func (*AWSSDProvider) GetServiceDetail added in v0.5.2

func (p *AWSSDProvider) GetServiceDetail(serviceID *string) (*sd.Service, error)

GetServiceDetail returns detail of given service

func (*AWSSDProvider) ListInstancesByServiceID added in v0.5.2

func (p *AWSSDProvider) ListInstancesByServiceID(serviceID *string) ([]*sd.InstanceSummary, error)

ListInstancesByServiceID returns list of instances registered in given service.

func (*AWSSDProvider) ListNamespaces added in v0.5.2

func (p *AWSSDProvider) ListNamespaces() ([]*sd.NamespaceSummary, error)

ListNamespaces returns all namespaces matching defined namespace filter

func (*AWSSDProvider) ListServicesByNamespaceID added in v0.5.2

func (p *AWSSDProvider) ListServicesByNamespaceID(namespaceID *string) (map[string]*sd.Service, error)

ListServicesByNamespaceID returns list of services in given namespace. Returns map[srv_name]*sd.Service

func (*AWSSDProvider) Records added in v0.5.2

func (p *AWSSDProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, err error)

Records returns list of all endpoints.

func (*AWSSDProvider) RegisterInstance added in v0.5.2

func (p *AWSSDProvider) RegisterInstance(service *sd.Service, ep *endpoint.Endpoint) error

RegisterInstance creates a new instance in given service.

func (*AWSSDProvider) UpdateService added in v0.5.2

func (p *AWSSDProvider) UpdateService(service *sd.Service, ep *endpoint.Endpoint) error

UpdateService updates the specified service with information from provided endpoint.

type AkamaiConfig added in v0.6.0

type AkamaiConfig struct {
	DomainFilter          DomainFilter
	ZoneIDFilter          ZoneIDFilter
	ServiceConsumerDomain string
	ClientToken           string
	ClientSecret          string
	AccessToken           string
	DryRun                bool
}

AkamaiConfig clarifies the method signature

type AkamaiProvider added in v0.6.0

type AkamaiProvider struct {
	// contains filtered or unexported fields
}

AkamaiProvider implements the DNS provider for Akamai.

func NewAkamaiProvider added in v0.6.0

func NewAkamaiProvider(akamaiConfig AkamaiConfig) *AkamaiProvider

NewAkamaiProvider initializes a new Akamai DNS based Provider.

func (*AkamaiProvider) ApplyChanges added in v0.6.0

func (p *AkamaiProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*AkamaiProvider) Records added in v0.6.0

func (p *AkamaiProvider) Records(context.Context) (endpoints []*endpoint.Endpoint, err error)

Records returns the list of records in a given zone.

type AlibabaCloudDNSAPI added in v0.5.6

type AlibabaCloudDNSAPI interface {
	AddDomainRecord(request *alidns.AddDomainRecordRequest) (response *alidns.AddDomainRecordResponse, err error)
	DeleteDomainRecord(request *alidns.DeleteDomainRecordRequest) (response *alidns.DeleteDomainRecordResponse, err error)
	UpdateDomainRecord(request *alidns.UpdateDomainRecordRequest) (response *alidns.UpdateDomainRecordResponse, err error)
	DescribeDomainRecords(request *alidns.DescribeDomainRecordsRequest) (response *alidns.DescribeDomainRecordsResponse, err error)
	DescribeDomains(request *alidns.DescribeDomainsRequest) (response *alidns.DescribeDomainsResponse, err error)
}

AlibabaCloudDNSAPI is a minimal implementation of DNS API that we actually use, used primarily for unit testing. See https://help.aliyun.com/document_detail/29739.html for descriptions of all of its methods.

type AlibabaCloudPrivateZoneAPI added in v0.5.6

type AlibabaCloudPrivateZoneAPI interface {
	AddZoneRecord(request *pvtz.AddZoneRecordRequest) (response *pvtz.AddZoneRecordResponse, err error)
	DeleteZoneRecord(request *pvtz.DeleteZoneRecordRequest) (response *pvtz.DeleteZoneRecordResponse, err error)
	UpdateZoneRecord(request *pvtz.UpdateZoneRecordRequest) (response *pvtz.UpdateZoneRecordResponse, err error)
	DescribeZoneRecords(request *pvtz.DescribeZoneRecordsRequest) (response *pvtz.DescribeZoneRecordsResponse, err error)
	DescribeZones(request *pvtz.DescribeZonesRequest) (response *pvtz.DescribeZonesResponse, err error)
	DescribeZoneInfo(request *pvtz.DescribeZoneInfoRequest) (response *pvtz.DescribeZoneInfoResponse, err error)
}

AlibabaCloudPrivateZoneAPI is a minimal implementation of Private Zone API that we actually use, used primarily for unit testing. See https://help.aliyun.com/document_detail/66234.html for descriptions of all of its methods.

type AlibabaCloudProvider added in v0.5.6

type AlibabaCloudProvider struct {
	MaxChangeCount       int
	EvaluateTargetHealth bool
	AssumeRole           string
	// contains filtered or unexported fields
}

AlibabaCloudProvider implements the DNS provider for Alibaba Cloud.

func NewAlibabaCloudProvider added in v0.5.6

func NewAlibabaCloudProvider(configFile string, domainFilter DomainFilter, zoneIDFileter ZoneIDFilter, zoneType string, dryRun bool) (*AlibabaCloudProvider, error)

NewAlibabaCloudProvider creates a new Alibaba Cloud provider.

Returns the provider or an error if a provider could not be created.

func (*AlibabaCloudProvider) ApplyChanges added in v0.5.6

func (p *AlibabaCloudProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies the given changes.

Returns nil if the operation was successful or an error if the operation failed.

func (*AlibabaCloudProvider) Records added in v0.5.6

func (p *AlibabaCloudProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, err error)

Records gets the current records.

Returns the current records or an error if the operation failed.

type AzurePrivateDNSProvider added in v0.5.18

type AzurePrivateDNSProvider struct {
	// contains filtered or unexported fields
}

AzurePrivateDNSProvider implements the DNS provider for Microsoft's Azure Private DNS service

func NewAzurePrivateDNSProvider added in v0.5.18

func NewAzurePrivateDNSProvider(domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, resourceGroup string, subscriptionID string, dryRun bool) (*AzurePrivateDNSProvider, error)

NewAzurePrivateDNSProvider creates a new Azure Private DNS provider.

Returns the provider or an error if a provider could not be created.

func (*AzurePrivateDNSProvider) ApplyChanges added in v0.5.18

func (p *AzurePrivateDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies the given changes.

Returns nil if the operation was successful or an error if the operation failed.

func (*AzurePrivateDNSProvider) Records added in v0.5.18

func (p *AzurePrivateDNSProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records gets the current records.

Returns the current records or an error if the operation failed.

type AzureProvider added in v0.4.0

type AzureProvider struct {
	// contains filtered or unexported fields
}

AzureProvider implements the DNS provider for Microsoft's Azure cloud platform.

func NewAzureProvider added in v0.4.0

func NewAzureProvider(configFile string, domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, resourceGroup string, userAssignedIdentityClientID string, dryRun bool) (*AzureProvider, error)

NewAzureProvider creates a new Azure provider.

Returns the provider or an error if a provider could not be created.

func (*AzureProvider) ApplyChanges added in v0.4.0

func (p *AzureProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies the given changes.

Returns nil if the operation was successful or an error if the operation failed.

func (*AzureProvider) Records added in v0.4.0

func (p *AzureProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records gets the current records.

Returns the current records or an error if the operation failed.

type CloudFlareProvider added in v0.4.0

type CloudFlareProvider struct {
	Client cloudFlareDNS

	DryRun            bool
	PaginationOptions cloudflare.PaginationOptions
	// contains filtered or unexported fields
}

CloudFlareProvider is an implementation of Provider for CloudFlare DNS.

func NewCloudFlareProvider added in v0.4.0

func NewCloudFlareProvider(domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, zonesPerPage int, proxiedByDefault bool, dryRun bool) (*CloudFlareProvider, error)

NewCloudFlareProvider initializes a new CloudFlare DNS based Provider.

func (*CloudFlareProvider) ApplyChanges added in v0.4.0

func (p *CloudFlareProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*CloudFlareProvider) Records added in v0.4.0

func (p *CloudFlareProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of records.

func (*CloudFlareProvider) Zones added in v0.4.0

Zones returns the list of hosted zones.

type DigitalOceanChange added in v0.4.0

type DigitalOceanChange struct {
	Action            string
	ResourceRecordSet godo.DomainRecord
}

DigitalOceanChange differentiates between ChangActions

type DigitalOceanProvider added in v0.4.0

type DigitalOceanProvider struct {
	Client godo.DomainsService

	DryRun bool
	// contains filtered or unexported fields
}

DigitalOceanProvider is an implementation of Provider for Digital Ocean's DNS.

func NewDigitalOceanProvider added in v0.4.0

func NewDigitalOceanProvider(ctx context.Context, domainFilter DomainFilter, dryRun bool) (*DigitalOceanProvider, error)

NewDigitalOceanProvider initializes a new DigitalOcean DNS based Provider.

func (*DigitalOceanProvider) ApplyChanges added in v0.4.0

func (p *DigitalOceanProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*DigitalOceanProvider) Records added in v0.4.0

Records returns the list of records in a given zone.

func (*DigitalOceanProvider) Zones added in v0.4.0

func (p *DigitalOceanProvider) Zones(ctx context.Context) ([]godo.Domain, error)

Zones returns the list of hosted zones.

type DomainFilter added in v0.4.0

type DomainFilter struct {
	// contains filtered or unexported fields
}

DomainFilter holds a lists of valid domain names

func NewDomainFilter added in v0.4.0

func NewDomainFilter(domainFilters []string) DomainFilter

NewDomainFilter returns a new DomainFilter given a comma separated list of domains

func NewDomainFilterWithExclusions added in v0.5.18

func NewDomainFilterWithExclusions(domainFilters []string, excludeDomains []string) DomainFilter

NewDomainFilterWithExclusions returns a new DomainFilter, given a list of matches and exclusions

func (DomainFilter) IsConfigured added in v0.5.0

func (df DomainFilter) IsConfigured() bool

IsConfigured returns true if DomainFilter is configured, false otherwise

func (DomainFilter) Match added in v0.4.0

func (df DomainFilter) Match(domain string) bool

Match checks whether a domain can be found in the DomainFilter.

type DynConfig added in v0.5.0

type DynConfig struct {
	DomainFilter  DomainFilter
	ZoneIDFilter  ZoneIDFilter
	DryRun        bool
	CustomerName  string
	Username      string
	Password      string
	MinTTLSeconds int
	AppVersion    string
	DynVersion    string
}

DynConfig hold connection parameters to dyn.com and internal state

type EgoscaleClientI added in v0.5.5

type EgoscaleClientI interface {
	GetRecords(context.Context, string) ([]egoscale.DNSRecord, error)
	GetDomains(context.Context) ([]egoscale.DNSDomain, error)
	CreateRecord(context.Context, string, egoscale.DNSRecord) (*egoscale.DNSRecord, error)
	DeleteRecord(context.Context, string, int64) error
	UpdateRecord(context.Context, string, egoscale.UpdateDNSRecord) (*egoscale.DNSRecord, error)
}

EgoscaleClientI for replaceable implementation

type ExoscaleOption added in v0.5.5

type ExoscaleOption func(*ExoscaleProvider)

ExoscaleOption for Provider options

func ExoscaleWithDomain added in v0.5.5

func ExoscaleWithDomain(domainFilter DomainFilter) ExoscaleOption

ExoscaleWithDomain modifies the domain on which dns zones are filtered

func ExoscaleWithLogging added in v0.5.5

func ExoscaleWithLogging() ExoscaleOption

ExoscaleWithLogging injects logging when ApplyChanges is called

type ExoscaleProvider added in v0.5.5

type ExoscaleProvider struct {
	OnApplyChanges func(changes *plan.Changes)
	// contains filtered or unexported fields
}

ExoscaleProvider initialized as dns provider with no records

func NewExoscaleProvider added in v0.5.5

func NewExoscaleProvider(endpoint, apiKey, apiSecret string, dryRun bool, opts ...ExoscaleOption) *ExoscaleProvider

NewExoscaleProvider returns ExoscaleProvider DNS provider interface implementation

func NewExoscaleProviderWithClient added in v0.5.5

func NewExoscaleProviderWithClient(endpoint, apiKey, apiSecret string, client EgoscaleClientI, dryRun bool, opts ...ExoscaleOption) *ExoscaleProvider

NewExoscaleProviderWithClient returns ExoscaleProvider DNS provider interface implementation (Client provided)

func (*ExoscaleProvider) ApplyChanges added in v0.5.5

func (ep *ExoscaleProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges simply modifies DNS via exoscale API

func (*ExoscaleProvider) Records added in v0.5.5

func (ep *ExoscaleProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of endpoints

type GoogleProvider added in v0.4.0

type GoogleProvider struct {
	// contains filtered or unexported fields
}

GoogleProvider is an implementation of Provider for Google CloudDNS.

func NewGoogleProvider

func NewGoogleProvider(ctx context.Context, project string, domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, batchChangeSize int, batchChangeInterval time.Duration, dryRun bool) (*GoogleProvider, error)

NewGoogleProvider initializes a new Google CloudDNS based Provider.

func (*GoogleProvider) ApplyChanges added in v0.4.0

func (p *GoogleProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*GoogleProvider) CreateRecords added in v0.4.0

func (p *GoogleProvider) CreateRecords(endpoints []*endpoint.Endpoint) error

CreateRecords creates a given set of DNS records in the given hosted zone.

func (*GoogleProvider) DeleteRecords added in v0.4.0

func (p *GoogleProvider) DeleteRecords(endpoints []*endpoint.Endpoint) error

DeleteRecords deletes a given set of DNS records in a given zone.

func (*GoogleProvider) Records added in v0.4.0

func (p *GoogleProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records returns the list of records in all relevant zones.

func (*GoogleProvider) UpdateRecords added in v0.4.0

func (p *GoogleProvider) UpdateRecords(records, oldRecords []*endpoint.Endpoint) error

UpdateRecords updates a given set of old records to a new set of records in a given hosted zone.

func (*GoogleProvider) Zones added in v0.4.0

func (p *GoogleProvider) Zones(ctx context.Context) (map[string]*dns.ManagedZone, error)

Zones returns the list of hosted zones.

type InMemoryOption added in v0.4.0

type InMemoryOption func(*InMemoryProvider)

InMemoryOption allows to extend in-memory provider

func InMemoryInitZones added in v0.4.8

func InMemoryInitZones(zones []string) InMemoryOption

InMemoryInitZones pre-seeds the InMemoryProvider with given zones

func InMemoryWithDomain added in v0.4.0

func InMemoryWithDomain(domainFilter DomainFilter) InMemoryOption

InMemoryWithDomain modifies the domain on which dns zones are filtered

func InMemoryWithLogging added in v0.4.0

func InMemoryWithLogging() InMemoryOption

InMemoryWithLogging injects logging when ApplyChanges is called

type InMemoryProvider

type InMemoryProvider struct {
	OnApplyChanges func(ctx context.Context, changes *plan.Changes)
	OnRecords      func()
	// contains filtered or unexported fields
}

InMemoryProvider - dns provider only used for testing purposes initialized as dns provider with no records

func NewInMemoryProvider

func NewInMemoryProvider(opts ...InMemoryOption) *InMemoryProvider

NewInMemoryProvider returns InMemoryProvider DNS provider interface implementation

func (*InMemoryProvider) ApplyChanges

func (im *InMemoryProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges simply modifies records in memory error checking occurs before any modifications are made, i.e. batch processing create record - record should not exist update/delete record - record should exist create/update/delete lists should not have overlapping records

func (*InMemoryProvider) CreateZone

func (im *InMemoryProvider) CreateZone(newZone string) error

CreateZone adds new zone if not present

func (*InMemoryProvider) Records

func (im *InMemoryProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of endpoints

func (*InMemoryProvider) Zones added in v0.4.0

func (im *InMemoryProvider) Zones() map[string]string

Zones returns filtered zones as specified by domain

type InfobloxConfig added in v0.4.6

type InfobloxConfig struct {
	DomainFilter DomainFilter
	ZoneIDFilter ZoneIDFilter
	Host         string
	Port         int
	Username     string
	Password     string
	Version      string
	SSLVerify    bool
	DryRun       bool
	View         string
	MaxResults   int
}

InfobloxConfig clarifies the method signature

type InfobloxProvider added in v0.4.6

type InfobloxProvider struct {
	// contains filtered or unexported fields
}

InfobloxProvider implements the DNS provider for Infoblox.

func NewInfobloxProvider added in v0.4.6

func NewInfobloxProvider(infobloxConfig InfobloxConfig) (*InfobloxProvider, error)

NewInfobloxProvider creates a new Infoblox provider.

func (*InfobloxProvider) ApplyChanges added in v0.4.6

func (p *InfobloxProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies the given changes.

func (*InfobloxProvider) Records added in v0.4.6

func (p *InfobloxProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, err error)

Records gets the current records.

type LinodeChangeCreate added in v0.5.5

type LinodeChangeCreate struct {
	Domain  *linodego.Domain
	Options linodego.DomainRecordCreateOptions
}

LinodeChangeCreate Linode Domain Record Creates

type LinodeChangeDelete added in v0.5.5

type LinodeChangeDelete struct {
	Domain       *linodego.Domain
	DomainRecord *linodego.DomainRecord
}

LinodeChangeDelete Linode Domain Record Deletes

type LinodeChangeUpdate added in v0.5.5

type LinodeChangeUpdate struct {
	Domain       *linodego.Domain
	DomainRecord *linodego.DomainRecord
	Options      linodego.DomainRecordUpdateOptions
}

LinodeChangeUpdate Linode Domain Record Updates

type LinodeChanges added in v0.5.5

type LinodeChanges struct {
	Creates []*LinodeChangeCreate
	Deletes []*LinodeChangeDelete
	Updates []*LinodeChangeUpdate
}

LinodeChanges All API calls calculated from the plan

type LinodeDomainClient added in v0.5.5

type LinodeDomainClient interface {
	ListDomainRecords(ctx context.Context, domainID int, opts *linodego.ListOptions) ([]*linodego.DomainRecord, error)
	ListDomains(ctx context.Context, opts *linodego.ListOptions) ([]*linodego.Domain, error)
	CreateDomainRecord(ctx context.Context, domainID int, domainrecord linodego.DomainRecordCreateOptions) (*linodego.DomainRecord, error)
	DeleteDomainRecord(ctx context.Context, domainID int, id int) error
	UpdateDomainRecord(ctx context.Context, domainID int, id int, domainrecord linodego.DomainRecordUpdateOptions) (*linodego.DomainRecord, error)
}

LinodeDomainClient interface to ease testing

type LinodeProvider added in v0.5.5

type LinodeProvider struct {
	Client LinodeDomainClient

	DryRun bool
	// contains filtered or unexported fields
}

LinodeProvider is an implementation of Provider for Digital Ocean's DNS.

func NewLinodeProvider added in v0.5.5

func NewLinodeProvider(domainFilter DomainFilter, dryRun bool, appVersion string) (*LinodeProvider, error)

NewLinodeProvider initializes a new Linode DNS based Provider.

func (*LinodeProvider) ApplyChanges added in v0.5.5

func (p *LinodeProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*LinodeProvider) Records added in v0.5.5

func (p *LinodeProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of records in a given zone.

func (*LinodeProvider) Zones added in v0.5.5

func (p *LinodeProvider) Zones(ctx context.Context) ([]*linodego.Domain, error)

Zones returns the list of hosted zones.

type MaxResultsRequestBuilder added in v0.5.18

type MaxResultsRequestBuilder struct {
	ibclient.WapiRequestBuilder
	// contains filtered or unexported fields
}

MaxResultsRequestBuilder implements a HttpRequestBuilder which sets the _max_results query parameter on all get requests

func NewMaxResultsRequestBuilder added in v0.5.18

func NewMaxResultsRequestBuilder(maxResults int) *MaxResultsRequestBuilder

NewMaxResultsRequestBuilder returns a MaxResultsRequestBuilder which adds _max_results query parameter to all GET requests

func (*MaxResultsRequestBuilder) BuildRequest added in v0.5.18

func (mrb *MaxResultsRequestBuilder) BuildRequest(t ibclient.RequestType, obj ibclient.IBObject, ref string, queryParams ibclient.QueryParams) (req *http.Request, err error)

BuildRequest prepares the api request. it uses BuildRequest of WapiRequestBuilder and then add the _max_requests parameter

type NS1Config added in v0.5.18

type NS1Config struct {
	DomainFilter DomainFilter
	ZoneIDFilter ZoneIDFilter
	NS1Endpoint  string
	NS1IgnoreSSL bool
	DryRun       bool
}

NS1Config passes cli args to the NS1Provider

type NS1DomainClient added in v0.5.18

type NS1DomainClient interface {
	CreateRecord(r *dns.Record) (*http.Response, error)
	DeleteRecord(zone string, domain string, t string) (*http.Response, error)
	UpdateRecord(r *dns.Record) (*http.Response, error)
	GetZone(zone string) (*dns.Zone, *http.Response, error)
	ListZones() ([]*dns.Zone, *http.Response, error)
}

NS1DomainClient is a subset of the NS1 API the the provider uses, to ease testing

type NS1DomainService added in v0.5.18

type NS1DomainService struct {
	// contains filtered or unexported fields
}

NS1DomainService wraps the API and fulfills the NS1DomainClient interface

func (NS1DomainService) CreateRecord added in v0.5.18

func (n NS1DomainService) CreateRecord(r *dns.Record) (*http.Response, error)

CreateRecord wraps the Create method of the API's Record service

func (NS1DomainService) DeleteRecord added in v0.5.18

func (n NS1DomainService) DeleteRecord(zone string, domain string, t string) (*http.Response, error)

DeleteRecord wraps the Delete method of the API's Record service

func (NS1DomainService) GetZone added in v0.5.18

func (n NS1DomainService) GetZone(zone string) (*dns.Zone, *http.Response, error)

GetZone wraps the Get method of the API's Zones service

func (NS1DomainService) ListZones added in v0.5.18

func (n NS1DomainService) ListZones() ([]*dns.Zone, *http.Response, error)

ListZones wraps the List method of the API's Zones service

func (NS1DomainService) UpdateRecord added in v0.5.18

func (n NS1DomainService) UpdateRecord(r *dns.Record) (*http.Response, error)

UpdateRecord wraps the Update method of the API's Record service

type NS1Provider added in v0.5.18

type NS1Provider struct {
	// contains filtered or unexported fields
}

NS1Provider is the NS1 provider

func NewNS1Provider added in v0.5.18

func NewNS1Provider(config NS1Config) (*NS1Provider, error)

NewNS1Provider creates a new NS1 Provider

func (*NS1Provider) ApplyChanges added in v0.5.18

func (p *NS1Provider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*NS1Provider) Records added in v0.5.18

func (p *NS1Provider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the endpoints this provider knows about

type OCIAuthConfig added in v0.5.5

type OCIAuthConfig struct {
	Region      string `yaml:"region"`
	TenancyID   string `yaml:"tenancy"`
	UserID      string `yaml:"user"`
	PrivateKey  string `yaml:"key"`
	Fingerprint string `yaml:"fingerprint"`
	Passphrase  string `yaml:"passphrase"`
}

OCIAuthConfig holds connection parameters for the OCI API.

type OCIConfig added in v0.5.5

type OCIConfig struct {
	Auth          OCIAuthConfig `yaml:"auth"`
	CompartmentID string        `yaml:"compartment"`
}

OCIConfig holds the configuration for the OCI Provider.

func LoadOCIConfig added in v0.5.5

func LoadOCIConfig(path string) (*OCIConfig, error)

LoadOCIConfig reads and parses the OCI ExternalDNS config file at the given path.

type OCIProvider added in v0.5.5

type OCIProvider struct {
	// contains filtered or unexported fields
}

OCIProvider is an implementation of Provider for Oracle Cloud Infrastructure (OCI) DNS.

func NewOCIProvider added in v0.5.5

func NewOCIProvider(cfg OCIConfig, domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, dryRun bool) (*OCIProvider, error)

NewOCIProvider initialises a new OCI DNS based Provider.

func (*OCIProvider) ApplyChanges added in v0.5.5

func (p *OCIProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes to a given zone.

func (*OCIProvider) Records added in v0.5.5

func (p *OCIProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of records in a given hosted zone.

type PDNSAPIClient added in v0.5.0

type PDNSAPIClient struct {
	// contains filtered or unexported fields
}

PDNSAPIClient : Struct that encapsulates all the PowerDNS specific implementation details

func (*PDNSAPIClient) ListZone added in v0.5.0

func (c *PDNSAPIClient) ListZone(zoneID string) (zone pgo.Zone, resp *http.Response, err error)

ListZone : Method returns the details of a specific zone from PowerDNS ref: https://doc.powerdns.com/authoritative/http-api/zone.html#get--servers-server_id-zones-zone_id

func (*PDNSAPIClient) ListZones added in v0.5.0

func (c *PDNSAPIClient) ListZones() (zones []pgo.Zone, resp *http.Response, err error)

ListZones : Method returns all enabled zones from PowerDNS ref: https://doc.powerdns.com/authoritative/http-api/zone.html#get--servers-server_id-zones

func (*PDNSAPIClient) PartitionZones added in v0.5.9

func (c *PDNSAPIClient) PartitionZones(zones []pgo.Zone) (filteredZones []pgo.Zone, residualZones []pgo.Zone)

PartitionZones : Method returns a slice of zones that adhere to the domain filter and a slice of ones that does not adhere to the filter

func (*PDNSAPIClient) PatchZone added in v0.5.0

func (c *PDNSAPIClient) PatchZone(zoneID string, zoneStruct pgo.Zone) (resp *http.Response, err error)

PatchZone : Method used to update the contents of a particular zone from PowerDNS ref: https://doc.powerdns.com/authoritative/http-api/zone.html#patch--servers-server_id-zones-zone_id

type PDNSAPIProvider added in v0.5.0

type PDNSAPIProvider interface {
	ListZones() ([]pgo.Zone, *http.Response, error)
	PartitionZones(zones []pgo.Zone) ([]pgo.Zone, []pgo.Zone)
	ListZone(zoneID string) (pgo.Zone, *http.Response, error)
	PatchZone(zoneID string, zoneStruct pgo.Zone) (*http.Response, error)
}

PDNSAPIProvider : Interface used and extended by the PDNSAPIClient struct as well as mock APIClients used in testing

type PDNSConfig added in v0.5.4

type PDNSConfig struct {
	DomainFilter DomainFilter
	DryRun       bool
	Server       string
	APIKey       string
	TLSConfig    TLSConfig
}

PDNSConfig is comprised of the fields necessary to create a new PDNSProvider

type PDNSProvider added in v0.5.0

type PDNSProvider struct {
	// contains filtered or unexported fields
}

PDNSProvider is an implementation of the Provider interface for PowerDNS

func NewPDNSProvider added in v0.5.0

func NewPDNSProvider(ctx context.Context, config PDNSConfig) (*PDNSProvider, error)

NewPDNSProvider initializes a new PowerDNS based Provider.

func (*PDNSProvider) ApplyChanges added in v0.5.0

func (p *PDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges takes a list of changes (endpoints) and updates the PDNS server by sending the correct HTTP PATCH requests to a matching zone

func (*PDNSProvider) ConvertEndpointsToZones added in v0.5.0

func (p *PDNSProvider) ConvertEndpointsToZones(eps []*endpoint.Endpoint, changetype pdnsChangeType) (zonelist []pgo.Zone, _ error)

ConvertEndpointsToZones marshals endpoints into pdns compatible Zone structs

func (*PDNSProvider) Records added in v0.5.0

func (p *PDNSProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records returns all DNS records controlled by the configured PDNS server (for all zones)

type PrivateRecordSetsClient added in v0.5.18

type PrivateRecordSetsClient interface {
	ListComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result privatedns.RecordSetListResultIterator, err error)
	Delete(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, relativeRecordSetName string, ifMatch string) (result autorest.Response, err error)
	CreateOrUpdate(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, relativeRecordSetName string, parameters privatedns.RecordSet, ifMatch string, ifNoneMatch string) (result privatedns.RecordSet, err error)
}

PrivateRecordSetsClient is an interface of privatedns.RecordSetsClient that can be stubbed for testing.

type PrivateZonesClient added in v0.5.18

type PrivateZonesClient interface {
	ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result privatedns.PrivateZoneListResultIterator, err error)
}

PrivateZonesClient is an interface of privatedns.PrivateZoneClient that can be stubbed for testing.

type Provider

type Provider interface {
	Records(ctx context.Context) ([]*endpoint.Endpoint, error)
	ApplyChanges(ctx context.Context, changes *plan.Changes) error
}

Provider defines the interface DNS providers should implement.

func NewCoreDNSProvider added in v0.5.3

func NewCoreDNSProvider(domainFilter DomainFilter, prefix string, dryRun bool) (Provider, error)

NewCoreDNSProvider is a CoreDNS provider constructor

func NewDesignateProvider added in v0.5.0

func NewDesignateProvider(domainFilter DomainFilter, dryRun bool) (Provider, error)

NewDesignateProvider is a factory function for OpenStack designate providers

func NewDnsimpleProvider added in v0.4.6

func NewDnsimpleProvider(domainFilter DomainFilter, zoneIDFilter ZoneIDFilter, dryRun bool) (Provider, error)

NewDnsimpleProvider initializes a new Dnsimple based provider

func NewDynProvider added in v0.5.0

func NewDynProvider(config DynConfig) (Provider, error)

NewDynProvider initializes a new Dyn Provider.

func NewRfc2136Provider added in v0.5.8

func NewRfc2136Provider(host string, port int, zoneName string, insecure bool, keyName string, secret string, secretAlg string, axfr bool, domainFilter DomainFilter, dryRun bool, actions rfc2136Actions) (Provider, error)

NewRfc2136Provider is a factory function for OpenStack rfc2136 providers

func NewVinylDNSProvider added in v0.5.18

func NewVinylDNSProvider(domainFilter DomainFilter, zoneFilter ZoneIDFilter, dryRun bool) (Provider, error)

NewVinylDNSProvider provides support for VinylDNS records

type RDNSClient added in v0.5.18

type RDNSClient interface {
	Get(key string) ([]RDNSRecord, error)
	List(rootDomain string) ([]RDNSRecord, error)
	Set(value RDNSRecord) error
	Delete(key string) error
}

RDNSClient is an interface to work with Rancher DNS(RDNS) records in etcdv3 backend.

type RDNSConfig added in v0.5.18

type RDNSConfig struct {
	DryRun       bool
	DomainFilter DomainFilter
	RootDomain   string
}

RDNSConfig contains configuration to create a new Rancher DNS(RDNS) provider.

type RDNSProvider added in v0.5.18

type RDNSProvider struct {
	// contains filtered or unexported fields
}

RDNSProvider is an implementation of Provider for Rancher DNS(RDNS).

func NewRDNSProvider added in v0.5.18

func NewRDNSProvider(config RDNSConfig) (*RDNSProvider, error)

NewRDNSProvider initializes a new Rancher DNS(RDNS) based Provider.

func (RDNSProvider) ApplyChanges added in v0.5.18

func (p RDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges stores changes back to etcdv3 converting them to Rancher DNS(RDNS) format and aggregating A and TXT records.

func (RDNSProvider) Records added in v0.5.18

func (p RDNSProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns all DNS records found in Rancher DNS(RDNS) etcdv3 backend. Depending on the record fields it may be mapped to one or two records of type A, TXT, A+TXT.

type RDNSRecord added in v0.5.18

type RDNSRecord struct {
	AggregationHosts []string `json:"aggregation_hosts,omitempty"`
	Host             string   `json:"host,omitempty"`
	Text             string   `json:"text,omitempty"`
	TTL              uint32   `json:"ttl,omitempty"`
	Key              string   `json:"-"`
}

RDNSRecord represents Rancher DNS(RDNS) etcdv3 record.

type RDNSRecordType added in v0.5.18

type RDNSRecordType struct {
	Type   string `json:"type,omitempty"`
	Domain string `json:"domain,omitempty"`
}

RDNSRecordType represents Rancher DNS(RDNS) etcdv3 record type.

type RcodeZeroProvider added in v0.5.12

type RcodeZeroProvider struct {
	Client *rc0.Client

	DomainFilter DomainFilter
	DryRun       bool
	TXTEncrypt   bool
	Key          []byte
}

RcodeZeroProvider implements the DNS provider for RcodeZero Anycast DNS.

func NewRcodeZeroProvider added in v0.5.12

func NewRcodeZeroProvider(domainFilter DomainFilter, dryRun bool, txtEnc bool) (*RcodeZeroProvider, error)

NewRcodeZeroProvider creates a new RcodeZero Anycast DNS provider.

Returns the provider or an error if a provider could not be created.

func (*RcodeZeroProvider) ApplyChanges added in v0.5.12

func (p *RcodeZeroProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*RcodeZeroProvider) NewRcodezeroChange added in v0.5.12

func (p *RcodeZeroProvider) NewRcodezeroChange(action string, endpoint *endpoint.Endpoint) *rc0.RRSetChange

NewRcodezeroChange returns a RcodeZero specific rrset change object.

func (*RcodeZeroProvider) NewRcodezeroChanges added in v0.5.12

func (p *RcodeZeroProvider) NewRcodezeroChanges(action string, endpoints []*endpoint.Endpoint) []*rc0.RRSetChange

NewRcodezeroChanges returns a RcodeZero specific array with rrset change objects.

func (*RcodeZeroProvider) Records added in v0.5.12

func (p *RcodeZeroProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns resource records

Decrypts TXT records if TXT-Encrypt flag is set and key is provided

func (*RcodeZeroProvider) Zones added in v0.5.12

func (p *RcodeZeroProvider) Zones() ([]*rc0.Zone, error)

Zones returns filtered zones if filter is set

type RecordSetsClient added in v0.5.18

type RecordSetsClient interface {
	ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultIterator, err error)
	Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error)
	CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string, ifNoneMatch string) (result dns.RecordSet, err error)
}

RecordSetsClient is an interface of dns.RecordSetsClient that can be stubbed for testing.

type Route53API

type Route53API interface {
	ListResourceRecordSetsPagesWithContext(ctx context.Context, input *route53.ListResourceRecordSetsInput, fn func(resp *route53.ListResourceRecordSetsOutput, lastPage bool) (shouldContinue bool), opts ...request.Option) error
	ChangeResourceRecordSetsWithContext(ctx context.Context, input *route53.ChangeResourceRecordSetsInput, opts ...request.Option) (*route53.ChangeResourceRecordSetsOutput, error)
	CreateHostedZoneWithContext(ctx context.Context, input *route53.CreateHostedZoneInput, opts ...request.Option) (*route53.CreateHostedZoneOutput, error)
	ListHostedZonesPagesWithContext(ctx context.Context, input *route53.ListHostedZonesInput, fn func(resp *route53.ListHostedZonesOutput, lastPage bool) (shouldContinue bool), opts ...request.Option) error
	ListTagsForResourceWithContext(ctx context.Context, input *route53.ListTagsForResourceInput, opts ...request.Option) (*route53.ListTagsForResourceOutput, error)
}

Route53API is the subset of the AWS Route53 API that we actually use. Add methods as required. Signatures must match exactly. mostly taken from: https://github.com/kubernetes/kubernetes/blob/853167624edb6bc0cfdcdfb88e746e178f5db36c/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go

type Service added in v0.5.3

type Service struct {
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Priority int    `json:"priority,omitempty"`
	Weight   int    `json:"weight,omitempty"`
	Text     string `json:"text,omitempty"`
	Mail     bool   `json:"mail,omitempty"` // Be an MX record. Priority becomes Preference.
	TTL      uint32 `json:"ttl,omitempty"`

	// When a SRV record with a "Host: IP-address" is added, we synthesize
	// a srv.Target domain name.  Normally we convert the full Key where
	// the record lives to a DNS name and use this as the srv.Target.  When
	// TargetStrip > 0 we strip the left most TargetStrip labels from the
	// DNS name.
	TargetStrip int `json:"targetstrip,omitempty"`

	// Group is used to group (or *not* to group) different services
	// together. Services with an identical Group are returned in the same
	// answer.
	Group string `json:"group,omitempty"`

	// Etcd key where we found this service and ignored from json un-/marshalling
	Key string `json:"-"`
}

Service represents CoreDNS etcd record

type TLSConfig added in v0.5.4

type TLSConfig struct {
	TLSEnabled            bool
	CAFilePath            string
	ClientCertFilePath    string
	ClientCertKeyFilePath string
}

TLSConfig is comprised of the TLS-related fields necessary to create a new PDNSProvider

type TransIPProvider added in v0.5.18

type TransIPProvider struct {
	// contains filtered or unexported fields
}

TransIPProvider is an implementation of Provider for TransIP.

func NewTransIPProvider added in v0.5.18

func NewTransIPProvider(accountName, privateKeyFile string, domainFilter DomainFilter, dryRun bool) (*TransIPProvider, error)

NewTransIPProvider initializes a new TransIP Provider.

func (*TransIPProvider) ApplyChanges added in v0.5.18

func (p *TransIPProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*TransIPProvider) Records added in v0.5.18

func (p *TransIPProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the list of records in a given zone.

func (*TransIPProvider) Zones added in v0.5.18

func (p *TransIPProvider) Zones() ([]transip.Domain, error)

Zones returns the list of hosted zones.

type ZoneChange added in v0.5.0

type ZoneChange struct {
	ID     int              `json:"id"`
	UserID int              `json:"user_id"`
	Zone   string           `json:"zone"`
	FQDN   string           `json:"FQDN"`
	Serial int              `json:"serial"`
	TTL    int              `json:"ttl"`
	Type   string           `json:"rdata_type"`
	RData  dynect.DataBlock `json:"rdata"`
}

ZoneChange is missing from dynect: https://help.dyn.com/get-zone-changeset-api/

type ZoneChangesResponse added in v0.5.0

type ZoneChangesResponse struct {
	dynect.ResponseBlock
	Data []ZoneChange `json:"data"`
}

ZoneChangesResponse is missing from dynect: https://help.dyn.com/get-zone-changeset-api/

type ZoneIDFilter added in v0.5.0

type ZoneIDFilter struct {
	// contains filtered or unexported fields
}

ZoneIDFilter holds a list of zone ids to filter by

func NewZoneIDFilter added in v0.5.0

func NewZoneIDFilter(zoneIDs []string) ZoneIDFilter

NewZoneIDFilter returns a new ZoneIDFilter given a list of zone ids

func (ZoneIDFilter) Match added in v0.5.0

func (f ZoneIDFilter) Match(zoneID string) bool

Match checks whether a zone matches one of the provided zone ids

type ZonePublishRequest added in v0.5.0

type ZonePublishRequest struct {
	Publish bool   `json:"publish"`
	Notes   string `json:"notes"`
}

ZonePublishRequest is missing from dynect but the notes field is a nice place to let external-dns report some internal info during commit

type ZonePublishResponse added in v0.5.5

type ZonePublishResponse struct {
	dynect.ResponseBlock
	Data map[string]interface{} `json:"data"`
}

ZonePublishResponse holds the status after publish

type ZoneSnapshot added in v0.5.5

type ZoneSnapshot struct {
	// contains filtered or unexported fields
}

ZoneSnapshot stores a single recordset for a zone for a single serial

func (*ZoneSnapshot) GetRecordsForSerial added in v0.5.5

func (snap *ZoneSnapshot) GetRecordsForSerial(zone string, serial int) []*endpoint.Endpoint

GetRecordsForSerial retrieves from memory the last known recordset for the (zone, serial) tuple

func (*ZoneSnapshot) StoreRecordsForSerial added in v0.5.5

func (snap *ZoneSnapshot) StoreRecordsForSerial(zone string, serial int, records []*endpoint.Endpoint)

StoreRecordsForSerial associates a result set with a (zone, serial)

type ZoneTagFilter added in v0.5.10

type ZoneTagFilter struct {
	// contains filtered or unexported fields
}

ZoneTagFilter holds a list of zone tags to filter by

func NewZoneTagFilter added in v0.5.10

func NewZoneTagFilter(tags []string) ZoneTagFilter

NewZoneTagFilter returns a new ZoneTagFilter given a list of zone tags

func (ZoneTagFilter) IsEmpty added in v0.5.10

func (f ZoneTagFilter) IsEmpty() bool

IsEmpty returns true if there are no tags for the filter

func (ZoneTagFilter) Match added in v0.5.10

func (f ZoneTagFilter) Match(tagsMap map[string]string) bool

Match checks whether a zone's set of tags matches the provided tag values

type ZoneTypeFilter added in v0.4.5

type ZoneTypeFilter struct {
	// contains filtered or unexported fields
}

ZoneTypeFilter holds a zone type to filter for.

func NewZoneTypeFilter added in v0.4.5

func NewZoneTypeFilter(zoneType string) ZoneTypeFilter

NewZoneTypeFilter returns a new ZoneTypeFilter given a zone type to filter for.

func (ZoneTypeFilter) Match added in v0.4.5

func (f ZoneTypeFilter) Match(zone *route53.HostedZone) bool

Match checks whether a zone matches the zone type that's filtered for.

type ZonesClient added in v0.4.0

type ZonesClient interface {
	ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error)
}

ZonesClient is an interface of dns.ZoneClient that can be stubbed for testing.

Jump to

Keyboard shortcuts

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