Documentation ¶
Index ¶
- Variables
- type Answer
- type Client
- func (c *Client) Query(name string, question QuestionType) (*Response, error)
- func (c *Client) QueryWithDOH(method Method, r Resolver, name string, question uint16) (*dns.Msg, error)
- func (c *Client) QueryWithDOHMsg(method Method, r Resolver, msg *dns.Msg) (*dns.Msg, error)
- func (c *Client) QueryWithJsonAPI(r Resolver, name string, question QuestionType) (*Response, error)
- func (c *Client) QueryWithResolver(r Resolver, name string, question QuestionType) (*Response, error)
- type Method
- type Options
- type Question
- type QuestionType
- type Resolver
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cloudflare = Resolver{Name: "Cloudflare", URL: "https://cloudflare-dns.com/dns-query"} Google = Resolver{Name: "Google", URL: "https://dns.google.com/resolve"} Quad9 = Resolver{Name: "Cloudflare", URL: "https://dns.quad9.net:5053/dns-query"} PowerDNS = Resolver{Name: "PowerDNS", URL: "https://doh.powerdns.org/dns-query"} OpenDNS = Resolver{Name: "OpenDNS", URL: "https://doh.opendns.com/dns-query"} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { DefaultResolver Resolver // contains filtered or unexported fields }
func NewWithOptions ¶
func (*Client) Query ¶
func (c *Client) Query(name string, question QuestionType) (*Response, error)
func (*Client) QueryWithDOH ¶
func (*Client) QueryWithDOHMsg ¶
func (*Client) QueryWithJsonAPI ¶
func (*Client) QueryWithResolver ¶
type Options ¶
type Options struct { DefaultResolver Resolver HttpClient *retryablehttp.Client }
type QuestionType ¶
type QuestionType string
const ( A QuestionType = "A" AAAA QuestionType = "AAAA" MX QuestionType = "MX" NS QuestionType = "NS" SOA QuestionType = "SOA" PTR QuestionType = "PTR" CNAME QuestionType = "CNAME" )
func (QuestionType) ToString ¶
func (q QuestionType) ToString() string
Click to show internal directories.
Click to hide internal directories.