Versions in this module Expand all Collapse all v0 v0.1.0 Dec 10, 2025 Changes in this version + type Context struct + CustomAttributes CustomAttributes + IPAddress string + TargetingKey string + User *User + type CustomAttributes map[string]interface + type Evaluation struct + ErrorMessage string + Key string + Reason interface{} + Type string + Value interface{} + type EvaluationResponse struct + Toggles map[string]Evaluation + type Option func(*Options) + func WithApplicationID(id string) Option + func WithDefaultContext(ctx *Context) Option + func WithDefaultTargetingKey(key string) Option + func WithEnvironment(env string) Option + func WithHorizonURLs(urls []string) Option + func WithPublicAPIKey(key string) Option + type Options struct + ApplicationID string + DefaultContext *Context + DefaultTargetingKey string + Environment string + HorizonURLs []string + PublicAPIKey string + type Toggle struct + func New(options ...Option) (*Toggle, error) + func (t *Toggle) Get(ctx context.Context, toggleKey string, defaultValue interface{}, ...) (interface{}, error) + func (t *Toggle) GetBoolean(ctx context.Context, toggleKey string, defaultValue bool, ...) bool + func (t *Toggle) GetNumber(ctx context.Context, toggleKey string, defaultValue float64, ...) float64 + func (t *Toggle) GetObject(ctx context.Context, toggleKey string, defaultValue map[string]interface{}, ...) map[string]interface{} + func (t *Toggle) GetString(ctx context.Context, toggleKey string, defaultValue string, ...) string + func (t *Toggle) SetErrorHandler(handler func(error)) + type User struct + CustomAttributes CustomAttributes + Email string + ID string + Name string