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

Documentation

Index

Constants

View Source
const (
	AttrFollowing = uint32(1) << 1
	AttrFriend    = uint32(1) << 2
)

consts

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao struct info of Dao.

func New

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

New new a Dao and return.

func (*Dao) AddFollowingCache

func (d *Dao) AddFollowingCache(c context.Context, mid int64, following *model.Following) (err error)

AddFollowingCache add following cache.

func (*Dao) DelFollowerCache

func (d *Dao) DelFollowerCache(fid int64) (err error)

DelFollowerCache del follower cache

func (*Dao) DelFollowing

func (d *Dao) DelFollowing(c context.Context, mid int64, following *model.Following) (err error)

DelFollowing del following cache.

func (*Dao) DelFollowingCache

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

DelFollowingCache delete following cache.

func (*Dao) DelStatCache

func (d *Dao) DelStatCache(mid int64) (err error)

DelStatCache is

func (*Dao) DelTagCountCache

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

DelTagCountCache del tag count cache.

func (*Dao) DelTagsCache

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

DelTagsCache is

func (*Dao) FollowerAchieve

func (d *Dao) FollowerAchieve(c context.Context, mid, follower int64)

FollowerAchieve is

func (*Dao) Ping

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

Ping ping health of db.

func (*Dao) SendMsg

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

SendMsg send message.

func (*Dao) UpdateFollowingCache

func (d *Dao) UpdateFollowingCache(r *model.Relation) (err error)

UpdateFollowingCache update following cache.

func (*Dao) UserRelation

func (d *Dao) UserRelation(c context.Context, mid, fid int64) (f *sml.Following, err error)

UserRelation get user relation attr.

func (*Dao) UserSetAchieveFlag

func (d *Dao) UserSetAchieveFlag(ctx context.Context, mid int64, flag uint64) (int64, error)

UserSetAchieveFlag is

Jump to

Keyboard shortcuts

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