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 EtcdHandler
- type Handler
- type IPForwarderHandler
- type K8sGateway
- 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 (
DefaultTTL = 3600
)
View Source
const EtcdType = "etcd"
View Source
const IPForwarderType = "forward_ip"
View Source
const K8sGatewayType = "k8s_gateway"
View Source
const MemoryType = "memory"
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 *dns.Msg) *dns.Msg
func (*BlockyForwarder) Identifier ¶
func (bfwd *BlockyForwarder) Identifier() string
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 *dns.Msg) *dns.Msg
func (*EtcdHandler) Identifier ¶
func (eh *EtcdHandler) 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 *dns.Msg) *dns.Msg
func (*IPForwarderHandler) Identifier ¶
func (ipf *IPForwarderHandler) Identifier() string
type K8sGateway ¶
type K8sGateway struct {
// contains filtered or unexported fields
}
func NewK8sGateway ¶
func NewK8sGateway(z *Zone, rawConfig map[string]string) *K8sGateway
func (*K8sGateway) Handle ¶
func (k8gw *K8sGateway) Handle(w *utils.FakeDNSWriter, r *dns.Msg) *dns.Msg
func (*K8sGateway) Identifier ¶
func (k8gw *K8sGateway) 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 *dns.Msg) *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:"-"` Authoritative bool `json:"authoritative"` HandlerConfigs []map[string]string `json:"handlerConfigs"` DefaultTTL uint32 `json:"defaultTTL"` // contains filtered or unexported fields }
func (*Zone) StopWatchingRecords ¶
func (z *Zone) StopWatchingRecords()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.