entities

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

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 Attribute

type Attribute struct {
	ID  string `json:"id"`
	Key string `json:"key"`
}

Attribute represents an Attribute object from the Optimizely datafile

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 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"`
	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"`
}

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"`
}

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 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

type VariationVariable struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

VariationVariable represents a Variable object from the Variation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL