modeldocs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

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