bws

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromError

func PromError(name string, format string, args ...interface{})

PromError stat and log.

Types

type Dao

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

Dao dao.

func New

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

New dao new.

func (*Dao) AchieveCounts

func (d *Dao) AchieveCounts(c context.Context, id int64, day string) (res []*bwsmdl.CountAchieves, err error)

AchieveCounts get data from cache if miss will call source method, then add to cache.

func (*Dao) Achievements

func (d *Dao) Achievements(c context.Context, id int64) (res *bwsmdl.Achievements, err error)

Achievements get data from cache if miss will call source method, then add to cache.

func (*Dao) AddCacheAchieveCounts

func (d *Dao) AddCacheAchieveCounts(c context.Context, bid int64, res []*bwsmdl.CountAchieves, day string) (err error)

AddCacheAchieveCounts set achieve counts to cache

func (*Dao) AddCacheAchievements

func (d *Dao) AddCacheAchievements(c context.Context, id int64, val *bwsmdl.Achievements) (err error)

AddCacheAchievements Set data to mc

func (*Dao) AddCachePoints

func (d *Dao) AddCachePoints(c context.Context, id int64, val *bwsmdl.Points) (err error)

AddCachePoints Set data to mc

func (*Dao) AddCacheUserAchieves

func (d *Dao) AddCacheUserAchieves(c context.Context, bid int64, data []*bwsmdl.UserAchieve, key string) (err error)

AddCacheUserAchieves .

func (*Dao) AddCacheUserPoints

func (d *Dao) AddCacheUserPoints(c context.Context, bid int64, data []*bwsmdl.UserPoint, key string) (err error)

AddCacheUserPoints .

func (*Dao) AddCacheUsersKey

func (d *Dao) AddCacheUsersKey(c context.Context, id string, val *bwsmdl.Users) (err error)

AddCacheUsersKey Set data to mc

func (*Dao) AddCacheUsersMid

func (d *Dao) AddCacheUsersMid(c context.Context, id int64, val *bwsmdl.Users) (err error)

AddCacheUsersMid Set data to mc

func (*Dao) AddLotteryMidCache

func (d *Dao) AddLotteryMidCache(c context.Context, aid, mid int64) (err error)

AddLotteryMidCache add lottery mid cache.

func (*Dao) AddUserAchieve

func (d *Dao) AddUserAchieve(c context.Context, bid, aid, award int64, key string) (lastID int64, err error)

AddUserAchieve .

func (*Dao) AddUserPoint

func (d *Dao) AddUserPoint(c context.Context, bid, pid, points int64, key string) (lastID int64, err error)

AddUserPoint .

func (*Dao) AppendUserAchievesCache

func (d *Dao) AppendUserAchievesCache(c context.Context, bid int64, key string, achieve *bwsmdl.UserAchieve) (err error)

AppendUserAchievesCache .

func (*Dao) AppendUserPointsCache

func (d *Dao) AppendUserPointsCache(c context.Context, bid int64, key string, point *bwsmdl.UserPoint) (err error)

AppendUserPointsCache .

func (*Dao) Award

func (d *Dao) Award(c context.Context, key string, aid int64) (err error)

Award achievement award

func (*Dao) Binding

func (d *Dao) Binding(c context.Context, loginMid int64, p *bwsmdl.ParamBinding) (err error)

Binding binding mid

func (*Dao) CacheAchieveCounts

func (d *Dao) CacheAchieveCounts(c context.Context, bid int64, day string) (res []*bwsmdl.CountAchieves, err error)

CacheAchieveCounts get achieve counts from cache

func (*Dao) CacheAchievements

func (d *Dao) CacheAchievements(c context.Context, id int64) (res *bwsmdl.Achievements, err error)

CacheAchievements get data from mc

func (*Dao) CacheLotteryMid

func (d *Dao) CacheLotteryMid(c context.Context, aid int64, day string) (mid int64, err error)

CacheLotteryMid .

func (*Dao) CacheLotteryMids

func (d *Dao) CacheLotteryMids(c context.Context, aid int64, day string) (mids []int64, err error)

CacheLotteryMids .

func (*Dao) CachePoints

func (d *Dao) CachePoints(c context.Context, id int64) (res *bwsmdl.Points, err error)

CachePoints get data from mc

func (*Dao) CacheUserAchieves

func (d *Dao) CacheUserAchieves(c context.Context, bid int64, key string) (res []*bwsmdl.UserAchieve, err error)

CacheUserAchieves .

func (*Dao) CacheUserPoints

func (d *Dao) CacheUserPoints(c context.Context, bid int64, key string) (res []*bwsmdl.UserPoint, err error)

CacheUserPoints .

func (*Dao) CacheUsersKey

func (d *Dao) CacheUsersKey(c context.Context, id string) (res *bwsmdl.Users, err error)

CacheUsersKey get data from mc

func (*Dao) CacheUsersMid

func (d *Dao) CacheUsersMid(c context.Context, id int64) (res *bwsmdl.Users, err error)

CacheUsersMid get data from mc

func (*Dao) DelCacheAchieveCounts

func (d *Dao) DelCacheAchieveCounts(c context.Context, bid int64, day string) (err error)

DelCacheAchieveCounts delete achieve cnt cache.

func (*Dao) DelCacheAchievements

func (d *Dao) DelCacheAchievements(c context.Context, id int64) (err error)

DelCacheAchievements delete data from mc

func (*Dao) DelCachePoints

func (d *Dao) DelCachePoints(c context.Context, id int64) (err error)

DelCachePoints delete data from mc

func (*Dao) DelCacheUserAchieves

func (d *Dao) DelCacheUserAchieves(c context.Context, bid int64, key string) (err error)

DelCacheUserAchieves .

func (*Dao) DelCacheUserPoints

func (d *Dao) DelCacheUserPoints(c context.Context, bid int64, key string) (err error)

DelCacheUserPoints .

func (*Dao) DelCacheUsersKey

func (d *Dao) DelCacheUsersKey(c context.Context, id string) (err error)

DelCacheUsersKey delete data from mc

func (*Dao) DelCacheUsersMid

func (d *Dao) DelCacheUsersMid(c context.Context, id int64) (err error)

DelCacheUsersMid delete data from mc

func (*Dao) IncrCacheAchieveCounts

func (d *Dao) IncrCacheAchieveCounts(c context.Context, bid, aid int64, day string) (err error)

IncrCacheAchieveCounts incr achieve counts to cache

func (*Dao) Points

func (d *Dao) Points(c context.Context, id int64) (res *bwsmdl.Points, err error)

Points get data from cache if miss will call source method, then add to cache.

func (*Dao) RawAchieveCounts

func (d *Dao) RawAchieveCounts(c context.Context, bid int64, day string) (res []*bwsmdl.CountAchieves, err error)

RawAchieveCounts achievements user count

func (*Dao) RawAchievements

func (d *Dao) RawAchievements(c context.Context, bid int64) (res *bwsmdl.Achievements, err error)

RawAchievements achievements list

func (*Dao) RawPoints

func (d *Dao) RawPoints(c context.Context, bid int64) (res *bwsmdl.Points, err error)

RawPoints points list

func (*Dao) RawUserAchieves

func (d *Dao) RawUserAchieves(c context.Context, bid int64, key string) (rs []*bwsmdl.UserAchieve, err error)

RawUserAchieves get user achievements from db.

func (*Dao) RawUserPoints

func (d *Dao) RawUserPoints(c context.Context, bid int64, key string) (rs []*bwsmdl.UserPoint, err error)

RawUserPoints .

func (*Dao) RawUsersKey

func (d *Dao) RawUsersKey(c context.Context, key string) (res *bwsmdl.Users, err error)

RawUsersKey get users by key

func (*Dao) RawUsersMid

func (d *Dao) RawUsersMid(c context.Context, mid int64) (res *bwsmdl.Users, err error)

RawUsersMid get users by mid

func (*Dao) UserAchieves

func (d *Dao) UserAchieves(c context.Context, id int64, key string) (res []*bwsmdl.UserAchieve, err error)

UserAchieves get data from cache if miss will call source method, then add to cache.

func (*Dao) UserByID

func (d *Dao) UserByID(c context.Context, keyID int64) (res *bwsmdl.Users, err error)

UserByID .

func (*Dao) UserPoints

func (d *Dao) UserPoints(c context.Context, id int64, key string) (res []*bwsmdl.UserPoint, err error)

UserPoints get data from cache if miss will call source method, then add to cache.

func (*Dao) UsersKey

func (d *Dao) UsersKey(c context.Context, id string) (res *bwsmdl.Users, err error)

UsersKey get data from cache if miss will call source method, then add to cache.

func (*Dao) UsersMid

func (d *Dao) UsersMid(c context.Context, id int64) (res *bwsmdl.Users, err error)

UsersMid get data from cache if miss will call source method, then add to cache.

Jump to

Keyboard shortcuts

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