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

Documentation

Index

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 dao.

func New

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

New new a dao.

func (*Dao) AddCacheCard

func (d *Dao) AddCacheCard(c context.Context, mid int64, v *v1.Card) (err error)

AddCacheCard set account card into cache.

func (*Dao) AddCacheCards

func (d *Dao) AddCacheCards(c context.Context, cm map[int64]*v1.Card) (err error)

AddCacheCards set account cards cache.

func (*Dao) AddCacheInfo

func (d *Dao) AddCacheInfo(c context.Context, mid int64, v *v1.Info) (err error)

AddCacheInfo set account info into cache.

func (*Dao) AddCacheInfos

func (d *Dao) AddCacheInfos(c context.Context, im map[int64]*v1.Info) (err error)

AddCacheInfos set account infos cache.

func (*Dao) AddCacheProfile

func (d *Dao) AddCacheProfile(c context.Context, mid int64, v *v1.Profile) (err error)

AddCacheProfile set profile cache.

func (*Dao) AddCacheVip

func (d *Dao) AddCacheVip(c context.Context, mid int64, v *v1.VipInfo) (err error)

AddCacheVip set vip cache.

func (*Dao) AddCacheVips

func (d *Dao) AddCacheVips(c context.Context, vm map[int64]*v1.VipInfo) (err error)

AddCacheVips set account vips cache.

func (*Dao) AddMoral

func (d *Dao) AddMoral(c context.Context, arg *mmodel.ArgUpdateMoral) (err error)

AddMoral add moral.

func (*Dao) CacheCard

func (d *Dao) CacheCard(c context.Context, mid int64) (v *v1.Card, err error)

CacheCard get account card from cache.

func (*Dao) CacheCards

func (d *Dao) CacheCards(c context.Context, mids []int64) (res map[int64]*v1.Card, err error)

CacheCards multi get account cards from cache.

func (*Dao) CacheInfo

func (d *Dao) CacheInfo(c context.Context, mid int64) (v *v1.Info, err error)

CacheInfo get account info from cache.

func (*Dao) CacheInfos

func (d *Dao) CacheInfos(c context.Context, mids []int64) (res map[int64]*v1.Info, err error)

CacheInfos multi get account info from cache.

func (*Dao) CacheProfile

func (d *Dao) CacheProfile(c context.Context, mid int64) (v *v1.Profile, err error)

CacheProfile get profile cache.

func (*Dao) CacheVip

func (d *Dao) CacheVip(c context.Context, mid int64) (v *v1.VipInfo, err error)

CacheVip get vip cache.

func (*Dao) CacheVips

func (d *Dao) CacheVips(c context.Context, mids []int64) (res map[int64]*v1.VipInfo, err error)

CacheVips multi get account cards from cache.

func (*Dao) Card

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

Card cache: -batch=50 -max_group=10 -batch_err=continue

func (*Dao) Cards

func (d *Dao) Cards(c context.Context, keys []int64) (res map[int64]*v1.Card, err error)

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

func (*Dao) Close

func (d *Dao) Close()

Close close memcache resource.

func (*Dao) DelCache

func (d *Dao) DelCache(c context.Context, mid int64) []error

DelCache delete cache.

func (*Dao) Info

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

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

func (*Dao) Infos

func (d *Dao) Infos(c context.Context, keys []int64) (res map[int64]*v1.Info, err error)

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

func (*Dao) LevelExp

func (d *Dao) LevelExp(c context.Context, mid int64) (lexp *mmodel.LevelInfo, err error)

LevelExp get member level exp.

func (*Dao) MidsByName

func (d *Dao) MidsByName(ctx context.Context, names []string) ([]int64, error)

MidsByName is.

func (*Dao) PassportDetail

func (d *Dao) PassportDetail(c context.Context, mid int64) (res *model.PassportDetail, err error)

PassportDetail get detail.

func (*Dao) PassportProfile

func (d *Dao) PassportProfile(c context.Context, mid int64, ip string) (res *model.PassportProfile, err error)

PassportProfile is.

func (*Dao) Ping

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

Ping check connection success.

func (*Dao) Profile

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

Profile cache: -batch=50 -max_group=10 -batch_err=continue

func (*Dao) RawCard

func (d *Dao) RawCard(c context.Context, mid int64) (res *v1.Card, err error)

RawCard get card by mid.

func (*Dao) RawCards

func (d *Dao) RawCards(c context.Context, mids []int64) (res map[int64]*v1.Card, err error)

RawCards get card by mid.

func (*Dao) RawInfo

func (d *Dao) RawInfo(c context.Context, mid int64) (res *v1.Info, err error)

RawInfo raw info.

func (*Dao) RawInfos

func (d *Dao) RawInfos(c context.Context, mids []int64) (res map[int64]*v1.Info, err error)

RawInfos raw infos.

func (*Dao) RawProfile

func (d *Dao) RawProfile(c context.Context, mid int64) (res *v1.Profile, err error)

RawProfile get profile by mid.

func (*Dao) RawVip

func (d *Dao) RawVip(c context.Context, mid int64) (vip *v1.VipInfo, err error)

RawVip get mid's vip info from account center by vip API.

func (*Dao) RawVips

func (d *Dao) RawVips(c context.Context, mids []int64) (res map[int64]*v1.VipInfo, err error)

RawVips get multi mid's vip info from account center by vip API.

func (*Dao) RealnameDetail

func (d *Dao) RealnameDetail(c context.Context, mid int64) (detail *member.RealnameDetail, err error)

RealnameDetail is.

func (*Dao) UpdateExp

func (d *Dao) UpdateExp(c context.Context, arg *mmodel.ArgAddExp) error

UpdateExp update exp.

func (*Dao) Vip

func (d *Dao) Vip(c context.Context, id int64) (res *v1.VipInfo, err error)

Vip cache: -batch=50 -max_group=10 -batch_err=continue

func (*Dao) Vips

func (d *Dao) Vips(c context.Context, keys []int64) (res map[int64]*v1.VipInfo, err error)

Vips 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