medal

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopupKey

func PopupKey(mid int64) string

PopupKey new medal popup key.

func RedPointKey

func RedPointKey(mid int64) string

RedPointKey new medal RedPoint key.

Types

type Dao

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

Dao struct info of Dao.

func New

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

New new a Dao and return.

func (*Dao) ActivatedOwnerByMid

func (d *Dao) ActivatedOwnerByMid(c context.Context, mid int64) (nid int64, err error)

ActivatedOwnerByMid retun nid of medal_owner by mid where is_activated=1.

func (*Dao) AddMedalOwner

func (d *Dao) AddMedalOwner(c context.Context, mid, nid int64) (err error)

AddMedalOwner insert into medal_owner.

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) CountOwnerBYNidMid

func (d *Dao) CountOwnerBYNidMid(c context.Context, mid, nid int64) (count int64, err error)

CountOwnerBYNidMid retun number of medal_owner by mid and nid.

func (*Dao) DelMedalActivatedCache

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

DelMedalActivatedCache delete activated medal cache.

func (*Dao) DelMedalOwnersCache

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

DelMedalOwnersCache delete medal_owner cache.

func (*Dao) DelPopupCache

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

DelPopupCache delete new medal info popup cache.

func (*Dao) DelRedPointCache

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

DelRedPointCache delete new medal info red point cache.

func (*Dao) GetWearedfansMedal

func (d *Dao) GetWearedfansMedal(c context.Context, mid int64, source int8) (isLove bool, err error)

GetWearedfansMedal get weared fans medals from live.

func (*Dao) InstallMedalOwner

func (d *Dao) InstallMedalOwner(c context.Context, mid, nid int64) (err error)

InstallMedalOwner update medal_owner set is_activated=1.

func (*Dao) MedalActivatedCache

func (d *Dao) MedalActivatedCache(c context.Context, mid int64) (int64, bool, error)

MedalActivatedCache get medal cache.

func (*Dao) MedalGroupAll

func (d *Dao) MedalGroupAll(c context.Context) (res []*model.MedalGroup, err error)

MedalGroupAll retun all medal_group where is_online=1.

func (*Dao) MedalInfoAll

func (d *Dao) MedalInfoAll(c context.Context) (res map[int64]*model.MedalInfo, err error)

MedalInfoAll retun all medal_info where is_online=1.

func (*Dao) MedalInfoByNid

func (d *Dao) MedalInfoByNid(c context.Context, nid int64) (res *model.MedalInfo, err error)

MedalInfoByNid return medal_info by nid.

func (*Dao) MedalOwnerByMid

func (d *Dao) MedalOwnerByMid(c context.Context, mid int64) (res []*model.MedalOwner, err error)

MedalOwnerByMid return medal_owner by mid.

func (*Dao) MedalOwnersCache

func (d *Dao) MedalOwnersCache(c context.Context, mid int64) (res []*model.MedalOwner, notFound bool, err error)

MedalOwnersCache get medal_owner cache.

func (*Dao) MedalsActivatedCache

func (d *Dao) MedalsActivatedCache(c context.Context, mids []int64) (map[int64]int64, []int64, error)

MedalsActivatedCache get multi medals cache.

func (*Dao) OwnerBYNidMid

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

OwnerBYNidMid retun medal_owner by mid and nid.

func (*Dao) Ping

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

Ping ping health.

func (*Dao) PopupCache

func (d *Dao) PopupCache(c context.Context, mid int64) (nid int64, err error)

PopupCache get new medal info popup cache.

func (*Dao) RedPointCache

func (d *Dao) RedPointCache(c context.Context, mid int64) (nid int64, err error)

RedPointCache get new medal info red point cache.

func (*Dao) SendMsg

func (d *Dao) SendMsg(c context.Context, mid int64, title string, context string) (err error)

SendMsg send message.

func (*Dao) SetMedalActivatedCache

func (d *Dao) SetMedalActivatedCache(c context.Context, mid, nid int64) (err error)

SetMedalActivatedCache set activated medal cache.

func (*Dao) SetMedalOwnersache

func (d *Dao) SetMedalOwnersache(c context.Context, mid int64, nos []*model.MedalOwner) (err error)

SetMedalOwnersache set medal_owner cache.

func (*Dao) SetPopupCache

func (d *Dao) SetPopupCache(c context.Context, mid, nid int64) (err error)

SetPopupCache set popup cache.

func (*Dao) SetRedPointCache

func (d *Dao) SetRedPointCache(c context.Context, mid, nid int64) (err error)

SetRedPointCache set red point cache.

func (*Dao) UninstallAllMedalOwner

func (d *Dao) UninstallAllMedalOwner(c context.Context, mid, nid int64) (err error)

UninstallAllMedalOwner uninst all medal_owner set is_activated=0.

func (*Dao) UninstallMedalOwner

func (d *Dao) UninstallMedalOwner(c context.Context, mid, nid int64) (err error)

UninstallMedalOwner update medal_owner set is_activated=0.

Jump to

Keyboard shortcuts

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