condition

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorOr  = "||"
	OperatorAnd = "&&"
)

Variables

This section is empty.

Functions

func FromStrings

func FromStrings(env *cel.Env, operator string, conditions ...string) (*cel.Ast, error)

func Merge

func Merge(env *cel.Env, operator string, conditions ...*cel.Ast) (*cel.Ast, error)

func NewMIMEMap added in v0.5.0

func NewMIMEMap(m textproto.MIMEHeader) traits.Mapper

func NewRulesEnvironment added in v0.5.0

func NewRulesEnvironment(networks map[string]cidranger.Ranger) (*cel.Env, error)

func NewValuesMap added in v0.5.0

func NewValuesMap(m map[string][]string) traits.Mapper

func Program added in v0.5.0

func Program(env *cel.Env, ast *cel.Ast) (cel.Program, error)

Types

type Condition

type Condition struct {
	Expression *cel.Ast
}

Jump to

Keyboard shortcuts

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