dns

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0, BSD-3-Clause, MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ATTR_OWNER  = "owner"
	ATTR_PREFIX = "prefix"
	ATTR_CNAMES = "cnames"
)
View Source
const ANNOTATION_GROUP = "dns.gardener.cloud"
View Source
const CLASS_ANNOTATION = ANNOTATION_GROUP + "/class"
View Source
const DEFAULT_CLASS = "gardendns"
View Source
const REALM_ANNOTATION = ANNOTATION_GROUP + "/realms"
View Source
const RS_A = "A"
View Source
const RS_ALIAS = "ALIAS" // provider specific alias for CNAME record (e.g. AWS alias target)
View Source
const RS_CNAME = "CNAME"
View Source
const RS_META = "META"
View Source
const RS_NS = "NS"
View Source
const RS_TXT = "TXT"

Variables

View Source
var TxtPrefix = "comment-"

Functions

func AlignHostname

func AlignHostname(host string) string

func DNSNameMatcher

func DNSNameMatcher(dnsname string) resources.ObjectMatcher

func NormalizeHostname

func NormalizeHostname(host string) string

func SupportedRecordType

func SupportedRecordType(t string) bool

Types

type Cache

type Cache struct {
	Groups map[GroupKey]Group
}

type DNSSet

type DNSSet struct {
	Name string
	Sets RecordSets
}

func NewDNSSet

func NewDNSSet(name string) *DNSSet

func (*DNSSet) GetAttr

func (this *DNSSet) GetAttr(name string) string

func (*DNSSet) GetOwner

func (this *DNSSet) GetOwner() string

func (*DNSSet) IsForeign

func (this *DNSSet) IsForeign(owners utils.StringSet) bool

func (*DNSSet) IsOwnedBy

func (this *DNSSet) IsOwnedBy(owners utils.StringSet) bool

func (*DNSSet) SetAttr

func (this *DNSSet) SetAttr(name string, value string)

func (*DNSSet) SetOwner

func (this *DNSSet) SetOwner(ownerid string) *DNSSet

func (*DNSSet) SetRecordSet

func (this *DNSSet) SetRecordSet(rtype string, ttl int64, values ...string)

type DNSSets

type DNSSets map[string]*DNSSet

func (DNSSets) AddRecordSet

func (dnssets DNSSets) AddRecordSet(name string, rs *RecordSet)

func (DNSSets) AddRecordSetFromProvider

func (dnssets DNSSets) AddRecordSetFromProvider(dnsname string, rs *RecordSet)

func (DNSSets) Clone

func (dnssets DNSSets) Clone() DNSSets

func (DNSSets) RemoveRecordSet

func (dnssets DNSSets) RemoveRecordSet(name string, recordSetType string)

type Group

type Group struct {
	Key  GroupKey
	Info GroupInfo
	Sets map[string]*DNSSet
}

type GroupInfo

type GroupInfo interface{}

type GroupKey

type GroupKey interface {
	String() string
}

type Record

type Record struct {
	Value string
}

func (*Record) Clone

func (this *Record) Clone() *Record

type RecordSet

type RecordSet struct {
	Type      string
	TTL       int64
	IgnoreTTL bool
	Records   Records
}

func MapFromProvider

func MapFromProvider(dns string, rs *RecordSet) (string, *RecordSet)

func MapToProvider

func MapToProvider(rtype string, dnsset *DNSSet, base string) (string, *RecordSet)

func NewRecordSet

func NewRecordSet(rtype string, ttl int64, records []*Record) *RecordSet

func (*RecordSet) Add

func (this *RecordSet) Add(records ...*Record) *RecordSet

func (*RecordSet) Clone

func (this *RecordSet) Clone() *RecordSet

func (*RecordSet) DiffTo

func (this *RecordSet) DiffTo(set *RecordSet) (new Records, update Records, delete Records)

func (*RecordSet) GetAttr

func (this *RecordSet) GetAttr(name string) string

func (*RecordSet) Length

func (this *RecordSet) Length() int

func (*RecordSet) Match

func (this *RecordSet) Match(set *RecordSet) bool

func (*RecordSet) RecordString

func (this *RecordSet) RecordString() string

func (*RecordSet) SetAttr

func (this *RecordSet) SetAttr(name string, value string)

type RecordSets

type RecordSets map[string]*RecordSet

type Records

type Records []*Record

Directories

Path Synopsis
raw

Jump to

Keyboard shortcuts

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