Documentation ¶
Index ¶
Constants ¶
View Source
const ( All RuleType = "ALL" Any RuleType = "ANY" None RuleType = "NONE" Equal ConditionOperator = "EQUAL" GreaterThan ConditionOperator = "GREATER_THAN" LessThan ConditionOperator = "LESS_THAN" LessThanInclusive ConditionOperator = "LESS_THAN_INCLUSIVE" Contains ConditionOperator = "CONTAINS" GreaterThanInclusive ConditionOperator = "GREATER_THAN_INCLUSIVE" NotContains ConditionOperator = "NOT_CONTAINS" NotEqual ConditionOperator = "NOT EQUAL" Regex ConditionOperator = "REGEX" PercentageSplit ConditionOperator = "PERCENTAGE_SPLIT" IsSet ConditionOperator = "IS_SET" IsNotSet ConditionOperator = "IS_NOT_SET" Modulo ConditionOperator = "MODULO" )
Variables ¶
This section is empty.
Functions ¶
func EvaluateIdentityInSegment ¶
func EvaluateIdentityInSegment( identity *identities.IdentityModel, segment *SegmentModel, overrideTraits ...*traits.TraitModel, ) bool
Types ¶
type ConditionOperator ¶
type ConditionOperator string
type SegmentConditionModel ¶
type SegmentConditionModel struct { Operator ConditionOperator `json:"operator"` Value string `json:"value"` Property string `json:"property_"` }
func (*SegmentConditionModel) MatchesTraitValue ¶
func (m *SegmentConditionModel) MatchesTraitValue(traitValue string) bool
type SegmentModel ¶
type SegmentModel struct { ID int `json:"id"` Name string `json:"name"` Rules []*SegmentRuleModel `json:"rules"` FeatureStates []*features.FeatureStateModel `json:"feature_states"` }
type SegmentRuleModel ¶
type SegmentRuleModel struct { Type RuleType `json:"type"` Rules []*SegmentRuleModel Conditions []*SegmentConditionModel }
func (*SegmentRuleModel) MatchingFunction ¶
func (sr *SegmentRuleModel) MatchingFunction() func([]bool) bool
Click to show internal directories.
Click to hide internal directories.