package
Version:
v0.2.5
Opens a new window with list of versions in this module.
Published: Feb 24, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
type Answer struct {
Name string `json:"name"`
Type string `json:"type"`
Class string `json:"class"`
TTL string `json:"ttl"`
Address string `json:"address"`
Status string `json:"status"`
RTT string `json:"rtt"`
Nameserver string `json:"nameserver"`
}
type Authority struct {
Name string `json:"name"`
Type string `json:"type"`
Class string `json:"class"`
TTL string `json:"ttl"`
MName string `json:"mname"`
Status string `json:"status"`
RTT string `json:"rtt"`
Nameserver string `json:"nameserver"`
}
type ClassicResolver struct {
}
ClassicResolver represents the config options for setting up a Resolver.
Lookup takes a dns.Question and sends them to DNS Server.
It parses the Response from the server in a custom output format.
type ClassicResolverOpts struct {
IPv4Only bool
IPv6Only bool
UseTLS bool
UseTCP bool
}
ClassicResolverOpts holds options for setting up a Classic resolver.
type DOHResolver struct {
}
DOHResolver represents the config options for setting up a DOH based resolver.
Lookup takes a dns.Question and sends them to DNS Server.
It parses the Response from the server in a custom output format.
Options represent a set of common options
to configure a Resolver.
type Question struct {
Name string `json:"name"`
Type string `json:"type"`
Class string `json:"class"`
}
Resolver implements the configuration for a DNS
Client. Different types of providers can load
a DNS Resolver satisfying this interface.
NewClassicResolver accepts a list of nameservers and configures a DNS resolver.
NewDOHResolver accepts a nameserver address and configures a DOH based resolver.
type Response struct {
Answers []Answer `json:"answers"`
Authorities []Authority `json:"authorities"`
Questions []Question `json:"questions"`
}
Response represents a custom output format
for DNS queries. It wraps metadata about the DNS query
and the DNS Answer as well.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.