Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiffCache ¶
type DiffCache struct { Deleted map[string]Flag `json:"deleted"` Added map[string]Flag `json:"added"` Updated map[string]DiffUpdated `json:"updated"` }
DiffCache contains the changes made in the cache, to be able to notify the user that something has changed (logs, webhook ...)
type DiffUpdated ¶
type Experimentation ¶ added in v0.13.0
type Experimentation struct { StartDate *time.Time `json:"startDate,omitempty" yaml:"startDate,omitempty" toml:"startDate,omitempty"` EndDate *time.Time `json:"endDate,omitempty" yaml:"endDate,omitempty" toml:"endDate,omitempty"` }
func (Experimentation) String ¶ added in v0.13.0
func (e Experimentation) String() string
type Flag ¶
type Flag struct { // Rule is the query use to select on which user the flag should apply. // Rule format is based on the nikunjy/rules module. // If no rule set, the flag apply to all users (percentage still apply). Rule string `json:"rule,omitempty" yaml:"rule,omitempty" toml:"rule,omitempty" slack_short:"false"` // Percentage of the users affect by the flag. // Default value is 0 Percentage float64 `json:"percentage,omitempty" yaml:"percentage,omitempty" toml:"percentage,omitempty"` // True is the value return by the flag if apply to the user (rule is evaluated to true) // and user is in the active percentage. True interface{} `json:"true,omitempty" yaml:"true,omitempty" toml:"true,omitempty"` // False is the value return by the flag if apply to the user (rule is evaluated to true) // and user is not in the active percentage. False interface{} `json:"false,omitempty" yaml:"false,omitempty" toml:"false,omitempty"` // Default is the value return by the flag if not apply to the user (rule is evaluated to false). Default interface{} `json:"default,omitempty" yaml:"default,omitempty" toml:"default,omitempty"` // TrackEvents is false if you don't want to export the data in your data exporter. // Default value is true TrackEvents *bool `json:"trackEvents,omitempty" yaml:"trackEvents,omitempty" toml:"trackEvents,omitempty"` // Disable is true if the flag is disabled. Disable bool `json:"disable,omitempty" yaml:"disable,omitempty" toml:"disable,omitempty"` // Experimentation is your object to configure an experimentation, it will allow you to configure a start date and // an end date for your flag. // When the experimentation is not running, the flag will serve the default value. Experimentation *Experimentation `json:"experimentation,omitempty" yaml:"experimentation,omitempty" toml:"experimentation,omitempty" slack_short:"false"` // nolint: lll }
Flag describe the fields of a flag.
type VariationType ¶ added in v0.10.0
type VariationType string
VariationType enum which describe the decision taken
const ( VariationTrue VariationType = "True" VariationFalse VariationType = "False" VariationDefault VariationType = "Default" VariationSDKDefault VariationType = "SdkDefault" )
Click to show internal directories.
Click to hide internal directories.