Documentation ¶
Index ¶
Constants ¶
View Source
const ( FlagNotFoundErrorCode = "FLAG_NOT_FOUND" ParseErrorCode = "PARSE_ERROR" TypeMismatchErrorCode = "TYPE_MISMATCH" GeneralErrorCode = "GENERAL" FlagDisabledErrorCode = "FLAG_DISABLED" InvalidContextCode = "INVALID_CONTEXT" )
View Source
const ( TargetingMatchReason = "TARGETING_MATCH" SplitReason = "SPLIT" DisabledReason = "DISABLED" DefaultReason = "DEFAULT" UnknownReason = "UNKNOWN" ErrorReason = "ERROR" StaticReason = "STATIC" )
Variables ¶
View Source
var ReadableErrorMessage = map[string]string{ FlagNotFoundErrorCode: "Flag not found", ParseErrorCode: "Error parsing input or configuration", TypeMismatchErrorCode: "Type mismatch error", GeneralErrorCode: "General error", FlagDisabledErrorCode: "Flag is disabled", InvalidContextCode: "Invalid context provided", }
Functions ¶
func GetErrorMessage ¶ added in v0.10.0
Types ¶
type EvaluationReason ¶
type EvaluationReason string
type Evaluators ¶
type Evaluators struct {
Evaluators map[string]json.RawMessage `json:"$evaluators"`
}
type Flag ¶
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"` Selector string `json:"selector"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type StateChangeNotification ¶
type StateChangeNotification struct { Type StateChangeNotificationType `json:"type"` Source string `json:"source"` FlagKey string `json:"flagKey"` }
type StateChangeNotificationType ¶
type StateChangeNotificationType string
const ( NotificationDelete StateChangeNotificationType = "delete" NotificationCreate StateChangeNotificationType = "write" NotificationUpdate StateChangeNotificationType = "update" )
Click to show internal directories.
Click to hide internal directories.