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: 13 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 .

func New

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

New .

func (*Dao) AddHashStatsCache

func (d *Dao) AddHashStatsCache(c context.Context, businessID, originID int64, stats ...*model.Stats) (err error)

AddHashStatsCache .

func (*Dao) AddItemLikesCache

func (d *Dao) AddItemLikesCache(c context.Context, businessID, messageID int64, typ int8, limit int, items []*model.UserLikeRecord) (err error)

AddItemLikesCache .

func (*Dao) AddStatsCache

func (d *Dao) AddStatsCache(c context.Context, businessID int64, ms ...*model.Stats) (err error)

AddStatsCache .

func (*Dao) AddUserLikesCache

func (d *Dao) AddUserLikesCache(c context.Context, mid, businessID int64, items []*model.ItemLikeRecord, typ int8, limit int) (err error)

AddUserLikesCache .

func (*Dao) AppendCacheItemLikeList

func (d *Dao) AppendCacheItemLikeList(c context.Context, messageID int64, item *model.UserLikeRecord, businessID int64, state int8, limit int) (err error)

AppendCacheItemLikeList .

func (*Dao) AppendCacheUserLikeList

func (d *Dao) AppendCacheUserLikeList(c context.Context, mid int64, item *model.ItemLikeRecord, businessID int64, state int8, limit int) (err error)

AppendCacheUserLikeList .

func (*Dao) Business

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

Business .

func (*Dao) Close

func (d *Dao) Close()

Close .

func (*Dao) DelItemLikeCache

func (d *Dao) DelItemLikeCache(c context.Context, messageID, businessID int64, mid int64, state int8) (err error)

DelItemLikeCache .

func (*Dao) DelUserLikeCache

func (d *Dao) DelUserLikeCache(c context.Context, mid, businessID int64, messageID int64, state int8) (err error)

DelUserLikeCache .

func (*Dao) ExpireHashStatsCache

func (d *Dao) ExpireHashStatsCache(c context.Context, businessID, originID int64) (ok bool, err error)

ExpireHashStatsCache .

func (*Dao) ExpireItemLikesCache

func (d *Dao) ExpireItemLikesCache(c context.Context, messageID, businessID int64, state int8) (ok bool, err error)

ExpireItemLikesCache .

func (*Dao) ExpireUserLikesCache

func (d *Dao) ExpireUserLikesCache(c context.Context, mid, businessID int64, state int8) (ok bool, err error)

ExpireUserLikesCache .

func (*Dao) ItemLikes

func (d *Dao) ItemLikes(c context.Context, businessID, originID, messageID int64, typ int8, limit int) (res []*model.UserLikeRecord, err error)

ItemLikes .

func (*Dao) LikeState

func (d *Dao) LikeState(c context.Context, mid, businessID, originID, messageID int64) (res int8, err error)

LikeState .

func (*Dao) Ping

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

Ping .

func (*Dao) PubStatDatabus

func (d *Dao) PubStatDatabus(c context.Context, business string, mid int64, s *model.Stats, upMid int64) (err error)

PubStatDatabus .

func (*Dao) Stat

func (d *Dao) Stat(c context.Context, businessID, originID, messageID int64) (res model.Stats, err error)

Stat .

func (*Dao) UpdateCounts

func (d *Dao) UpdateCounts(c context.Context, businessID, originID, messageID, likeCounts, dislikeCounts, upMid int64) (err error)

UpdateCounts .

func (*Dao) UpdateLikeState

func (d *Dao) UpdateLikeState(c context.Context, mid, businessID, originID, messageID int64, state int8, likeTime time.Time) (res model.Stats, err error)

UpdateLikeState .

func (*Dao) UserLikes

func (d *Dao) UserLikes(c context.Context, mid, businessID int64, typ int8, limit int) (res []*model.ItemLikeRecord, err error)

UserLikes .

Jump to

Keyboard shortcuts

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