expression

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedToken = errors.New("unexpected token in expression")

Functions

This section is empty.

Types

type And

type And struct {
	Left, Right Expression
}

func (And) Evaluate

func (a And) Evaluate(data map[string]string) bool

type Condition

type Condition struct {
	Field string
	Op    string
	Value string
}

func (Condition) Evaluate

func (c Condition) Evaluate(data map[string]string) bool

type Expression

type Expression interface {
	Evaluate(data map[string]string) bool
}

func Parse

func Parse(input string) (Expression, error)

Parse takes a raw filter string and returns an Expression AST

type Not

type Not struct {
	Inner Expression
}

func (Not) Evaluate

func (n Not) Evaluate(data map[string]string) bool

type Or

type Or struct {
	Left, Right Expression
}

func (Or) Evaluate

func (o Or) Evaluate(data map[string]string) bool

Jump to

Keyboard shortcuts

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