Documentation ¶
Index ¶
- func LoadConfig(path string, name string, config interface{}) error
- func SaveConfig(path string, name string, config interface{}) error
- type AnswerBlock
- type ArgumentsList
- type DNSServer
- type DNSService
- type Get
- type Packet
- type ReBindConfig
- type ReWebConfig
- type Request
- type RequestMX
- type RequestSOA
- type RequestSRV
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func SaveConfig ¶
Types ¶
type AnswerBlock ¶
Collects indformation about any answer
func (*AnswerBlock) IsValid ¶
func (answer *AnswerBlock) IsValid() bool
type ArgumentsList ¶
type ArgumentsList []string
func (*ArgumentsList) Get ¶
func (i *ArgumentsList) Get(index int) string
func (*ArgumentsList) Set ¶
func (i *ArgumentsList) Set(value string) error
func (*ArgumentsList) String ¶
func (i *ArgumentsList) String() string
type DNSServer ¶
type DNSServer interface { Listen(ipAddress string, port int, pipeAddress string, pipePort int, pipeResponsePort int) error Query(Packet) GetService() DNSService Wait() }
DNSServer will do Listen, Query and Send.
type DNSService ¶
type DNSService interface { Save(key string, resource dnsmessage.Resource, addr net.IPAddr, recordData string, old *dnsmessage.Resource) bool SaveBulk(key string, resources []dnsmessage.Resource) All() []Get Remove(key string, r *dnsmessage.Resource) bool }
type Packet ¶
type Packet struct { Addr net.UDPAddr Message dnsmessage.Message }
Packet carries DNS packet payload and sender address.
type ReBindConfig ¶
type ReBindConfig struct { DataDirPath string `yaml:"dataDir" json:"dataDir" xml:"data-dir"` ConfigDirPath string `yaml:"configDir" json:"configDir" xml:"config-dir"` ListenIP string `yaml:"listenIp" json:"listenIp" xml:"listen-ip"` ListenPort int `yaml:"listenPort" json:"listenPort" xml:"listen-port"` DnsPipeIP string `yaml:"dnsPipeIp" json:"dnsPipeIp" xml:"dns-pipe-ip"` DnsPipePort int `yaml:"dnsPipePort" json:"dnsPipePort" xml:"dns-pipe-port"` DnsPipeResponsePort int `yaml:"dnsPipeResponsePort" json:"dnsPipeResponsePort" xml:"dns-pipe-response-port"` EnableFileLogging bool `yaml:"enableFileLogging" json:"enableFileLogging" xml:"enable-file-logging"` LogVerbosity string `yaml:"logVerbosity" json:"logVerbosity" xml:"log-verbosity"` LogFilePath string `yaml:"logFilePath" json:"logFilePath" xml:"log-file-path"` EnableLogRotate bool `yaml:"enableLogRotate" json:"enableLogRotate" xml:"enable-log-rotate"` LogMaxFileSize int64 `yaml:"logMaxFileSize" json:"logMaxFileSize" xml:"log-max-file-size"` LogFileCount int `yaml:"logFileCount" json:"logFileCount" xml:"log-file-count"` }
type ReWebConfig ¶
type ReWebConfig struct { DataDirPath string `yaml:"dataDir" json:"dataDir" xml:"data-dir"` ConfigDirPath string `yaml:"configDir" json:"configDir" xml:"config-dir"` ListenIP string `yaml:"listenIp" json:"listenIp" xml:"listen-ip"` ListenPort int `yaml:"listenPort" json:"listenPort" xml:"listen-port"` DnsPipeIP string `yaml:"dnsPipeIp" json:"dnsPipeIp" xml:"dns-pipe-ip"` DnsPipePort int `yaml:"dnsPipePort" json:"dnsPipePort" xml:"dns-pipe-port"` DnsPipeResponsePort int `yaml:"dnsPipeResponsePort" json:"dnsPipeResponsePort" xml:"dns-pipe-response-port"` TlsCert string `yaml:"tlsCertFilePath" json:"tlsCertFilePath" xml:"tls-cert-file-path"` TlsKey string `yaml:"tlsKeyFilePath" json:"tlsKeyFilePath" xml:"tls-key-file-path"` EnableFileLogging bool `yaml:"enableFileLogging" json:"enableFileLogging" xml:"enable-file-logging"` LogVerbosity string `yaml:"logVerbosity" json:"logVerbosity" xml:"log-verbosity"` LogFilePath string `yaml:"logFilePath" json:"logFilePath" xml:"log-file-path"` EnableLogRotate bool `yaml:"enableLogRotate" json:"enableLogRotate" xml:"enable-log-rotate"` LogMaxFileSize int64 `yaml:"logMaxFileSize" json:"logMaxFileSize" xml:"log-max-file-size"` LogFileCount int `yaml:"logFileCount" json:"logFileCount" xml:"log-file-count"` }
type Request ¶
type Request struct { Host string `yaml:"host" json:"host" xml:"host"` TTL uint32 `yaml:"ttl" json:"ttl" xml:"ttl"` Type string `yaml:"type" json:"type" xml:"type"` Data string `yaml:"data" json:"data" xml:"data"` OldData string `yaml:"oldData" json:"oldData" xml:"old-data"` SOA RequestSOA `yaml:"soaData" json:"soaData" xml:"soa-data"` OldSOA RequestSOA `yaml:"oldSoaData" json:"oldSoaData" xml:"old-soa-data"` MX RequestMX `yaml:"mxData" json:"mxData" xml:"mx-data"` OldMX RequestMX `yaml:"oldMxData" json:"oldMxData" xml:"old-mx-data"` SRV RequestSRV `yaml:"srvData" json:"srvData" xml:"srv-data"` OldSRV RequestSRV `yaml:"oldSrvData" json:"oldSrvData" xml:"old-srv-data"` }
type RequestSOA ¶
type RequestSOA struct { NS string `yaml:"ns" json:"ns" xml:"ns"` MBox string `yaml:"mBox" json:"mBox" xml:"mbox"` Serial uint32 `yaml:"serial" json:"serial" xml:"serial"` Refresh uint32 `yaml:"refresh" json:"refresh" xml:"refresh"` Retry uint32 `yaml:"retry" json:"retry" xml:"retry"` Expire uint32 `yaml:"expire" json:"expire" xml:"expire"` MinTTL uint32 `yaml:"minTTL" json:"minTTL" xml:"min-ttl"` }
type RequestSRV ¶
Click to show internal directories.
Click to hide internal directories.