Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllFlags ¶
type AllFlags struct {
// contains filtered or unexported fields
}
AllFlags is a snapshot of the state of multiple feature flags with regard to a specific user. This is the return type of ffclient.AllFlagsState(). Serializing this object to JSON MarshalJSON() will produce a JSON you can sent to your front-end.
func NewAllFlags ¶
func NewAllFlags() AllFlags
NewAllFlags will create a new AllFlags for a specific user. It sets valid to true, because until we have an error everything is valid.
func (AllFlags) MarshalJSON ¶
MarshalJSON is serializing the object to JSON, it will produce a JSON you can sent to your front-end.
type FlagState ¶
type FlagState struct {
Value any `json:"value"`
Timestamp int64 `json:"timestamp"`
VariationType string `json:"variationType"`
TrackEvents bool `json:"trackEvents"`
Failed bool `json:"-"`
ErrorCode flag.ErrorCode `json:"errorCode"`
ErrorDetails string `json:"errorDetails,omitempty"`
Reason flag.ResolutionReason `json:"reason"`
Metadata map[string]any `json:"metadata,omitempty"`
}
FlagState represents the state of an individual feature flag, with regard to a specific user, when it was called.
Click to show internal directories.
Click to hide internal directories.