Documentation
¶
Overview ¶
Package api defines the common API interface for DNS managers
Index ¶
Constants ¶
View Source
const ( RecordTypeA = "A" RecordTypeAAAA = "AAAA" RecordTypeCNAME = "CNAME" RecordTypeTXT = "TXT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
InfoContext(ctx context.Context, msg string, keysAndValues ...interface{})
}
Logger interface allows a logger to be used by the providers. This uses a context to support opentracing span-based logging.
type Provider ¶
type Provider interface {
// GetDNSRecords returns a list of DNS records. If name is
// provided, that is used as a filter.
GetDNSRecords(ctx context.Context, zone, name string) ([]Record, error)
// CreateOrUpdateDNSRecord changes the existing record if found,
// or adds a new one
CreateOrUpdateDNSRecord(ctx context.Context, zone, name, rtype, content string, ttl int, proxy bool) error
// DeleteDNSRecord deletes all DNS records for the name.
DeleteDNSRecord(ctx context.Context, zone, name string) error
}
Provider common interface for managing DNS entries.
type ProviderType ¶
type ProviderType string
ProviderType enumerates the types of providers supported
const ( CloudflareProvider ProviderType = "cloudflare" GoogleCloudDNSProvider ProviderType = "googleclouddns" OpenTelekomCloudProvider ProviderType = "otc" )
Click to show internal directories.
Click to hide internal directories.