Documentation
¶
Overview ¶
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Package matchers //
Index ¶
- Constants
- func ExactMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func ExistsMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func GeMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func GtMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func LeMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func LtMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func QualifiedMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func Register(name string, matcher Matcher)
- func SemverEqMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func SemverEvaluator(cond entities.Condition, user entities.UserContext) (int, error)
- func SemverGeMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func SemverGtMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func SemverLeMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func SemverLtMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- func SubstringMatcher(condition entities.Condition, user entities.UserContext, ...) (bool, error)
- type Matcher
- type SemanticVersion
Constants ¶
const ( // QualifiedMatchType name for the "qualified" matcher QualifiedMatchType = "qualified" // ExactMatchType name for the "exact" matcher ExactMatchType = "exact" // ExistsMatchType name for the "exists" matcher ExistsMatchType = "exists" // LtMatchType name for the "lt" matcher LtMatchType = "lt" // LeMatchType name for the "le" matcher LeMatchType = "le" // GtMatchType name for the "gt" matcher GtMatchType = "gt" // GeMatchType name for the "ge" matcher GeMatchType = "ge" // SubstringMatchType name for the "substring" matcher SubstringMatchType = "substring" // SemverEqMatchType name for the semver_eq matcher SemverEqMatchType = "semver_eq" // SemverLtMatchType name for the semver_eq matcher SemverLtMatchType = "semver_lt" // SemverLeMatchType name for the semver_eq matcher SemverLeMatchType = "semver_le" // SemverGtMatchType name for the semver_eq matcher SemverGtMatchType = "semver_gt" // SemverGeMatchType name for the semver_eq matcher SemverGeMatchType = "semver_ge" )
Variables ¶
This section is empty.
Functions ¶
func ExactMatcher ¶
func ExactMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
ExactMatcher matches against the "exact" match type
func ExistsMatcher ¶
func ExistsMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
ExistsMatcher matches against the "exists" match type
func GeMatcher ¶
func GeMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
GeMatcher matches against the "ge" match type
func GtMatcher ¶
func GtMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
GtMatcher matches against the "gt" match type
func LeMatcher ¶
func LeMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
LeMatcher matches against the "le" match type
func LtMatcher ¶
func LtMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
LtMatcher matches against the "lt" match type
func QualifiedMatcher ¶
func QualifiedMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
QualifiedMatcher matches against the "qualified" match type
func SemverEqMatcher ¶
func SemverEqMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SemverEqMatcher returns true if the user's semver attribute is equal to the semver condition value
func SemverEvaluator ¶
SemverEvaluator is a help function to wrap a common evaluation code
func SemverGeMatcher ¶
func SemverGeMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SemverGeMatcher returns true if the user's semver attribute is greater or equal to the semver condition value
func SemverGtMatcher ¶
func SemverGtMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SemverGtMatcher returns true if the user's semver attribute is greater than the semver condition value
func SemverLeMatcher ¶
func SemverLeMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SemverLeMatcher returns true if the user's semver attribute is less than or equal to the semver condition value
func SemverLtMatcher ¶
func SemverLtMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SemverLtMatcher returns true if the user's semver attribute is less than the semver condition value
func SubstringMatcher ¶
func SubstringMatcher(condition entities.Condition, user entities.UserContext, logger logging.OptimizelyLogProducer) (bool, error)
SubstringMatcher matches against the "substring" match type
Types ¶
type Matcher ¶
type Matcher func(entities.Condition, entities.UserContext, logging.OptimizelyLogProducer) (bool, error)
Matcher type is used to evaluate audience conditional primitives
type SemanticVersion ¶
type SemanticVersion struct {
Condition string // condition is always a string here
}
SemanticVersion defines the class