Documentation ¶
Index ¶
- func ExtractRecords[T uint16 | string](records *DNSRecords, qtype T) ([]string, error)
- func GetQueryTypeFromString(testType string) (uint16, error)
- func QueryAndExtract(client IDNSClient, testType, dnsServer, domain string) ([]string, error)
- func QueryDNSRecord(client IDNSClient, domain string, server string, qtype uint16, ...) error
- type DNSRecords
- type IDNSClient
- type MXRecord
- type MockIDNSClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractRecords ¶
func ExtractRecords[T uint16 | string](records *DNSRecords, qtype T) ([]string, error)
ExtractRecords extracts records from the DNS query results based on the query type
func GetQueryTypeFromString ¶
GetQueryTypeFromString maps the string test type to the corresponding DNS query type
func QueryAndExtract ¶
func QueryAndExtract(client IDNSClient, testType, dnsServer, domain string) ([]string, error)
QueryAndExtract handles the DNS query and extracts the relevant records
func QueryDNSRecord ¶
func QueryDNSRecord(client IDNSClient, domain string, server string, qtype uint16, setter func(dns.RR)) error
QueryDNSRecord queries a specific DNS record type and processes the results using a setter function
Types ¶
type DNSRecords ¶
type DNSRecords struct { ARecords []string AAAARecords []string CNAMERecords []string MXRecords []MXRecord TXTRecords []string NSRecords []string }
func QueryDNS ¶
func QueryDNS(domain string, dnsServer string, client IDNSClient) (*DNSRecords, error)
QueryDNS fetches DNS records of various types for a given domain
Click to show internal directories.
Click to hide internal directories.