Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidIP = fmt.Errorf("invalid ip address resolved for hostname")
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct {
Name string `json:"name"`
Type RecordType `json:"type"`
TTL uint `json:"ttl"`
Data string `json:"data"`
}
type Dns ¶
type Dns struct {
// contains filtered or unexported fields
}
type Result ¶
type Result struct {
Status StatusType `json:"Status"`
Answer []Answer `json:"Answer"`
}
type StatusType ¶
type StatusType uint8
const ( NoError StatusType = 0 FormErr StatusType = 1 ServFail StatusType = 2 NXDomain StatusType = 3 Refused StatusType = 5 NotAuth StatusType = 9 NotZone StatusType = 10 )
func (StatusType) String ¶
func (s StatusType) String() string
type WithConfig ¶
type WithConfig func(config *dnsConfig)
func WithFailIfLocal ¶
func WithFailIfLocal() WithConfig
WithFailIfLocal will cause the DNS resolver to fail if the hostname is a local hostname.
Click to show internal directories.
Click to hide internal directories.