dao

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: 11 Imported by: 0

Documentation

Index

Constants

consts

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao struct userexp-service dao

func New

func New(c *conf.Config) (d *Dao)

New new a Dao and return.

func (*Dao) AddAnchorExpLog

func (d *Dao) AddAnchorExpLog(ctx context.Context, expInfo *model.ExpLog)

AddAnchorExpLog 加主播等级经验行为日志 is

func (*Dao) AddRexp

func (d *Dao) AddRexp(c context.Context, uid int64, rexp int64) (affect int64, err error)

AddRexp 添加主播经验

func (*Dao) AddUexp

func (d *Dao) AddUexp(c context.Context, uid int64, uexp int64) (affect int64, err error)

AddUexp 添加用户经验

func (*Dao) AddUserExpLog

func (d *Dao) AddUserExpLog(ctx context.Context, expInfo *model.ExpLog)

AddUserExpLog 加用户等级经验行为日志 is

func (*Dao) Close

func (d *Dao) Close()

Close close memcache resource.

func (*Dao) DelLevelCache

func (d *Dao) DelLevelCache(c context.Context, uid int64) (err error)

DelLevelCache 删除等级缓存

func (*Dao) Exp

func (d *Dao) Exp(c context.Context, uid int64) (exp *model.Exp, err error)

Exp 查询一条记录

func (*Dao) InitExp

func (d *Dao) InitExp(c context.Context, uid int64, uexp int64, rexp int64) (row int64, err error)

InitExp 初始化用户经验,用于首次查询

func (*Dao) LevelCache

func (d *Dao) LevelCache(c context.Context, uid int64) (level *model.Level, err error)

LevelCache 获取等级缓存

func (*Dao) MultiExp

func (d *Dao) MultiExp(c context.Context, uids []int64) (exps []*model.Exp, err error)

MultiExp 批量查询

func (*Dao) MultiLevelCache

func (d *Dao) MultiLevelCache(c context.Context, uids []int64) (level []*model.Level, missed []int64, err error)

MultiLevelCache 批量获取等级缓存

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping check service health.

func (*Dao) SetLevelCache

func (d *Dao) SetLevelCache(c context.Context, level *model.Level) (err error)

SetLevelCache 设置等级缓存

Jump to

Keyboard shortcuts

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