modeldocs

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

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 `json:"valid" example:"false"`
}

AllFlags model info @Description AllFlags contains the full list of all the flags available for the user

type EvalFlagDoc

type EvalFlagDoc struct {
	// `true` if the event was tracked by the relay proxy.
	TrackEvents bool `json:"trackEvents" example:"true"`
	// The variation used to give you this value.
	VariationType string `json:"variationType" example:"variation-A"`
	// `true` if something went wrong in the relay proxy (flag does not exists, ...) and we serve the defaultValue.
	Failed bool `json:"failed" example:"false"`
	// The version of the flag used.
	Version string `json:"version" example:"1.0"`
	// reason why we have returned this value.
	Reason string `json:"reason" example:"TARGETING_MATCH"`
	// Code of the error returned by the server.
	ErrorCode string `json:"errorCode" example:""`
	// The flag value for this user.
	Value interface{} `json:"value"`
}

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 interface{} `json:"value"`

	// Timestamp is the time when the flag was evaluated.
	Timestamp int64 `json:"timestamp" example:"1652113076"`

	// VariationType is the name of the variation used to have the flag value.
	VariationType string `json:"variationType" example:"variation-A"`

	// TrackEvents this flag is trackable.
	TrackEvents bool `json:"trackEvents" example:"false"`
	Failed      bool `json:"-"`
}

FlagState represents the state of an individual feature flag, with regard to a specific user, when it was called.

type HTTPErrorDoc

type HTTPErrorDoc struct {
	// Message of your error
	Message string `json:"message" example:"An error occurred"`
}

Jump to

Keyboard shortcuts

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