Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatcherOneOf ¶
type MatcherOneOf struct {
// contains filtered or unexported fields
}
func NewMatcherOneOf ¶
func NewMatcherOneOf(possibilities ...string) *MatcherOneOf
func (*MatcherOneOf) Matches ¶
func (m *MatcherOneOf) Matches(x interface{}) bool
func (*MatcherOneOf) String ¶
func (m *MatcherOneOf) String() string
type MatcherRegex ¶
type MatcherRegex struct {
// contains filtered or unexported fields
}
func NewMatcherRegex ¶
func NewMatcherRegex(regex string) *MatcherRegex
func (*MatcherRegex) Matches ¶
func (m *MatcherRegex) Matches(x interface{}) bool
func (*MatcherRegex) String ¶
func (m *MatcherRegex) String() string
type MatcherRequest ¶
type MatcherRequest struct {
// contains filtered or unexported fields
}
func NewMatcherRequest ¶
func NewMatcherRequest(request *dns.Msg) *MatcherRequest
func (*MatcherRequest) Matches ¶
func (m *MatcherRequest) Matches(x interface{}) bool
func (*MatcherRequest) String ¶
func (m *MatcherRequest) String() string
type MatcherResponse ¶
type MatcherResponse struct {
// contains filtered or unexported fields
}
MatcherResponse matches a message with a response and ignores the following: - MsgHdr.Id field - TTL field set in the answer headers - Rdlength field set in the answer headers - A and AAAA IP values, except checking both are empty or both non empty. - Extra EDNS0 Padding length. See MatcherResponseSettings for additional settings.
func NewMatcherResponse ¶
func NewMatcherResponse(settings MatcherResponseSettings) *MatcherResponse
func (*MatcherResponse) Matches ¶
func (m *MatcherResponse) Matches(x interface{}) bool
func (*MatcherResponse) String ¶
func (m *MatcherResponse) String() string
type MatcherResponseSettings ¶
type MatcherResponseSettings struct { // Response is the base expected response. // By default, the following are ignored: // - MsgHdr.Id field // - TTL field set in the answer headers // - Rdlength field set in the answer headers // - A and AAAA IP values, except checking both are empty or both non empty. // - Extra EDNS0 Padding length. Response *dns.Msg // OnlyHasAnswerTypes checks the response has at least one answer // for each of the types specified and no other answer types. OnlyHasAnswerTypes []uint16 // IgnoreAnswerTypes removes the answers matching one of the types // specified from the received AND expected answers. IgnoreAnswerTypes []uint16 }
Click to show internal directories.
Click to hide internal directories.