Versions in this module Expand all Collapse all v5 v5.1.0 Apr 29, 2026 Changes in this version type Client + func (c *Client) ExtractNextPage(linkHeader string) string v5.0.0 Dec 2, 2025 Changes in this version + const AnalyticsEndpoint + const AnalyticsTimerInMilli + const BulkIdentifyMaxCount + const DefaultBaseURL + const DefaultRealtimeBaseUrl + const DefaultTimeout + const EnvironmentKeyHeader + const OptionWithHTTPClient + const OptionWithRestyClient + func WithEvaluationContext(ctx context.Context, ec EvaluationContext) context.Context + type AnalyticsProcessor struct + func NewAnalyticsProcessor(ctx context.Context, client *resty.Client, baseURL string, timerInMilli *int, ...) *AnalyticsProcessor + func (a *AnalyticsProcessor) Flush(ctx context.Context) error + func (a *AnalyticsProcessor) TrackFeature(featureName string) + type Client struct + func NewClient(apiKey string, options ...Option) *Client + func (c *Client) BulkIdentify(ctx context.Context, batch []*IdentityTraits) error + func (c *Client) GetEnvironmentFlags(ctx context.Context) (f Flags, err error) + func (c *Client) GetEnvironmentFlagsFromAPI(ctx context.Context) (Flags, error) + func (c *Client) GetFlags(ctx context.Context, ec *EvaluationContext) (f Flags, err error) + func (c *Client) GetIdentityFlags(ctx context.Context, identifier string, traits []*Trait) (f Flags, err error) + func (c *Client) GetIdentityFlagsFromAPI(ctx context.Context, identifier string, traits []*Trait) (Flags, error) + func (c *Client) GetIdentitySegments(identifier string, traits []*Trait) ([]*segments.SegmentModel, error) + func (c *Client) UpdateEnvironment(ctx context.Context) error + type EnvironmentEvaluationContext struct + APIKey string + type EvaluationContext struct + Environment *EnvironmentEvaluationContext + Feature *FeatureEvaluationContext + Identity *IdentityEvaluationContext + func GetEvaluationContextFromCtx(ctx context.Context) (ec EvaluationContext, ok bool) + func NewEvaluationContext(identifier string, traits map[string]interface{}) EvaluationContext + func NewTransientEvaluationContext(identifier string, traits map[string]interface{}) EvaluationContext + type FeatureEvaluationContext struct + Name string + type Flag struct + Enabled bool + FeatureID int + FeatureName string + IsDefault bool + Value interface{} + type Flags struct + func (f *Flags) AllFlags() []Flag + func (f *Flags) GetFeatureValue(featureName string) (interface{}, error) + func (f *Flags) GetFlag(featureName string) (Flag, error) + func (f *Flags) IsFeatureEnabled(featureName string) (bool, error) + type FlagsmithAPIError struct + Err error + Msg string + ResponseStatus string + ResponseStatusCode int + func (e FlagsmithAPIError) Error() string + type FlagsmithClientError struct + func (e FlagsmithClientError) Error() string + type IdentityEvaluationContext struct + Identifier *string + Traits map[string]*TraitEvaluationContext + Transient *bool + type IdentityTraits struct + Identifier string + Traits []*trait.Trait + Transient bool + type LocalFileHandler struct + func NewLocalFileHandler(environmentDocumentPath string) (*LocalFileHandler, error) + func (handler *LocalFileHandler) GetEnvironment() *environments.EnvironmentModel + type Logger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + type OfflineHandler interface + GetEnvironment func() *environments.EnvironmentModel + type Option func(c *Client) + func WithAnalytics(ctx context.Context) Option + func WithBaseURL(url string) Option + func WithCustomHeaders(headers map[string]string) Option + func WithDefaultHandler(handler func(string) (Flag, error)) Option + func WithEnvironmentRefreshInterval(interval time.Duration) Option + func WithErrorHandler(handler func(handler *FlagsmithAPIError)) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithLocalEvaluation(ctx context.Context) Option + func WithLogger(logger Logger) Option + func WithOfflineHandler(handler OfflineHandler) Option + func WithOfflineMode() Option + func WithPolling() Option + func WithProxy(proxyURL string) Option + func WithRealtime() Option + func WithRealtimeBaseURL(url string) Option + func WithRemoteEvaluation() Option + func WithRequestTimeout(timeout time.Duration) Option + func WithRestyClient(restyClient *resty.Client) Option + func WithRetries(count int, waitTime time.Duration) Option + func WithSlogLogger(logger *slog.Logger) Option + type Trait = trait.Trait + type TraitEvaluationContext struct + Transient *bool + Value interface{} + func NewTraitEvaluationContext(value interface{}, transient bool) TraitEvaluationContext Other modules containing this package github.com/Flagsmith/flagsmith-go-client github.com/Flagsmith/flagsmith-go-client/v2 github.com/Flagsmith/flagsmith-go-client/v3 github.com/Flagsmith/flagsmith-go-client/v4