rules

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 AgeEqualsV3 added in v0.2.9

func AgeEqualsV3(age float64) *rulesv1beta3.Atom

age ==

func AgeNotEqualsV3 added in v0.2.11

func AgeNotEqualsV3(age float64) *rulesv1beta3.Atom

age !=

func AgeV3 added in v0.2.9

func AgeV3(op string, age float64) *rulesv1beta3.Atom

func City

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

func CityEquals

func CityEquals(city string) *rulesv1beta2.Atom

city ==

func CityEqualsV3 added in v0.2.9

func CityEqualsV3(city string) *rulesv1beta3.Atom

city ==

func CityIn

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

func CityInV3 added in v0.2.9

func CityInV3(cities ...interface{}) *rulesv1beta3.Atom

func CityV3 added in v0.2.9

func CityV3(op, city string) *rulesv1beta3.Atom

func CtxBuilder

func CtxBuilder() *ctxBuilder

func NewV1Beta2

func NewV1Beta2(rule *rulesv1beta2.Rule) *v1beta2

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

func NewV1Beta3 added in v0.2.9

func NewV1Beta3(rule *rulesv1beta3.Rule) *v1beta3

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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