model

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FlagNotFoundErrorCode = "FLAG_NOT_FOUND"
	ParseErrorCode        = "PARSE_ERROR"
	TypeMismatchErrorCode = "TYPE_MISMATCH"
	GeneralErrorCode      = "GENERAL"
	FlagDisabledErrorCode = "FLAG_DISABLED"
)
View Source
const (
	TargetingMatchReason = "TARGETING_MATCH"
	SplitReason          = "SPLIT"
	DisabledReason       = "DISABLED"
	DefaultReason        = "DEFAULT"
	UnknownReason        = "UNKNOWN"
	ErrorReason          = "ERROR"
	StaticReason         = "STATIC"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluationReason added in v0.2.0

type EvaluationReason string

type Evaluators added in v0.3.7

type Evaluators struct {
	Evaluators map[string]json.RawMessage `json:"$evaluators"`
}

type Flag added in v0.3.7

type Flag struct {
	State          string          `json:"state"`
	DefaultVariant string          `json:"defaultVariant"`
	Variants       map[string]any  `json:"variants"`
	Targeting      json.RawMessage `json:"targeting,omitempty"`
	Source         string          `json:"source"`
}

type StateChangeNotification added in v0.3.7

type StateChangeNotification struct {
	Type    StateChangeNotificationType `json:"type"`
	Source  string                      `json:"source"`
	FlagKey string                      `json:"flagKey"`
}

type StateChangeNotificationType added in v0.3.7

type StateChangeNotificationType string
const (
	NotificationDelete StateChangeNotificationType = "delete"
	NotificationCreate StateChangeNotificationType = "write"
	NotificationUpdate StateChangeNotificationType = "update"
)

Jump to

Keyboard shortcuts

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