Versions in this module Expand all Collapse all v8 v8.0.0 Nov 10, 2025 Changes in this version + const ConditionTypeRollout + const ConditionTypeWhitelist + const MatcherCombinerAnd + var ErrInvalidEqualSemver = errors.New("semver is required for EQUAL_TO_SEMVER matcher type") + var ErrInvalidGTOESemver = errors.New("semver is required for GREATER_THAN_OR_EQUAL_TO_SEMVER matcher type") + var ErrInvalidLBetweenSemver = errors.New("semver is required for BETWEEN_SEMVER matcher type") + var ErrInvalidLInListSemver = errors.New("semver is required for IN_LIST_SEMVER matcher type") + var ErrInvalidLTOESemver = errors.New("semver is required for LESS_THAN_OR_EQUAL_TO_SEMVER matcher type") + type AllKeysMatcher struct + func NewAllKeysMatcher(negate bool) *AllKeysMatcher + func (m AllKeysMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type BetweenMatcher struct + ComparisonDataType string + LowerComparisonValue int64 + UpperComparisonValue int64 + func NewBetweenMatcher(negate bool, lower int64, upper int64, cmpType string, attributeName *string) *BetweenMatcher + func (m *BetweenMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type BetweenSemverMatcher struct + func NewBetweenSemverMatcher(startVal string, endVal string, negate bool, attributeName *string, ...) *BetweenSemverMatcher + func (b *BetweenSemverMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type BooleanMatcher struct + func NewBooleanMatcher(negate bool, value *bool, attributeName *string) *BooleanMatcher + func (m *BooleanMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type Condition struct + func BuildCondition(conditionType string, label string, partitions []Partition, ...) *Condition + func NewCondition(cond *dtos.ConditionDTO, logger logging.LoggerInterface, ...) (*Condition, error) + func NewRBCondition(cond *dtos.RuleBasedConditionDTO, logger logging.LoggerInterface, ...) (*Condition, error) + func (c *Condition) CalculateTreatment(bucket int) *string + func (c *Condition) Combiner() string + func (c *Condition) ConditionType() string + func (c *Condition) Label() string + func (c *Condition) Matches(key string, bucketingKey *string, attributes map[string]interface{}) bool + type ContainsAllOfSetMatcher struct + func NewContainsAllOfSetMatcher(negate bool, setItems []string, attributeName *string) *ContainsAllOfSetMatcher + func (m *ContainsAllOfSetMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type ContainsAnyOfSetMatcher struct + func NewContainsAnyOfSetMatcher(negate bool, setItems []string, attributeName *string) *ContainsAnyOfSetMatcher + func (m *ContainsAnyOfSetMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type ContainsStringMatcher struct + func NewContainsStringMatcher(negate bool, substrings []string, attributeName *string) *ContainsStringMatcher + func (m *ContainsStringMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type DependencyMatcher struct + func NewDependencyMatcher(negate bool, feature string, treatments []string, ...) *DependencyMatcher + func (m *DependencyMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type EndsWithMatcher struct + func NewEndsWithMatcher(negate bool, suffixes []string, attributeName *string) *EndsWithMatcher + func (m *EndsWithMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type EqualToMatcher struct + ComparisonDataType string + ComparisonValue int64 + func NewEqualToMatcher(negate bool, cmpVal int64, cmpType string, attributeName *string) *EqualToMatcher + func (m *EqualToMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type EqualToSemverMatcher struct + func NewEqualToSemverMatcher(cmpVal string, negate bool, attributeName *string, ...) *EqualToSemverMatcher + func (e *EqualToSemverMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type EqualToSetMatcher struct + func NewEqualToSetMatcher(negate bool, setItems []string, attributeName *string) *EqualToSetMatcher + func (m *EqualToSetMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type GreaterThanOrEqualToMatcher struct + ComparisonDataType string + ComparisonValue int64 + func NewGreaterThanOrEqualToMatcher(negate bool, cmpVal int64, cmpType string, attributeName *string) *GreaterThanOrEqualToMatcher + func (m *GreaterThanOrEqualToMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type GreaterThanOrEqualToSemverMatcher struct + func NewGreaterThanOrEqualToSemverMatcher(negate bool, compareTo string, attributeName *string, ...) *GreaterThanOrEqualToSemverMatcher + func (g *GreaterThanOrEqualToSemverMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type InLargeSegmentMatcher struct + func NewInLargeSegmentMatcher(negate bool, name string, attributeName *string, ...) *InLargeSegmentMatcher + func (m *InLargeSegmentMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type InListSemverMatcher struct + func NewInListSemverMatcher(setVersions []string, negate bool, attributeName *string, ...) *InListSemverMatcher + func (i *InListSemverMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type InRuleBasedSegmentMatcher struct + func NewInRuleBasedSegmentMatcher(negate bool, name string, attributeName *string, ruleBuilder RuleBuilder) *InRuleBasedSegmentMatcher + func (m *InRuleBasedSegmentMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type InSegmentMatcher struct + func NewInSegmentMatcher(negate bool, segmentName string, attributeName *string, ...) *InSegmentMatcher + func (m *InSegmentMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type LessThanOrEqualToMatcher struct + ComparisonDataType string + ComparisonValue int64 + func NewLessThanOrEqualToMatcher(negate bool, cmpVal int64, cmpType string, attributeName *string) *LessThanOrEqualToMatcher + func (m *LessThanOrEqualToMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type LessThanOrEqualToSemverMatcher struct + func NewLessThanOrEqualToSemverMatcher(compareTo string, negate bool, attributeName *string, ...) *LessThanOrEqualToSemverMatcher + func (l *LessThanOrEqualToSemverMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type Matcher struct + func (m *Matcher) Negate() bool + type MatcherInterface interface + Match func(key string, attributes map[string]interface{}, bucketingKey *string) bool + Negate func() bool + type PartOfSetMatcher struct + func NewPartOfSetMatcher(negate bool, setItems []string, attributeName *string) *PartOfSetMatcher + func (m *PartOfSetMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type Partition struct + PartitionData dtos.PartitionDTO + type PrerequisitesMatcher struct + func NewPrerequisitesMatcher(prerequisistes []dtos.Prerequisite, dependencyEvaluator dependencyEvaluator) *PrerequisitesMatcher + func (m *PrerequisitesMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type RegexMatcher struct + func NewRegexMatcher(negate bool, regex string, attributeName *string) *RegexMatcher + func (m *RegexMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type RuleBuilder struct + func NewRuleBuilder(segmentStorage storage.SegmentStorageConsumer, ...) RuleBuilder + func (r RuleBuilder) BuildMatcher(dto *dtos.MatcherDTO) (MatcherInterface, error) + func (r RuleBuilder) BuildPrerequistesMatchers(prerequistes []dtos.Prerequisite) *PrerequisitesMatcher + type Split struct + func NewSplit(splitDTO *dtos.SplitDTO, logger logging.LoggerInterface, ...) *Split + func (s *Split) Algo() int + func (s *Split) ChangeNumber() int64 + func (s *Split) Conditions() []*Condition + func (s *Split) Configurations() map[string]string + func (s *Split) DefaultTreatment() string + func (s *Split) ImpressionsDisabled() bool + func (s *Split) Killed() bool + func (s *Split) Name() string + func (s *Split) Prerequisites() *PrerequisitesMatcher + func (s *Split) Seed() int64 + func (s *Split) Status() string + func (s *Split) TrafficAllocation() int + func (s *Split) TrafficAllocationSeed() int64 + type StartsWithMatcher struct + func NewStartsWithMatcher(negate bool, prefixes []string, attributeName *string) *StartsWithMatcher + func (m *StartsWithMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool + type WhitelistMatcher struct + func NewWhitelistMatcher(negate bool, whitelist []string, attributeName *string) *WhitelistMatcher + func (m *WhitelistMatcher) Match(key string, attributes map[string]interface{}, bucketingKey *string) bool Other modules containing this package github.com/splitio/go-split-commons/v5 github.com/splitio/go-split-commons/v6 github.com/splitio/go-split-commons/v7