expr

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

type Evaluator struct{}

Evaluator is a small, dependency-free visibility evaluator.

Supported operators: - boolean checks: `enabled` - comparisons: `field == true`, `field != "value"`, `count == 3` - boolean composition: `a == true && b != false`, `a || b`

Values are read from visibility.Context.Values (with dot-path traversal) and visibility.Context.Extras (via the `extras.` prefix).

func New

func New() *Evaluator

func (*Evaluator) Eval

func (e *Evaluator) Eval(fieldPath, rule string, ctx visibility.Context) (bool, error)

Jump to

Keyboard shortcuts

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