Help us shape the future of Go! Take the 2026 Go Developer Survey

eventfilter

package
v0.19.1256 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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