Versions in this module Expand all Collapse all v0 v0.2.0 Nov 22, 2026 Changes in this version type ConstructKind + const ConstructAttributeType v0.1.0 Oct 23, 2026 Changes in this version + const Buckets + const ConditionAttribute + const ConditionInSegment + const ConditionNotInSegment + const ConditionPrerequisite + const SchemaVersion + const ScopeServer + const ServeExperiment + const ServeRollout + const ServeVariation + func Bucket(salt, unitID string) int + func BucketInput(salt, unitID string) string + func CheckOperator(typ AttributeType, op string, value any) error + func Murmur3(data []byte) uint32 + type Attribute struct + Key string + Type AttributeType + type AttributeType string + const TypeBoolean + const TypeDate + const TypeList + const TypeNumber + const TypeSemver + const TypeString + type Condition struct + Attribute string + Flag string + Kind string + Op string + Segment string + Value any + Variation string + type Construct struct + Kind ConstructKind + Name string + type ConstructKind string + const ConstructConditionKind + const ConstructOperator + const ConstructServeKind + type Context struct + Attributes map[string]any + Units map[string]string + type Environment struct + Key string + Protected bool + type ErrorCode string + const ErrorFlagNotFound + const ErrorInconsistentRuleset + const ErrorPrerequisiteCycle + type ExperimentDetail struct + InclusionBucket int + InclusionSalt string + Key string + Override bool + UnitID string + UnitType string + Variation string + VariationBucket int + VariationSalt string + type Flag struct + AutomaticExposure bool + Fallthrough string + Key string + OffVariation string + On bool + Overrides []Override + Prerequisites []Prerequisite + Rules []Rule + Type string + Variations []Variation + type Override struct + UnitID string + UnitType string + Variation string + type Prerequisite struct + Flag string + Variation string + type Reason string + const ReasonError + const ReasonExperiment + const ReasonFallthrough + const ReasonOff + const ReasonOverride + const ReasonPrerequisiteFailed + const ReasonRollout + const ReasonRule + type Result struct + AutomaticExposure bool + Bucket *int + ErrorCode ErrorCode + Experiment *ExperimentDetail + OverrideInfluenced bool + Prerequisite string + Reason Reason + RuleID string + Type string + Value json.RawMessage + Variation string + func (r Result) MarshalJSON() ([]byte, error) + type Rule struct + Conditions []Condition + ID string + Serve Serve + type Ruleset struct + Attributes []Attribute + Environment *Environment + Flags []Flag + SchemaVersion int + Scope string + Segments []Segment + UnitTypes []string + Version int64 + func Decode(data []byte) (*Ruleset, error) + func (rs *Ruleset) Evaluate(ctx Context, flag string) Result + func (rs *Ruleset) EvaluateAll(ctx Context) map[string]Result + func (rs *Ruleset) Flag(key string) (*Flag, bool) + func (rs *Ruleset) Protected() bool + func (rs *Ruleset) UnsupportedRules() map[string][]Construct + type Segment struct + Conditions []Condition + Key string + Private bool + type Semver struct + func ParseSemver(s string) (Semver, bool) + func (v Semver) Compare(w Semver) int + type Serve struct + Experiment string + InclusionSalt string + Kind string + Percentage int + Salt string + TrafficAllocation int + UnitType string + Variation string + VariationSalt string + Weights []Weight + type Variation struct + Key string + Value json.RawMessage + type Weight struct + Variation string + Weight int