Documentation ¶
Index ¶
- Constants
- Variables
- func LookupCNAME(domain, server string) (cnames []string, err error)
- func LookupIP(domain, server string) (ips []net.IP, err error)
- func LookupIPv4(domain, server string) (ips []net.IP, err error)
- func LookupIPv6(domain, server string) (ips []net.IP, err error)
- func LookupNS(domain, server string) (ns []string, err error)
- func LookupPTR(ip net.IP, server string) (ptr []string, err error)
- func LookupTEXT(domain, server string) (texts []string, err error)
- type Answer
- type AnswerTypeMX
- type AnswerTypeString
- type AnswerTypeTXT
- type Query
- type QueryDNS
- type Response
Constants ¶
View Source
const ( // IPv4 TypeA = 1 TypeNS = 2 TypeCNAME = 5 TypePTR = 12 TypeMX = 15 TypeTXT = 16 // IPv6 TypeAAAA = 28 )
Variables ¶
View Source
var ( ErrNoSuchName error = errors.New("no such name") ErrNoAnswer = errors.New("no answer") ErrInvalidAnswerFromServer = errors.New("invalid answer from server") ErrUnsupportedDNSType = errors.New("unsupported dns type") ErrEmptyQueries = errors.New("empty queries in QueryDNS") ErrFormatQuery = errors.New("the query was constructed incorrectly") ErrInternalServerDNS = errors.New("internal error in the DNS server") ErrRefused = errors.New("the query refused by DNS server") ErrYXDomain = errors.New("name exists when it should not") ErrYXRRSet = errors.New("RR Set Exists when it should not") ErrNXRRSet = errors.New("RR Set that should exist does not") ErrNotAuth = errors.New("not authorized") ErrNotValidIP = errors.New("not valid ip in arguments") )
Functions ¶
func LookupCNAME ¶
Return array of CNAMEs of this domain.
func LookupTEXT ¶
Return array of TEXTs of this domain.
Types ¶
type AnswerTypeMX ¶
func LookupMX ¶
func LookupMX(domain, server string) (mx []AnswerTypeMX, err error)
type AnswerTypeString ¶
type AnswerTypeString struct {
Data string
}
TypeA, TypeAAAA, TypeCNAME, TypeNS, TypePTR
type AnswerTypeTXT ¶
Click to show internal directories.
Click to hide internal directories.