rules

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyAge  = "age"
	ContextKeyCity = "city"
)

Variables

View Source
var (
	ErrEmptyRule                error = fmt.Errorf("empty rule")
	ErrUnknownLogicalOperator   error = fmt.Errorf("unknown logical operator")
	ErrEmptyRuleComparisonValue error = fmt.Errorf("empty rule comparison value")
	ErrMismatchedType           error = fmt.Errorf("mismatched context type")
	ErrUnsupportedType          error = fmt.Errorf("unsupported type")
)

Functions

func Age

func Age(op string, age float64) *rulesv1beta2.Atom

func AgeEquals

func AgeEquals(age float64) *rulesv1beta2.Atom

age ==

func City

func City(op, city string) *rulesv1beta2.Atom

func CityEquals

func CityEquals(city string) *rulesv1beta2.Atom

city ==

func CityIn

func CityIn(cities ...interface{}) *rulesv1beta2.Atom

func CtxBuilder

func CtxBuilder() *ctxBuilder

func EvaluateFeatureV1Beta3

func EvaluateFeatureV1Beta3(feature *featurev1beta1.Tree, context map[string]interface{}) (*anypb.Any, []int, error)

func NewV1Beta2

func NewV1Beta2(rule *rulesv1beta2.Rule) *v1beta2

Represents the rules defined in the proto package 'lekko.rules.v1beta2'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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