model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AB

type AB struct {
	ID         int       `json:"id"`
	Name       string    `json:"name"`
	Desc       string    `json:"desc"`
	Stra       Stra      `json:"stra"`
	Seed       int       `json:"seed"`
	Result     int       `json:"result"`
	Status     int       `json:"status"`
	Version    int       `json:"version"`
	Group      int       `json:"group"`
	Author     string    `json:"author"`
	Modifier   string    `json:"modifier"`
	CreateTime time.Time `json:"ctime"`
	ModifyTime time.Time `json:"mtime"`
}

AB AB测试实验

type Empty

type Empty struct{}

Empty .

type Group

type Group struct {
	ID   int
	Name string
	Desc string
}

Group info of abtest

type Stat

type Stat struct {
	New map[int]map[int]int `json:"now"`
	Old map[int]map[int]int `json:"last"`
}

Stat .

type Stra

type Stra struct {
	//精度
	Precision int `json:"precision"`
	//依次比例
	Ratio []int `json:"ratio"`
}

Stra 实验策略

func (*Stra) Check

func (s *Stra) Check() (isValid bool)

Check ensure stra valid

func (*Stra) Version

func (s *Stra) Version(score int) (version int, err error)

Version calculate version by score

type Version

type Version struct {
	VersionID int64       `json:"v"`
	Data      map[int]int `json:"d"`
}

Version Cookie中保存的版本信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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