Versions in this module Expand all Collapse all v0 v0.2.0 Mar 8, 2026 v0.1.0 Feb 28, 2026 Changes in this version + type Engine struct + func NewEngine(store Store) *Engine + func (e *Engine) AddTarget(ctx context.Context, key, targetID string) error + func (e *Engine) DeleteFlag(ctx context.Context, key string) error + func (e *Engine) DisableFlag(ctx context.Context, key string) error + func (e *Engine) EnableFlag(ctx context.Context, key string) error + func (e *Engine) GetAllFlags(ctx context.Context) ([]*Flag, error) + func (e *Engine) GetFlag(ctx context.Context, key string) (*Flag, error) + func (e *Engine) IsEnabled(ctx context.Context, key string, evalCtx *EvaluationContext) (bool, error) + func (e *Engine) IsEnabledSimple(ctx context.Context, key string) (bool, error) + func (e *Engine) RemoveTarget(ctx context.Context, key, targetID string) error + func (e *Engine) SetFlag(ctx context.Context, flag *Flag) error + func (e *Engine) SetPercentage(ctx context.Context, key string, percentage int) error + type EvaluationContext struct + Attributes map[string]any + OrganizationID string + UserID string + type Flag struct + Description string + Enabled bool + Key string + Metadata map[string]any + Name string + Percentage int + Targets []string + type Store interface + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (*Flag, error) + GetAll func(ctx context.Context) ([]*Flag, error) + Set func(ctx context.Context, flag *Flag) error