Documentation ¶
Index ¶
- type Client
- func (c *Client) Do(msg *dns.Msg) (*dns.Msg, error)
- func (c *Client) Query(host string, requestType uint16) (*DNSData, error)
- func (c *Client) QueryMultiple(host string, requestTypes []uint16) (*DNSData, error)
- func (c *Client) Resolve(host string) (*DNSData, error)
- func (c *Client) ResolveWithSyscall(host string) (*DNSData, error)
- type DNSData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a DNS resolver client to resolve hostnames.
func (*Client) QueryMultiple ¶
QueryMultiple sends a provided dns request and return the data
type DNSData ¶
type DNSData struct { Host string `json:"host,omitempty"` TTL int `json:"ttl,omitempty"` Resolver []string `json:"resolver,omitempty"` A []string `json:"a,omitempty"` AAAA []string `json:"aaaa,omitempty"` CNAME []string `json:"cname,omitempty"` MX []string `json:"mx,omitempty"` PTR []string `json:"ptr,omitempty"` SOA []string `json:"soa,omitempty"` NS []string `json:"ns,omitempty"` TXT []string `json:"txt,omitempty"` Raw string `json:"raw,omitempty"` StatusCode string `json:"status_code,omitempty"` }
DNSData is the data for a DNS request response
func (*DNSData) ParseFromMsg ¶
ParseFromMsg and enrich data
Click to show internal directories.
Click to hide internal directories.