Documentation ¶
Index ¶
- Constants
- Variables
- func GetBool(arg interface{}) (bool, error)
- func GetIPNet(arg interface{}) (*net.IPNet, error)
- func RegisterDnsMsgMatcher(name MatcherName, newFunc NewDnsMsgMatcher, unmarshaler UnmarshalFunc)
- func RegisterDnstapMatcher(name MatcherName, newFunc NewDnstapMatcher, unmarshaler UnmarshalFunc)
- func UnmarshalBoolArg(bs json.RawMessage) (interface{}, error)
- func UnmarshalStringArg(bs json.RawMessage) (interface{}, error)
- func UnmarshalUint32Arg(bs json.RawMessage) (interface{}, error)
- type Config
- type DnsMsgMatcher
- func BuildDnsMsgMatcher(mc MatcherConfig) (DnsMsgMatcher, error)
- func NewMatchDNSMsgAuthenticatedData(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgAuthoritative(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgCheckingDisabled(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgEDE(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgOpcode(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgQueryClass(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgQueryName(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgQueryNameRegexp(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgQueryNameSubDomain(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgQueryType(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgRcode(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgRecursionAvailable(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgRecursionDesired(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgResponse(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgStatic(arg interface{}) (DnsMsgMatcher, error)
- func NewMatchDNSMsgTruncated(arg interface{}) (DnsMsgMatcher, error)
- type DnstapMatcher
- func BuildDnstapMatcher(mc MatcherConfig) (DnstapMatcher, error)
- func NewMatchDnstapStatic(arg interface{}) (DnstapMatcher, error)
- func NewMatchMessageFamily(arg interface{}) (DnstapMatcher, error)
- func NewMatchMessageProtocol(arg interface{}) (DnstapMatcher, error)
- func NewMatchMessageType(arg interface{}) (DnstapMatcher, error)
- func NewMatchQueryAddress(arg interface{}) (DnstapMatcher, error)
- func NewMatchQueryPort(arg interface{}) (DnstapMatcher, error)
- func NewMatchResponseAddress(arg interface{}) (DnstapMatcher, error)
- func NewMatchResponsePort(arg interface{}) (DnstapMatcher, error)
- type IPNet
- type MatchOp
- type MatcherConfig
- type MatcherName
- type MatcherSet
- type MatcherType
- type NewDnsMsgMatcher
- type NewDnstapMatcher
- type SetOp
- type UnmarshalFunc
Constants ¶
View Source
const ( DNSMatcherStatic = "Static" DNSTAPMatcherStatic = "Static" )
Variables ¶
View Source
var (
StringToEDE = map[string]uint16{
"OtherError": 0,
"UnsupportedDNSKEYAlgorithm": 1,
"UnsupportedDSDigestType": 2,
"StaleAnswer": 3,
"ForgedAnswer": 4,
"DNSSECIndeterminate": 5,
"DNSSECBogus": 6,
"SignatureExpired": 7,
"SignatureNotYetValid": 8,
"DNSKEYMissing": 9,
"RRSIGsMissing": 10,
"NoZoneKeyBitSet": 11,
"NSECMissing": 12,
"CachedError": 13,
"NotReady": 14,
"Blocked": 15,
"Censored": 16,
"Filtered": 17,
"Prohibited": 18,
"StaleNXDomainAnswer": 19,
"NotAuthoritative": 20,
"NotSupported": 21,
"NoReachableAuthority": 22,
"NetworkError": 23,
"InvalidData": 24,
"SignatureExpiredbeforeValid": 25,
"TooEarly": 26,
"UnsupportedNSEC3IterationsValue": 27,
"Unabletoconformtopolicy": 28,
"Synthesized": 29,
}
)
Functions ¶
func RegisterDnsMsgMatcher ¶
func RegisterDnsMsgMatcher(name MatcherName, newFunc NewDnsMsgMatcher, unmarshaler UnmarshalFunc)
func RegisterDnstapMatcher ¶
func RegisterDnstapMatcher(name MatcherName, newFunc NewDnstapMatcher, unmarshaler UnmarshalFunc)
func UnmarshalBoolArg ¶
func UnmarshalBoolArg(bs json.RawMessage) (interface{}, error)
func UnmarshalStringArg ¶
func UnmarshalStringArg(bs json.RawMessage) (interface{}, error)
func UnmarshalUint32Arg ¶
func UnmarshalUint32Arg(bs json.RawMessage) (interface{}, error)
Types ¶
type Config ¶
type Config struct { Op MatchOp Inverse bool Matchers []MatcherConfig SubConfigs []Config }
type DnsMsgMatcher ¶
func BuildDnsMsgMatcher ¶
func BuildDnsMsgMatcher(mc MatcherConfig) (DnsMsgMatcher, error)
func NewMatchDNSMsgAuthenticatedData ¶
func NewMatchDNSMsgAuthenticatedData(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgAuthoritative ¶
func NewMatchDNSMsgAuthoritative(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgCheckingDisabled ¶
func NewMatchDNSMsgCheckingDisabled(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgEDE ¶ added in v1.11.0
func NewMatchDNSMsgEDE(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgOpcode ¶
func NewMatchDNSMsgOpcode(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgQueryClass ¶
func NewMatchDNSMsgQueryClass(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgQueryName ¶
func NewMatchDNSMsgQueryName(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgQueryNameRegexp ¶
func NewMatchDNSMsgQueryNameRegexp(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgQueryNameSubDomain ¶ added in v1.10.0
func NewMatchDNSMsgQueryNameSubDomain(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgQueryType ¶
func NewMatchDNSMsgQueryType(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgRcode ¶
func NewMatchDNSMsgRcode(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgRecursionAvailable ¶
func NewMatchDNSMsgRecursionAvailable(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgRecursionDesired ¶
func NewMatchDNSMsgRecursionDesired(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgResponse ¶
func NewMatchDNSMsgResponse(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgStatic ¶
func NewMatchDNSMsgStatic(arg interface{}) (DnsMsgMatcher, error)
func NewMatchDNSMsgTruncated ¶
func NewMatchDNSMsgTruncated(arg interface{}) (DnsMsgMatcher, error)
type DnstapMatcher ¶
func BuildDnstapMatcher ¶
func BuildDnstapMatcher(mc MatcherConfig) (DnstapMatcher, error)
func NewMatchDnstapStatic ¶
func NewMatchDnstapStatic(arg interface{}) (DnstapMatcher, error)
func NewMatchMessageFamily ¶
func NewMatchMessageFamily(arg interface{}) (DnstapMatcher, error)
func NewMatchMessageProtocol ¶
func NewMatchMessageProtocol(arg interface{}) (DnstapMatcher, error)
func NewMatchMessageType ¶
func NewMatchMessageType(arg interface{}) (DnstapMatcher, error)
func NewMatchQueryAddress ¶
func NewMatchQueryAddress(arg interface{}) (DnstapMatcher, error)
func NewMatchQueryPort ¶
func NewMatchQueryPort(arg interface{}) (DnstapMatcher, error)
func NewMatchResponseAddress ¶
func NewMatchResponseAddress(arg interface{}) (DnstapMatcher, error)
func NewMatchResponsePort ¶
func NewMatchResponsePort(arg interface{}) (DnstapMatcher, error)
type MatcherConfig ¶
type MatcherConfig struct { Type MatcherType Name MatcherName Arg interface{} }
func (*MatcherConfig) UnmarshalJSON ¶
func (c *MatcherConfig) UnmarshalJSON(bs []byte) error
type MatcherName ¶ added in v1.0.0
type MatcherName string
const ( DNSMatcherAuthenticatedData MatcherName = "AuthenticatedData" DNSMatcherAD MatcherName = "AD" )
const ( DNSMatcherAuthoritative MatcherName = "Authoritative" DNSMatcherAA MatcherName = "AA" )
const ( DNSMatcherCheckingDisabled MatcherName = "CheckingDisabled" DNSMatcherCD MatcherName = "CD" )
const ( DNSMatcherRecursionAvailable MatcherName = "RecursionAvailable" DNSMatcherRA MatcherName = "RA" )
const ( DNSMatcherRecursionDesired MatcherName = "RecursionDesired" DNSMatcherRD MatcherName = "RD" )
const ( DNSMatcherResponse MatcherName = "Response" DNSMatcherQR MatcherName = "QR" )
const ( DNSMatcherTruncated MatcherName = "Truncated" DNSMatcherTC MatcherName = "TC" )
const (
DNSMatcherEDE MatcherName = "EDE"
)
const (
DNSMatcherOpcode MatcherName = "Opcode"
)
const (
DNSMatcherQClass MatcherName = "QClass"
)
const (
DNSMatcherQName MatcherName = "QName"
)
const (
DNSMatcherQNameRegexp MatcherName = "QNameRegexp"
)
const (
DNSMatcherQNameSubDomain MatcherName = "QNameSubDomain"
)
const (
DNSMatcherQType MatcherName = "QType"
)
const (
DNSMatcherRcode MatcherName = "Rcode"
)
const (
DNSTAPMatcherMessageFamily MatcherName = "MessageFamily"
)
const (
DNSTAPMatcherMessageProtocol MatcherName = "MessageProtocol"
)
const (
DNSTAPMatcherMessageType MatcherName = "MessageType"
)
const (
DNSTAPMatcherQueryAddress MatcherName = "QueryAddress"
)
const (
DNSTAPMatcherQueryPort MatcherName = "QueryPort"
)
const (
DNSTAPMatcherResponseAddress MatcherName = "ResponseAddress"
)
const (
DNSTAPMatcherResponsePort MatcherName = "ResponsePort"
)
func (MatcherName) Get ¶ added in v1.0.0
func (m MatcherName) Get() MatcherName
type MatcherSet ¶
type MatcherSet struct { Op SetOp Inverse bool DnstapMatchers []DnstapMatcher DnsMsgMatchers []DnsMsgMatcher SubSets []*MatcherSet }
func BuilderMatchSet ¶
func BuilderMatchSet(c *Config) (*MatcherSet, error)
func NewMatcherSet ¶
func NewMatcherSet() *MatcherSet
func (*MatcherSet) MatchDnsMsg ¶
func (d *MatcherSet) MatchDnsMsg(msg *dns.Msg) bool
func (*MatcherSet) MatchDnstap ¶
func (d *MatcherSet) MatchDnstap(dt *dnstap.Dnstap) bool
type MatcherType ¶
type MatcherType string
const ( MatcherTypeDnstap MatcherType = "DNSTAP" MatcherTypeDnsMsg MatcherType = "DNS" )
func (MatcherType) Equals ¶ added in v1.0.0
func (m MatcherType) Equals(c MatcherType) bool
func (MatcherType) Get ¶ added in v1.0.0
func (m MatcherType) Get() MatcherType
type NewDnsMsgMatcher ¶
type NewDnsMsgMatcher func(interface{}) (DnsMsgMatcher, error)
type NewDnstapMatcher ¶
type NewDnstapMatcher func(interface{}) (DnstapMatcher, error)
type UnmarshalFunc ¶
type UnmarshalFunc func(json.RawMessage) (interface{}, error)
Source Files ¶
- builder.go
- cast.go
- config.go
- dnsmsg_authenticated_data.go
- dnsmsg_authoritative.go
- dnsmsg_checking_disabled.go
- dnsmsg_ede.go
- dnsmsg_opcode.go
- dnsmsg_query_class.go
- dnsmsg_query_name.go
- dnsmsg_query_name_regexp.go
- dnsmsg_query_name_subdomain.go
- dnsmsg_query_type.go
- dnsmsg_rcode.go
- dnsmsg_recursion_available.go
- dnsmsg_recursion_desired.go
- dnsmsg_response.go
- dnsmsg_truncated.go
- dnstap_family.go
- dnstap_protocol.go
- dnstap_query_address.go
- dnstap_query_port.go
- dnstap_response_address.go
- dnstap_response_port.go
- dnstap_type.go
- interface.go
- matcher_set.go
- net.go
- register.go
- static.go
- utils.go
Click to show internal directories.
Click to hide internal directories.