Documentation ¶
Index ¶
- Constants
- Variables
- func Age(op string, age float64) *rulesv1beta2.Atom
- func AgeEquals(age float64) *rulesv1beta2.Atom
- func City(op, city string) *rulesv1beta2.Atom
- func CityEquals(city string) *rulesv1beta2.Atom
- func CityIn(cities ...interface{}) *rulesv1beta2.Atom
- func CtxBuilder() *ctxBuilder
- func EvaluateFeatureV1Beta3(feature *featurev1beta1.Tree, context map[string]interface{}) (*anypb.Any, []int, error)
- func NewV1Beta2(rule *rulesv1beta2.Rule) *v1beta2
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 City ¶
func City(op, city string) *rulesv1beta2.Atom
func CityIn ¶
func CityIn(cities ...interface{}) *rulesv1beta2.Atom
func CtxBuilder ¶
func CtxBuilder() *ctxBuilder
func EvaluateFeatureV1Beta3 ¶
func NewV1Beta2 ¶
func NewV1Beta2(rule *rulesv1beta2.Rule) *v1beta2
Represents the rules defined in the proto package 'lekko.rules.v1beta2'.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.