Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicConfig ¶
type DynamicConfig struct { Name string `json:"name"` Value map[string]interface{} `json:"value"` RuleID string `json:"rule_id"` }
A json blob configured in the Statsig Console
func NewConfig ¶
func NewConfig(name string, value map[string]interface{}, ruleID string) *DynamicConfig
func (*DynamicConfig) GetBool ¶
func (d *DynamicConfig) GetBool(key string, fallback bool) bool
Gets the boolean value at the given key in the DynamicConfig Returns the fallback boolean if the item at the given key is not found or not of type boolean
func (*DynamicConfig) GetNumber ¶
func (d *DynamicConfig) GetNumber(key string, fallback float64) float64
Gets the float64 value at the given key in the DynamicConfig Returns the fallback float64 if the item at the given key is not found or not of type float64
func (*DynamicConfig) GetSlice ¶
func (d *DynamicConfig) GetSlice(key string, fallback []interface{}) []interface{}
Gets the slice value at the given key in the DynamicConfig Returns the fallback slice if the item at the given key is not found or not of type slice
type StatsigEnvironment ¶
type StatsigEvent ¶
type StatsigEvent struct { EventName string `json:"eventName"` User StatsigUser `json:"user"` Value string `json:"value"` Metadata map[string]string `json:"metadata"` }
A log event sent to Statsig for analysis
type StatsigOptions ¶
type StatsigOptions struct { API string Environment StatsigEnvironment }
Advanced options for configuring the Statsig SDK
type StatsigUser ¶
type StatsigUser struct { UserID string `json:"userID"` Email string `json:"email"` IpAddress string `json:"ip"` UserAgent string `json:"userAgent"` Country string `json:"country"` Locale string `json:"locale"` AppVersion string `json:"appVersion"` Custom map[string]interface{} `json:"custom"` StatsigEnvironment map[string]string `json:"statsigEnvironment"` }
User specific attributes for evaluating Feature Gates, Experiments, and DyanmicConfigs NOTE: UserID is **required** - see https://docs.statsig.com/messages/serverRequiredUserID