Documentation ¶
Index ¶
- type Dao
- func (d *Dao) Ab(c context.Context, id int) (res *model.AB, err error)
- func (d *Dao) AbByIDAndGroup(c context.Context, id int, group int) (res *model.AB, err error)
- func (d *Dao) ActByGroup(c context.Context, group int) (res []*model.AB, err error)
- func (d *Dao) AddAb(c context.Context, name, desc string, stra string, seed, result, group int, ...) (newID int64, err error)
- func (d *Dao) AddGroup(c context.Context, g model.Group) (i int, err error)
- func (d *Dao) Close()
- func (d *Dao) CountAb(c context.Context, mstatus string) (count int, err error)
- func (d *Dao) CountAbByGroup(c context.Context, mstatus string, group int) (count int, err error)
- func (d *Dao) DelAb(c context.Context, id int) (rowsAffected int64, err error)
- func (d *Dao) DeleteGroup(c context.Context, id int) (i int, err error)
- func (d *Dao) GetFromRedis(c context.Context, key string) (value int, err error)
- func (d *Dao) Incr(c context.Context, key string)
- func (d *Dao) ListAb(c context.Context, offset, size int, mstatus string) (res []*model.AB, count int, err error)
- func (d *Dao) ListAbByGroup(c context.Context, offset, size int, mstatus string, group int) (res []*model.AB, count int, err error)
- func (d *Dao) ListGroup(c context.Context) (res []*model.Group, err error)
- func (d *Dao) Move(c context.Context, key string)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PingRedis(c context.Context) (err error)
- func (d *Dao) RedisVersionID(c context.Context, group int) (ver int64, err error)
- func (d *Dao) SetnxRedisVersionID(c context.Context, group int, v int64) (err error)
- func (d *Dao) UpAb(c context.Context, id int, name, desc string, stra string, result int, ...) (rowsAffected int64, err error)
- func (d *Dao) UpStatus(c context.Context, id, status int, username string, group int) (rowsAffected int64, err error)
- func (d *Dao) UpdateGroup(c context.Context, g model.Group) (i int, err error)
- func (d *Dao) UpdateRedisVersionID(c context.Context, group int, v int64) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao struct answer history of Dao
func (*Dao) AbByIDAndGroup ¶
AbByIDAndGroup 获取单个测试
func (*Dao) ActByGroup ¶
ActByGroup 根据group获取当前激活项目
func (*Dao) AddAb ¶
func (d *Dao) AddAb(c context.Context, name, desc string, stra string, seed, result, group int, username string) (newID int64, err error)
AddAb 添加AB实验
func (*Dao) CountAbByGroup ¶
CountAbByGroup 获取测试数量
func (*Dao) DeleteGroup ¶
DeleteGroup delete the group by id
func (*Dao) GetFromRedis ¶
GetFromRedis .
func (*Dao) ListAb ¶
func (d *Dao) ListAb(c context.Context, offset, size int, mstatus string) (res []*model.AB, count int, err error)
ListAb 分页获取所有测试列表
func (*Dao) ListAbByGroup ¶
func (d *Dao) ListAbByGroup(c context.Context, offset, size int, mstatus string, group int) (res []*model.AB, count int, err error)
ListAbByGroup 分页获取分组测试列表
func (*Dao) RedisVersionID ¶
RedisVersionID 获取redis中的分组版本
func (*Dao) SetnxRedisVersionID ¶
SetnxRedisVersionID 使用v设置redis中的版本号
func (*Dao) UpAb ¶
func (d *Dao) UpAb(c context.Context, id int, name, desc string, stra string, result int, username string, newVersion, status, group int) (rowsAffected int64, err error)
UpAb 更新AB实验
func (*Dao) UpStatus ¶
func (d *Dao) UpStatus(c context.Context, id, status int, username string, group int) (rowsAffected int64, err error)
UpStatus 更新AB实验状态
func (*Dao) UpdateGroup ¶
UpdateGroup update group by id
Click to show internal directories.
Click to hide internal directories.