eventfilter

package
v0.19.1106 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourcePayload Source = "payload"
	SourceHeaders Source = "headers"

	OperatorEq        Operator = "eq"
	OperatorNEq       Operator = "neq"
	OperatorIn        Operator = "in"
	OperatorPrefix    Operator = "prefix"
	OperatorSuffix    Operator = "suffix"
	OperatorContains  Operator = "contains"
	OperatorGT        Operator = "gt"
	OperatorGTE       Operator = "gte"
	OperatorLT        Operator = "lt"
	OperatorLTE       Operator = "lte"
	OperatorRegex     Operator = "regex"
	OperatorExists    Operator = "exists"
	OperatorNotExists Operator = "not_exists"
)

Variables

This section is empty.

Functions

func IsPositive

func IsPositive(op Operator) bool

func ParsePath

func ParsePath(value string, allowWildcard bool) (*jsonpath.Path, error)

Types

type Compiled

type Compiled struct {
	// contains filtered or unexported fields
}

func Compile

func Compile(filter Filter) (*Compiled, error)

func (*Compiled) Evaluate

func (c *Compiled) Evaluate(payload any, headers http.Header) Result

type Filter

type Filter struct {
	From  Source
	Path  string
	Op    Operator
	Value any
}

type Operator

type Operator string

type Result

type Result struct {
	Matched  bool
	Selected []any
}

type Source

type Source string

Jump to

Keyboard shortcuts

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