Documentation ¶
Index ¶
- Constants
- type DNSClient
- type DnsLookup
- func (d *DnsLookup) Authenticate(msg *dns.Msg, ctx context.Context) error
- func (d *DnsLookup) Query(name string, rrtype uint16) (*dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryA(name string) ([]dns.A, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryAAAA(name string) ([]dns.AAAA, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryCAA(name string) ([]dns.CAA, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryCNAME(name string) ([]dns.CNAME, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryDNSKEY(name string) ([]dns.DNSKEY, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryDS(name string) ([]dns.DS, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryMX(name string) ([]dns.MX, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryNAPTR(name string) ([]dns.NAPTR, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryNS(name string) ([]dns.NS, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryPTR(name string) ([]dns.PTR, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryRRSIG(name string) ([]dns.RRSIG, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QuerySOA(name string) ([]dns.SOA, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QuerySPF(name string) ([]dns.SPF, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QuerySRV(name string) ([]dns.SRV, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) QueryTXT(name string) ([]dns.TXT, *dns.Msg, time.Duration, error)
- func (d *DnsLookup) SetLogger(l zerolog.Logger)
- type NameServer
- type NameServerConcrete
- type SignatureSet
- type SignatureSets
Constants ¶
const ( DNSKEY_ZSK uint16 = 256 // Zone Signing Key DNSKEY_KSK uint16 = 257 // Key Signing Key )
DNSSEC key flags
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSClient ¶
type DNSClient interface {
Exchange(m *dns.Msg, address string) (r *dns.Msg, rtt time.Duration, err error)
}
DNSClient interface abstracts the dns.Client to allow mocking in tests.
type DnsLookup ¶
type DnsLookup struct { RootDNSSECRecords []*dns.DS RequireAuthenticatedData bool // contains filtered or unexported fields }
func NewDnsLookup ¶
func NewDnsLookup(nameservers []NameServer) *DnsLookup
func (*DnsLookup) Authenticate ¶
Authenticate verifies the DNSSEC signatures in the DNS response message
func (*DnsLookup) QueryCNAME ¶
QueryCNAME retrieves CNAME records for the given name.
func (*DnsLookup) QueryDNSKEY ¶
QueryDNSKEY retrieves DNSKEY records for the given name.
func (*DnsLookup) QueryNAPTR ¶
QueryNAPTR retrieves NAPTR records for the given name.
func (*DnsLookup) QueryRRSIG ¶
QueryRRSIG retrieves RRSIG records for the given name.
type NameServer ¶
type NameServer interface { Query(name string, rrtype uint16) (*dns.Msg, time.Duration, error) String() string }
NameServer interface defines the methods for a DNS name server.
func NewTcpNameserver ¶
func NewTcpNameserver(address, port string) NameServer
NewTcpNameserver creates a NameServerConcrete instance using TCP protocol.
func NewTlsNameserver ¶
func NewTlsNameserver(address, port, domain string) NameServer
NewTlsNameserver creates a NameServerConcrete instance using TCP over TLS protocol. The domain parameter is required for TLS certificate verification.
func NewUdpNameserver ¶
func NewUdpNameserver(address, port string) NameServer
NewUdpNameserver creates a NameServerConcrete instance using UDP protocol.
type NameServerConcrete ¶
type NameServerConcrete struct {
// contains filtered or unexported fields
}
NameServerConcrete represents the details of a DNS name server, including protocol, address, port, and client.
func (NameServerConcrete) String ¶
func (n NameServerConcrete) String() string
String returns a human-readable string representation of the NameServerConcrete details.
type SignatureSet ¶
type SignatureSet struct {
// contains filtered or unexported fields
}
SignatureSet represents a set of DNS records along with their corresponding RRSIG and DNSKEY
type SignatureSets ¶
type SignatureSets []*SignatureSet
SignatureSets represents a collection of SignatureSet pointers