dto

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: Apache-2.0 Imports: 0 Imported by: 1 module, 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

Index

Constants

View Source
const (
	ACTIVE   = "ACTIVE"
	INACTIVE = "INACTIVE"

	INT32   = "INT32"
	INT     = "INT"
	FLOAT   = "FLOAT"
	FLOAT32 = "FLOAT32"
	INT64   = "INT64"
	BOOL    = "BOOL"
	FLOAT64 = "FLOAT64"
	STRING  = "STRING"
	JSON    = "JSON"
	MAP     = "MAP"
	DOUBLE  = "DOUBLE"
	VERSION = "VERSION"

	LT  = "LT"
	LTE = "LTE"
	EQ  = "EQ"
	GT  = "GT"
	GTE = "GTE"
	IOF = "IOF"

	HAS = "HAS"
	SW  = "SW"
	EW  = "EW"
)

Variables

View Source
var Status = []string{
	"ACTIVE",
	"INACTIVE",
}
View Source
var VariantType = []string{
	"INT",
	"BOOL",
	"DOUBLE",
	"STRING",
	"JSON",
}

Functions

This section is empty.

Types

type Data

type Data struct {
	Segments      map[string]SegmentDTO `json:"segments"`
	Flags         map[string]FlagDTO    `json:"flags"`
	LastUpdatedOn float64               `json:"lastUpdatedOn"`
}

func (*Data) MatchType

func (d *Data) MatchType()

type EnvData

type EnvData struct {
	PreRequisites       []string                  `json:"preRequisites"`
	OffVariant          string                    `json:"offVariant"`
	TargetUsers         map[string]string         `json:"targetUsers"`
	TargetSegments      map[string]map[string]int `json:"targetSegments"`
	TargetSegmentsOrder []string                  `json:"targetSegmentsOrder"`
	Traffic             map[string]int            `json:"traffic"`
	Status              string                    `json:"status"`
}

type FlagDTO

type FlagDTO struct {
	ID            string             `json:"id"`
	Seed          uint32             `json:"seed"`
	Variants      map[string]Variant `json:"variants"`
	VariantsOrder []string           `json:"variantsOrder"`
	Type          string             `json:"type"`
	EnvData       EnvData            `json:"envData"`
}

type RulesDTO

type RulesDTO struct {
	Key      string        `json:"key"`
	Match    bool          `json:"match"`
	Operator string        `json:"operator"`
	Type     string        `json:"type"`
	Values   []interface{} `json:"values"`
}

func (*RulesDTO) MatchType

func (rd *RulesDTO) MatchType()

type SegmentDTO

type SegmentDTO struct {
	ID    string        `json:"id"`
	Rules [][]*RulesDTO `json:"rules"`
}

func (*SegmentDTO) MatchType

func (sd *SegmentDTO) MatchType()

type UserVariantDTO

type UserVariantDTO struct {
	UserId              string
	Attributes          map[string]interface{}
	FlagId              string
	DefaultKey          string
	DefaultValue        interface{}
	Key                 string
	Value               interface{}
	ExpectedVariantType string
}

type Variant

type Variant struct {
	Value interface{} `json:"value"`
	Name  string      `json:"name"`
}

Jump to

Keyboard shortcuts

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