Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrResponseNil = errors.New("response must not be nil") ErrResponseEmpty = errors.New("neither hosts nor addresses are set in the response") ErrUnmatchedResolvedHosts = errors.New("resolved hosts do not match") ErrUnmatchedResolvedIPs = errors.New("resolved IPs do not match") )
View Source
var (
ErrNotADNSPInitiator = errors.New("the given initiator is not a DNS initiator")
)
Functions ¶
This section is empty.
Types ¶
type CheckFilterFunc ¶
func (CheckFilterFunc) Matches ¶
func (f CheckFilterFunc) Matches(resp *Response) error
type Initiator ¶
func AorAAAAInitiator ¶
type InitiatorFunc ¶
type MockResolver ¶
type MockResolver struct { LookupAddrDelegate func(ctx context.Context, addr string) (names []string, err error) LookupHostDelegate func(ctx context.Context, host string) (addrs []net.IP, err error) }
func (*MockResolver) ResolverForModule ¶ added in v0.7.0
func (r *MockResolver) ResolverForModule(string) (Resolver, error)
type Resolver ¶
type Resolver interface { // LookupA looks up the given host using the corresponding query protocol. // It returns a slice of that host's addresses. LookupA(ctx context.Context, host string) (addrs []net.IP, err error) // LookupPTR performs a reverse lookup for the given address, returning a list // of names mapping to that address. // // The returned names are validated to be properly formatted presentation-format // domain names. If the response contains invalid names, those records are filtered // out and an error will be returned alongside the the remaining results, if any. LookupPTR(ctx context.Context, addr string) (names []string, err error) }
type ValidationChain ¶
type ValidationChain []Validator
func ValidatorsForRule ¶
func ValidatorsForRule(rule *rules.Check) (filters ValidationChain, err error)
func (*ValidationChain) Add ¶
func (c *ValidationChain) Add(v Validator)
func (ValidationChain) Len ¶
func (c ValidationChain) Len() int
func (ValidationChain) Matches ¶
func (c ValidationChain) Matches(resp *Response) error
Click to show internal directories.
Click to hide internal directories.