Documentation ¶
Index ¶
- Constants
- Variables
- func ReverseName(zone string) []byte
- func SplitSets(rrs []dns.RR) map[RRSetKey][]dns.RR
- type ANAME_RRSet
- type CAA_RR
- type CAA_RRSet
- type CNAME_RRSet
- type DS_RR
- type DS_RRSet
- type GenericRRSet
- type HealthCheckItem
- type IP_RR
- type IP_RRSet
- type IpFilterConfig
- type IpHealthCheckConfig
- type MX_RR
- type MX_RRSet
- type NS_RR
- type NS_RRSet
- type PTR_RRSet
- type RRSet
- type RRSetKey
- type SOA_RRSet
- type SRV_RR
- type SRV_RRSet
- type TLSA_RR
- type TLSA_RRSet
- type TXT_RR
- type TXT_RRSet
- type Zone
- type ZoneConfig
- type ZoneKey
Constants ¶
View Source
const ( IpMaskWhite = iota IpMaskGrey IpMaskBlack )
View Source
const ( ExactMatch = iota WildCardMatch EmptyNonterminalMatch CEMatch NoMatch )
View Source
const (
TypeANAME = 500
)
Variables ¶
View Source
var SupportedTypes = map[string]struct{}{"a": {}, "aaaa": {}, "cname": {}, "txt": {}, "ns": {}, "mx": {}, "srv": {}, "caa": {}, "ptr": {}, "tlsa": {}, "ds": {}, "aname": {}, "soa": {}}
View Source
var TypeToRRSet = map[string]func() RRSet{ "a": func() RRSet { return new(IP_RRSet) }, "aaaa": func() RRSet { return new(IP_RRSet) }, "cname": func() RRSet { return new(CNAME_RRSet) }, "txt": func() RRSet { return new(TXT_RRSet) }, "ns": func() RRSet { return new(NS_RRSet) }, "mx": func() RRSet { return new(MX_RRSet) }, "srv": func() RRSet { return new(SRV_RRSet) }, "caa": func() RRSet { return new(CAA_RRSet) }, "ptr": func() RRSet { return new(PTR_RRSet) }, "tlsa": func() RRSet { return new(TLSA_RRSet) }, "ds": func() RRSet { return new(DS_RRSet) }, "soa": func() RRSet { return new(SOA_RRSet) }, "aname": func() RRSet { return new(ANAME_RRSet) }, }
Functions ¶
func ReverseName ¶
Types ¶
type ANAME_RRSet ¶
type ANAME_RRSet struct { GenericRRSet Location string `json:"location,omitempty"` }
func (*ANAME_RRSet) Empty ¶
func (rrset *ANAME_RRSet) Empty() bool
type CAA_RRSet ¶
type CAA_RRSet struct { GenericRRSet Data []CAA_RR `json:"records,omitempty"` }
type CNAME_RRSet ¶
type CNAME_RRSet struct { GenericRRSet Host string `json:"host"` }
func (*CNAME_RRSet) Empty ¶
func (rrset *CNAME_RRSet) Empty() bool
type DS_RRSet ¶
type DS_RRSet struct { GenericRRSet Data []DS_RR `json:"records,omitempty"` }
type GenericRRSet ¶
type GenericRRSet struct {
TtlValue uint32 `json:"ttl,omitempty"`
}
func (*GenericRRSet) Ttl ¶
func (rrset *GenericRRSet) Ttl() uint32
type HealthCheckItem ¶
type HealthCheckItem struct { Protocol string `json:"protocol,omitempty"` Uri string `json:"uri,omitempty"` Port int `json:"port,omitempty"` Status int `json:"status,omitempty"` LastCheck time.Time `json:"lastcheck,omitempty"` Timeout int `json:"timeout,omitempty"` UpCount int `json:"up_count,omitempty"` DownCount int `json:"down_count,omitempty"` Enable bool `json:"enable,omitempty"` DomainId string `json:"domain_uuid,omitempty"` Host string `json:"host,omitempty"` Ip string `json:"ip,omitempty"` Error error `json:"-"` }
type IP_RRSet ¶
type IP_RRSet struct { GenericRRSet FilterConfig IpFilterConfig `json:"filter,omitempty"` HealthCheckConfig IpHealthCheckConfig `json:"health_check,omitempty"` Data []IP_RR `json:"records,omitempty"` }
type IpFilterConfig ¶
type IpHealthCheckConfig ¶
type IpHealthCheckConfig struct { Protocol string `json:"protocol,omitempty"` Uri string `json:"uri,omitempty"` Port int `json:"port,omitempty"` Timeout int `json:"timeout,omitempty"` UpCount int `json:"up_count,omitempty"` DownCount int `json:"down_count,omitempty"` Enable bool `json:"enable,omitempty"` }
type MX_RRSet ¶
type MX_RRSet struct { GenericRRSet Data []MX_RR `json:"records,omitempty"` }
type NS_RRSet ¶
type NS_RRSet struct { GenericRRSet Data []NS_RR `json:"records,omitempty"` }
type PTR_RRSet ¶
type PTR_RRSet struct { GenericRRSet Domain string `json:"domain"` }
type SOA_RRSet ¶
type SRV_RRSet ¶
type SRV_RRSet struct { GenericRRSet Data []SRV_RR `json:"records,omitempty"` }
type TLSA_RRSet ¶
type TLSA_RRSet struct { GenericRRSet Data []TLSA_RR `json:"records,omitempty"` }
func (*TLSA_RRSet) Empty ¶
func (rrset *TLSA_RRSet) Empty() bool
type TXT_RRSet ¶
type TXT_RRSet struct { GenericRRSet Data []TXT_RR `json:"records,omitempty"` }
type Zone ¶
type ZoneConfig ¶
type ZoneConfig struct { DomainId string `json:"domain_id,omitempty"` SOA *SOA_RRSet `json:"soa,omitempty"` DnsSec bool `json:"dnssec,omitempty"` CnameFlattening bool `json:"cname_flattening,omitempty"` }
func ZoneConfigFromJson ¶
func ZoneConfigFromJson(zone string, configStr string) *ZoneConfig
Click to show internal directories.
Click to hide internal directories.