model

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONType added in v1.1.0

type JSONType interface {
	float64 | int | string | bool | interface{} | map[string]interface{}
}

JSONType contains all acceptable flag value types

type RawVarResult added in v0.22.2

type RawVarResult struct {
	TrackEvents   bool                   `json:"trackEvents"`
	VariationType string                 `json:"variationType"`
	Failed        bool                   `json:"failed"`
	Version       string                 `json:"version"`
	Reason        flag.ResolutionReason  `json:"reason"`
	ErrorCode     flag.ErrorCode         `json:"errorCode"`
	Value         interface{}            `json:"value"`
	Cacheable     bool                   `json:"cacheable"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

RawVarResult is the result of the raw variation call. This is used by ffclient.RawVariation functions, this should be used only by internal calls.

type VariationResult added in v0.17.0

type VariationResult[T JSONType] struct {
	TrackEvents   bool                   `json:"trackEvents"`
	VariationType string                 `json:"variationType"`
	Failed        bool                   `json:"failed"`
	Version       string                 `json:"version"`
	Reason        flag.ResolutionReason  `json:"reason"`
	ErrorCode     flag.ErrorCode         `json:"errorCode"`
	Value         T                      `json:"value"`
	Cacheable     bool                   `json:"cacheable"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

VariationResult contains all the field available in a flag variation result.

Jump to

Keyboard shortcuts

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