Documentation
¶
Overview ¶
Package modeldocs holds the documentation stubs of the relay proxy OpenAPI document.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllFlags ¶
type AllFlags struct {
// flags is the list of flag for the user.
Flags map[string]FlagState `json:"flags"`
// `true` if something went wrong in the relay proxy (flag does not exists, ...) and we serve the defaultValue.
Valid bool `example:"false" json:"valid"`
}
AllFlags model info @Description AllFlags contains the full list of all the flags available for the user
type EvalFlagDoc ¶
type EvalFlagDoc struct {
// The flag value for this user.
Value any `json:"value"`
// Metadata is a field containing information about your flag such as an issue tracker link, a description, etc ...
Metadata *map[string]any `json:"metadata" toml:"metadata,omitempty" yaml:"metadata,omitempty"`
// The variation used to give you this value.
VariationType string `example:"variation-A" json:"variationType"`
// The version of the flag used.
Version string `example:"1.0" json:"version"`
// reason why we have returned this value.
Reason string `example:"TARGETING_MATCH" json:"reason"`
// Code of the error returned by the server.
ErrorCode string `example:"" json:"errorCode"`
// `true` if the event was tracked by the relay proxy.
TrackEvents bool `example:"true" json:"trackEvents"`
// `true` if something went wrong in the relay proxy (flag does not exists, ...) and we serve the defaultValue.
Failed bool `example:"false" json:"failed"`
}
EvalFlagDoc is the documentation struct for the Swagger doc.
type FlagState ¶
type FlagState struct {
// Value is the flag value, it can be any JSON types.
Value any `json:"value"`
// VariationType is the name of the variation used to have the flag value.
VariationType string `example:"variation-A" json:"variationType"`
// Timestamp is the time when the flag was evaluated.
Timestamp int64 `example:"1652113076" json:"timestamp"`
// TrackEvents this flag is trackable.
TrackEvents bool `example:"false" json:"trackEvents"`
Failed bool `json:"-"`
}
FlagState represents the state of an individual feature flag, with regard to a specific user, when it was called.