Documentation ¶
Index ¶
- Constants
- type APIRecord
- type APIRecordsDeleteInput
- type APIRecordsGetInput
- type APIRecordsGetOutput
- type APIRecordsPutInput
- type APIRoleConfigInput
- type APIRoleConfigOutput
- type APIZone
- type APIZonesDeleteInput
- type APIZonesGetInput
- type APIZonesGetOutput
- type APIZonesPutInput
- type BlockyForwarder
- type CoreDNS
- type EtcdHandler
- type Handler
- type IPForwarderHandler
- type MemoryHandler
- type Record
- type Role
- func (r *Role) APIMetrics() usecase.Interactor
- func (r *Role) APIRecordsDelete() usecase.Interactor
- func (r *Role) APIRecordsGet() usecase.Interactor
- func (r *Role) APIRecordsPut() usecase.Interactor
- func (r *Role) APIRoleConfigGet() usecase.Interactor
- func (r *Role) APIRoleConfigPut() usecase.Interactor
- func (r *Role) APIZonesDelete() usecase.Interactor
- func (r *Role) APIZonesGet() usecase.Interactor
- func (r *Role) APIZonesPut() usecase.Interactor
- func (r *Role) FindZone(fqdn string) *Zone
- func (ro *Role) Handler(w dns.ResponseWriter, r *dns.Msg)
- func (r *Role) Start(ctx context.Context, config []byte) error
- func (r *Role) Stop()
- type RoleConfig
- type Zone
Constants ¶
View Source
const BlockyForwarderType = "forward_blocky"
View Source
const CoreDNSType = "coredns"
View Source
const (
DefaultTTL = 3600
)
View Source
const EtcdType = "etcd"
View Source
const IPForwarderType = "forward_ip"
View Source
const MemoryType = "memory"
View Source
const TXTSeparator = "\n"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRecord ¶
type APIRecord struct { UID string `json:"uid" required:"true"` FQDN string `json:"fqdn" required:"true"` Hostname string `json:"hostname" required:"true"` Type string `json:"type" required:"true"` Data string `json:"data" required:"true"` MXPreference uint16 `json:"mxPreference,omitempty"` SRVPort uint16 `json:"srvPort,omitempty"` SRVPriority uint16 `json:"srvPriority,omitempty"` SRVWeight uint16 `json:"srvWeight,omitempty"` }
type APIRecordsDeleteInput ¶
type APIRecordsGetInput ¶
type APIRecordsGetOutput ¶
type APIRecordsGetOutput struct {
Records []APIRecord `json:"records" required:"true"`
}
type APIRecordsPutInput ¶
type APIRecordsPutInput struct { Zone string `query:"zone" required:"true" maxLength:"255"` Hostname string `query:"hostname" required:"true" maxLength:"255"` UID string `query:"uid" maxLength:"255"` Type string `json:"type" required:"true"` Data string `json:"data" required:"true"` MXPreference uint16 `json:"mxPreference,omitempty"` SRVPort uint16 `json:"srvPort,omitempty"` SRVPriority uint16 `json:"srvPriority,omitempty"` SRVWeight uint16 `json:"srvWeight,omitempty"` }
type APIRoleConfigInput ¶
type APIRoleConfigInput struct {
Config RoleConfig `json:"config" required:"true"`
}
type APIRoleConfigOutput ¶
type APIRoleConfigOutput struct {
Config RoleConfig `json:"config" required:"true"`
}
type APIZonesDeleteInput ¶
type APIZonesDeleteInput struct {
Zone string `query:"zone"`
}
type APIZonesGetInput ¶ added in v0.4.6
type APIZonesGetInput struct {
Name string `query:"name" description:"Optionally get DNS Zone by name"`
}
type APIZonesGetOutput ¶
type APIZonesGetOutput struct {
Zones []APIZone `json:"zones" required:"true"`
}
type APIZonesPutInput ¶
type BlockyForwarder ¶
type BlockyForwarder struct { *IPForwarderHandler // contains filtered or unexported fields }
func NewBlockyForwarder ¶
func NewBlockyForwarder(z *Zone, rawConfig map[string]string) *BlockyForwarder
func (*BlockyForwarder) Handle ¶
func (bfwd *BlockyForwarder) Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg
func (*BlockyForwarder) Identifier ¶
func (bfwd *BlockyForwarder) Identifier() string
type CoreDNS ¶ added in v0.5.0
type CoreDNS struct {
// contains filtered or unexported fields
}
func (*CoreDNS) Handle ¶ added in v0.5.0
func (core *CoreDNS) Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg
func (*CoreDNS) Identifier ¶ added in v0.5.0
type EtcdHandler ¶
type EtcdHandler struct {
// contains filtered or unexported fields
}
func NewEtcdHandler ¶
func NewEtcdHandler(z *Zone, config map[string]string) *EtcdHandler
func (*EtcdHandler) Handle ¶
func (eh *EtcdHandler) Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg
func (*EtcdHandler) Identifier ¶
func (eh *EtcdHandler) Identifier() string
type Handler ¶
type Handler interface { Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg Identifier() string }
type IPForwarderHandler ¶
type IPForwarderHandler struct { CacheTTL int // contains filtered or unexported fields }
func NewIPForwarderHandler ¶
func NewIPForwarderHandler(z *Zone, config map[string]string) *IPForwarderHandler
func (*IPForwarderHandler) Handle ¶
func (ipf *IPForwarderHandler) Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg
func (*IPForwarderHandler) Identifier ¶
func (ipf *IPForwarderHandler) Identifier() string
type MemoryHandler ¶
type MemoryHandler struct {
// contains filtered or unexported fields
}
func NewMemoryHandler ¶
func NewMemoryHandler(z *Zone, config map[string]string) *MemoryHandler
func (*MemoryHandler) Handle ¶
func (eh *MemoryHandler) Handle(w *utils.FakeDNSWriter, r *utils.DNSRequest) *dns.Msg
func (*MemoryHandler) Identifier ¶
func (eh *MemoryHandler) Identifier() string
type Record ¶
type Record struct { Name string `json:"-"` Type string `json:"-"` Data string `json:"data"` TTL uint32 `json:"ttl,omitempty"` MXPreference uint16 `json:"mxPreference,omitempty"` SRVPort uint16 `json:"srvPort,omitempty"` SRVPriority uint16 `json:"srvPriority,omitempty"` SRVWeight uint16 `json:"srvWeight,omitempty"` // contains filtered or unexported fields }
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func (*Role) APIMetrics ¶
func (r *Role) APIMetrics() usecase.Interactor
func (*Role) APIRecordsDelete ¶
func (r *Role) APIRecordsDelete() usecase.Interactor
func (*Role) APIRecordsGet ¶
func (r *Role) APIRecordsGet() usecase.Interactor
func (*Role) APIRecordsPut ¶
func (r *Role) APIRecordsPut() usecase.Interactor
func (*Role) APIRoleConfigGet ¶
func (r *Role) APIRoleConfigGet() usecase.Interactor
func (*Role) APIRoleConfigPut ¶
func (r *Role) APIRoleConfigPut() usecase.Interactor
func (*Role) APIZonesDelete ¶
func (r *Role) APIZonesDelete() usecase.Interactor
func (*Role) APIZonesGet ¶
func (r *Role) APIZonesGet() usecase.Interactor
func (*Role) APIZonesPut ¶
func (r *Role) APIZonesPut() usecase.Interactor
type RoleConfig ¶
type RoleConfig struct {
Port int32 `json:"port"`
}
type Zone ¶
type Zone struct { Name string `json:"-"` HandlerConfigs []map[string]string `json:"handlerConfigs"` DefaultTTL uint32 `json:"defaultTTL"` Authoritative bool `json:"authoritative"` // contains filtered or unexported fields }
func (*Zone) StopWatchingRecords ¶
func (z *Zone) StopWatchingRecords()
Source Files ¶
- api_metrics.go
- api_records.go
- api_zones.go
- dhcp_event_handler.go
- dns_handler.go
- handler.go
- handler_coredns.go
- handler_etcd.go
- handler_forward_blocky.go
- handler_forward_blocky_listserver.go
- handler_forward_ip.go
- handler_memory.go
- metrics.go
- middleware.go
- record.go
- role.go
- role_config.go
- zone.go
- zone_watch.go
Click to show internal directories.
Click to hide internal directories.