Versions in this module Expand all Collapse all v8 v8.0.1 Aug 10, 2023 v8.0.0 Jul 25, 2023 Changes in this version + const DefaultPollInterval + const LocalOnly + const LocalOverRemote + const LogLevelDebug + const LogLevelError + const LogLevelFatal + const LogLevelInfo + const LogLevelPanic + const LogLevelTrace + const LogLevelWarn + const RemoteOverLocal + type BoolEvaluationDetails struct + Data EvaluationDetailsData + Value bool + type BoolFlag struct + func Bool(key string, defaultValue bool) BoolFlag + func (f BoolFlag) Get(snap *Snapshot) bool + func (f BoolFlag) GetValue(snap *Snapshot) interface{} + func (f BoolFlag) GetValueDetails(snap *Snapshot) EvaluationDetails + func (f BoolFlag) GetWithDetails(snap *Snapshot) BoolEvaluationDetails + func (f BoolFlag) Key() string + type Client struct + func NewClient(sdkKey string) *Client + func NewCustomClient(cfg Config) *Client + func (client *Client) Close() + func (client *Client) GetAllKeys() []string + func (client *Client) GetAllValueDetails(user User) []EvaluationDetails + func (client *Client) GetAllValues(user User) map[string]interface{} + func (client *Client) GetBoolValue(key string, defaultValue bool, user User) bool + func (client *Client) GetBoolValueDetails(key string, defaultValue bool, user User) BoolEvaluationDetails + func (client *Client) GetFloatValue(key string, defaultValue float64, user User) float64 + func (client *Client) GetFloatValueDetails(key string, defaultValue float64, user User) FloatEvaluationDetails + func (client *Client) GetIntValue(key string, defaultValue int, user User) int + func (client *Client) GetIntValueDetails(key string, defaultValue int, user User) IntEvaluationDetails + func (client *Client) GetKeyValueForVariationID(id string) (string, interface{}) + func (client *Client) GetStringValue(key string, defaultValue string, user User) string + func (client *Client) GetStringValueDetails(key string, defaultValue string, user User) StringEvaluationDetails + func (client *Client) IsOffline() bool + func (client *Client) Ready() <-chan struct{} + func (client *Client) Refresh(ctx context.Context) error + func (client *Client) RefreshIfOlder(ctx context.Context, age time.Duration) error + func (client *Client) SetOffline() + func (client *Client) SetOnline() + func (client *Client) Snapshot(user User) *Snapshot + type Config struct + BaseURL string + Cache ConfigCache + DataGovernance DataGovernance + DefaultUser User + FlagOverrides *FlagOverrides + HTTPTimeout time.Duration + Hooks *Hooks + Logger Logger + NoWaitForRefresh bool + Offline bool + PollInterval time.Duration + PollingMode PollingMode + SDKKey string + Transport http.RoundTripper + type ConfigCache interface + Get func(ctx context.Context, key string) ([]byte, error) + Set func(ctx context.Context, key string, value []byte) error + type DataGovernance int + const EUOnly + const Global + type ErrKeyNotFound struct + AvailableKeys []string + Key string + func (e ErrKeyNotFound) Error() string + type EvaluationDetails struct + Data EvaluationDetailsData + Value interface{} + type EvaluationDetailsData struct + Error error + FetchTime time.Time + IsDefaultValue bool + Key string + MatchedEvaluationPercentageRule *PercentageRule + MatchedEvaluationRule *RolloutRule + User User + VariationID string + type Flag interface + GetValue func(snap *Snapshot) interface{} + GetValueDetails func(snap *Snapshot) EvaluationDetails + Key func() string + type FlagOverrides struct + Behavior OverrideBehavior + FilePath string + Values map[string]interface{} + type FloatEvaluationDetails struct + Data EvaluationDetailsData + Value float64 + type FloatFlag struct + func Float(key string, defaultValue float64) FloatFlag + func (f FloatFlag) Get(snap *Snapshot) float64 + func (f FloatFlag) GetValue(snap *Snapshot) interface{} + func (f FloatFlag) GetValueDetails(snap *Snapshot) EvaluationDetails + func (f FloatFlag) GetWithDetails(snap *Snapshot) FloatEvaluationDetails + func (f FloatFlag) Key() string + type Hooks struct + OnConfigChanged func() + OnError func(err error) + OnFlagEvaluated func(details *EvaluationDetails) + type IntEvaluationDetails struct + Data EvaluationDetailsData + Value int + type IntFlag struct + func Int(key string, defaultValue int) IntFlag + func (f IntFlag) Get(snap *Snapshot) int + func (f IntFlag) GetValue(snap *Snapshot) interface{} + func (f IntFlag) GetValueDetails(snap *Snapshot) EvaluationDetails + func (f IntFlag) GetWithDetails(snap *Snapshot) IntEvaluationDetails + func (f IntFlag) Key() string + type LogLevel = logrus.Level + type Logger interface + Debugf func(format string, args ...interface{}) + Errorf func(format string, args ...interface{}) + GetLevel func() LogLevel + Infof func(format string, args ...interface{}) + Warnf func(format string, args ...interface{}) + func DefaultLogger(level LogLevel) Logger + type OverrideBehavior int + type PercentageRule struct + Percentage int64 + VariationID string + type PollingMode int + const AutoPoll + const Lazy + const Manual + type RolloutRule struct + Comparator int + ComparisonAttribute string + ComparisonValue string + type Snapshot struct + func NewSnapshot(logger Logger, values map[string]interface{}) (*Snapshot, error) + func (snap *Snapshot) FetchTime() time.Time + func (snap *Snapshot) GetAllKeys() []string + func (snap *Snapshot) GetAllValueDetails() []EvaluationDetails + func (snap *Snapshot) GetAllValues() map[string]interface{} + func (snap *Snapshot) GetKeyValueForVariationID(id string) (string, interface{}) + func (snap *Snapshot) GetValue(key string) interface{} + func (snap *Snapshot) GetValueDetails(key string) EvaluationDetails + func (snap *Snapshot) WithUser(user User) *Snapshot + type StringEvaluationDetails struct + Data EvaluationDetailsData + Value string + type StringFlag struct + func String(key string, defaultValue string) StringFlag + func (f StringFlag) Get(snap *Snapshot) string + func (f StringFlag) GetValue(snap *Snapshot) interface{} + func (f StringFlag) GetValueDetails(snap *Snapshot) EvaluationDetails + func (f StringFlag) GetWithDetails(snap *Snapshot) StringEvaluationDetails + func (f StringFlag) Key() string + type User interface + type UserAttributes interface + GetAttribute func(attr string) string + type UserData struct + Country string + Custom map[string]string + Email string + Identifier string Other modules containing this package github.com/configcat/go-sdk github.com/configcat/go-sdk/v4 github.com/configcat/go-sdk/v5 github.com/configcat/go-sdk/v6 github.com/configcat/go-sdk/v7 github.com/configcat/go-sdk/v9