Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(ctx map[string]interface{}) (Context, *GeneralError)
Types ¶
type ConvertErrorCode ¶
type ConvertErrorCode string
const ( GENERAL ConvertErrorCode = "GENERAL" INVALIDCONTEXT ConvertErrorCode = "INVALID_CONTEXT" PARSEERROR ConvertErrorCode = "PARSE_ERROR" TARGETINGKEYMISSING ConvertErrorCode = "TARGETING_KEY_MISSING" )
func (ConvertErrorCode) String ¶
func (c ConvertErrorCode) String() string
type Flag ¶
type Flag struct { Variations map[string]interface{} `yaml:"variations,omitempty"` Rules []*Rule `yaml:"targeting,omitempty"` DefaultRule *Rule `yaml:"defaultRule,omitempty"` Experimentation interface{} `yaml:"experimentation,omitempty"` Scheduled interface{} `yaml:"scheduledRollout,omitempty"` TrackEvents *bool `yaml:"trackEvents,omitempty"` Disable *bool `yaml:"disable,omitempty"` Version *string `yaml:"version,omitempty"` Metadata *map[string]interface{} `yaml:"metadata,omitempty"` }
func (*Flag) AppendOrUpdateRule ¶
type GeneralError ¶
type GeneralError struct { ErrorCode string `json:"errorCode"` ErrorDetails string `json:"errorDetails"` Key string `json:"key,omitempty"` }
func IsGeneralError ¶
func IsGeneralError(err error) *GeneralError
func NewGeneralError ¶
func NewGeneralError(errorCode interface{}, errorDetails string, keys ...string) *GeneralError
func (*GeneralError) Error ¶
func (e *GeneralError) Error() string
func (*GeneralError) ToJSON ¶
func (e *GeneralError) ToJSON() string
type ProgressiveRollout ¶
type ProgressiveRollout struct { Initial *ProgressiveRolloutStep `yaml:"initial,omitempty"` End *ProgressiveRolloutStep `yaml:"end,omitempty"` }
type ProgressiveRolloutStep ¶
type Rule ¶
type Rule struct { Name string `yaml:"name,omitempty"` Query string `yaml:"query,omitempty"` VariationResult string `yaml:"variation,omitempty"` Percentages map[string]float64 `yaml:"percentage,omitempty"` ProgressiveRollout *ProgressiveRollout `yaml:"progressiveRollout,omitempty"` Disable *bool `yaml:"disable,omitempty"` }
func (*Rule) AppendValidate ¶
type UpdateRetriever ¶
Click to show internal directories.
Click to hide internal directories.