Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2026 Changes in this version + func Bucket(flagKey string, user DataContext, rollout Rollout) bool + func NewCELEnv() (*cel.Env, error) + func NewCELEnvForContext(schema *ContextSchema) (*cel.Env, error) + type BucketTrace struct + BucketBy string + BucketNumber *int + BucketValue string + InRollout bool + Missing bool + Percentage int + type CompiledRule struct + ID string + Program cel.Program + Rollout Rollout + Source string + Value any + type ContextField struct + Path string + Type ContextType + type ContextSchema struct + CreatedAt time.Time + CreatedBy *string + DeletedBy *string + Description string + Fields []ContextField + ID string + Name string + UpdatedAt time.Time + type ContextType string + const ContextTypeBool + const ContextTypeDouble + const ContextTypeInt + const ContextTypeList + const ContextTypeMap + const ContextTypeString + const ContextTypeTimestamp + func (t ContextType) Valid() bool + type DataContext map[string]any + type Engine struct + func NewEngine(celEnv *cel.Env) *Engine + func (e *Engine) CompileFlag(key string, config FlagConfig) (*Flag, error) + func (e *Engine) CompileFlagForContext(key string, config FlagConfig, schema *ContextSchema) (*Flag, error) + func (e *Engine) Evaluate(flag *Flag, data DataContext) FlagValue + func (e *Engine) EvaluateConfig(config FlagConfig, data DataContext) EvaluationTrace + func (e *Engine) EvaluateConfigForContext(config FlagConfig, schema *ContextSchema, data DataContext) EvaluationTrace + func (e *Engine) EvaluateResult(flag *Flag, data DataContext) EvaluationResult + func (e *Engine) EvaluateTrace(flag *Flag, data DataContext) EvaluationTrace + type EvalContext struct + Request map[string]any + Time *time.Time + User map[string]any + type EvaluationResult struct + Error string + Key string + Reason string + Value any + ValueType ValueType + Variant string + type EvaluationTrace struct + Bucket *BucketTrace + DefaultValue any + Enabled bool + Error string + Key string + MatchedRule *MatchedRuleTrace + Reason string + RuleResults []RuleEvaluationTrace + Type ValueType + Value any + func (t EvaluationTrace) Result() EvaluationResult + type Flag struct + DefaultValue any + Enabled bool + Key string + Rules []CompiledRule + Type ValueType + type FlagConfig struct + ContextID *string + CreatedAt time.Time + CreatedBy *string + DefaultValue any + DeletedBy *string + Description string + Enabled bool + Key string + Rules []Rule + Type ValueType + UpdatedAt time.Time + UpdatedBy *string + type FlagValue struct + Type ValueType + Value any + type MatchedRuleTrace struct + Expression string + ID string + Index int + Value any + type Rollout struct + BucketBy string + Percentage int + type Rule struct + CreatedAt time.Time + CreatedBy *string + DeletedBy *string + Description string + Expression string + ID string + Rollout Rollout + UpdatedAt time.Time + UpdatedBy *string + Value any + type RuleEvaluationTrace struct + Error string + Expression string + ID string + Index int + Matched bool + Value any + type ValueType string + const ValueTypeBoolean + const ValueTypeJSON + const ValueTypeNumber + const ValueTypeString