Documentation
¶
Overview ¶
Package entities has entity definitions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audience ¶
type Audience struct {
ID string `json:"id"`
Name string `json:"name"`
Conditions interface{} `json:"conditions"`
}
Audience represents an Audience object from the Optimizely datafile
type Cmab ¶ added in v2.2.1
type Cmab struct {
AttributeIds []string `json:"attributeIds"`
TrafficAllocation int `json:"trafficAllocation"`
}
Cmab represents the Contextual Multi-Armed Bandit configuration for an experiment. It contains a list of attribute IDs that are used for the CMAB algorithm and traffic allocation settings for the CMAB implementation.
type Datafile ¶
type Datafile struct {
Attributes []Attribute `json:"attributes"`
Audiences []Audience `json:"audiences"`
Experiments []Experiment `json:"experiments"`
Groups []Group `json:"groups"`
FeatureFlags []FeatureFlag `json:"featureFlags"`
Events []Event `json:"events"`
Rollouts []Rollout `json:"rollouts"`
Integrations []Integration `json:"integrations"`
TypedAudiences []Audience `json:"typedAudiences"`
Variables []string `json:"variables"`
AccountID string `json:"accountId"`
ProjectID string `json:"projectId"`
Revision string `json:"revision"`
Version string `json:"version"`
AnonymizeIP bool `json:"anonymizeIP"`
BotFiltering bool `json:"botFiltering"`
SendFlagDecisions bool `json:"sendFlagDecisions"`
SDKKey string `json:"sdkKey,omitempty"`
EnvironmentKey string `json:"environmentKey,omitempty"`
Region string `json:"region,omitempty"`
}
Datafile represents the datafile we get from Optimizely
type Event ¶
type Event struct {
ID string `json:"id"`
Key string `json:"key"`
ExperimentIds []string `json:"experimentIds"`
}
Event represents an event from the Optimizely datafile
type Experiment ¶
type Experiment struct {
ID string `json:"id"`
Key string `json:"key"`
LayerID string `json:"layerId"`
Status string `json:"status"`
Variations []Variation `json:"variations"`
TrafficAllocation []TrafficAllocation `json:"trafficAllocation"`
AudienceIds []string `json:"audienceIds"`
ForcedVariations map[string]string `json:"forcedVariations"`
AudienceConditions interface{} `json:"audienceConditions"`
Cmab *Cmab `json:"cmab,omitempty"` // is optional
}
Experiment represents an Experiment object from the Optimizely datafile
type FeatureFlag ¶
type FeatureFlag struct {
ID string `json:"id"`
RolloutID string `json:"rolloutId"`
Key string `json:"key"`
ExperimentIDs []string `json:"experimentIds"`
Variables []Variable `json:"variables"`
}
FeatureFlag represents a FeatureFlag object from the Optimizely datafile
type Group ¶
type Group struct {
ID string `json:"id"`
Policy string `json:"policy"`
TrafficAllocation []TrafficAllocation `json:"trafficAllocation"`
Experiments []Experiment `json:"experiments"`
}
Group represents an Group object from the Optimizely datafile
type Integration ¶
type Integration struct {
Key *string `json:"key"`
Host string `json:"host"`
PublicKey string `json:"publicKey"`
}
Integration represents a integration from the Optimizely datafile
type Rollout ¶
type Rollout struct {
ID string `json:"id"`
Experiments []Experiment `json:"experiments"`
}
Rollout represents a rollout from the Optimizely datafile
type TrafficAllocation ¶
type TrafficAllocation struct {
EntityID string `json:"entityId"`
EndOfRange int `json:"endOfRange"`
}
TrafficAllocation represents a traffic allocation range from the Optimizely datafile
type Variable ¶
type Variable struct {
DefaultValue string `json:"defaultValue"`
ID string `json:"id"`
Key string `json:"key"`
Type entities.VariableType `json:"type"`
SubType entities.VariableType `json:"subType"`
}
Variable represents a Variable object from the Optimizely datafile
type Variation ¶
type Variation struct {
ID string `json:"id"`
Variables []VariationVariable `json:"variables"`
Key string `json:"key"`
FeatureEnabled bool `json:"featureEnabled"`
}
Variation represents an experiment variation from the Optimizely datafile
type VariationVariable ¶
VariationVariable represents a Variable object from the Variation