matches

package
v0.0.0-...-447c91e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTargetReader

func GetTargetReader(target string) (io.Reader, error)

func ParseAbpMatches

func ParseAbpMatches(reader io.Reader, trie *data.Trie) error

func ParseHostsMatches

func ParseHostsMatches(reader io.Reader, trie *data.Trie) error

func ParseRpzMatches

func ParseRpzMatches(reader io.Reader, trie *data.Trie) error

func ProcessCidrData

func ProcessCidrData(value json.RawMessage) (interface{}, error)

func ProcessCronData

func ProcessCronData(value json.RawMessage) (interface{}, error)

func ProcessExternalData

func ProcessExternalData(value json.RawMessage) (interface{}, error)

func ProcessQNameData

func ProcessQNameData(value json.RawMessage) (interface{}, error)

func ProcessQTypeData

func ProcessQTypeData(value json.RawMessage) (interface{}, error)

func ProcessRegexData

func ProcessRegexData(value json.RawMessage) (interface{}, error)

func ProcessTimeData

func ProcessTimeData(value json.RawMessage) (interface{}, error)

Types

type CidrData

type CidrData struct {
	Networks []net.IPNet
}

type CronData

type CronData struct {
	Entries []struct {
		Expression string
		Schedule   cron.Schedule
	}
}

type ExternalData

type ExternalData struct {
	Trie *data.Trie
}

type MatchResult

type MatchResult struct {
	Handled bool
	Data    string
}

func HandleMatches

func HandleMatches(state request.Request, ctx context.Context, alias string, data interface{}) (*MatchResult, error)

func MatchCidr

func MatchCidr(state request.Request, ctx context.Context, data CidrData) (*MatchResult, error)

func MatchCron

func MatchCron(state request.Request, ctx context.Context, data CronData) (*MatchResult, error)

func MatchExternal

func MatchExternal(state request.Request, ctx context.Context, data ExternalData) (*MatchResult, error)

func MatchQName

func MatchQName(state request.Request, ctx context.Context, data QNameData) (*MatchResult, error)

func MatchQType

func MatchQType(state request.Request, ctx context.Context, data QTypeData) (*MatchResult, error)

func MatchRegex

func MatchRegex(state request.Request, ctx context.Context, data RegexData) (*MatchResult, error)

func MatchTime

func MatchTime(state request.Request, ctx context.Context, data TimeData) (*MatchResult, error)

type QNameData

type QNameData struct {
	Trie *data.Trie
}

type QTypeData

type QTypeData struct {
	Types []string
}

type RegexData

type RegexData struct {
	Entries []struct {
		Pattern string
		Regex   regexp.Regexp
	}
}

type TimeData

type TimeData struct {
	TimeRanges []TimeRange
}

type TimeRange

type TimeRange struct {
	Start time.Time
	End   time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL