Documentation ¶
Index ¶
- func PromError(name string)
- type Dao
- func (d *Dao) AddCacheItemLikeList(c context.Context, messageID int64, miss []*model.UserLikeRecord, ...) (err error)
- func (d *Dao) AddCacheUserLikeList(c context.Context, mid int64, miss []*model.ItemLikeRecord, businessID int64, ...) (err error)
- func (d *Dao) AddHashStatsCache(c context.Context, businessID, originID int64, stats ...*model.Stats) (err error)
- func (d *Dao) AddHashStatsCacheMap(c context.Context, businessID, originID int64, stats map[int64]*model.Stats) (err error)
- func (d *Dao) AddStatsCache(c context.Context, businessID int64, vs ...*model.Stats) (err error)
- func (d *Dao) AddStatsCacheMap(c context.Context, businessID int64, stats map[int64]*model.Stats) (err error)
- func (d *Dao) AppendCacheItemLikeList(c context.Context, messageID int64, item *model.UserLikeRecord, ...) (err error)
- func (d *Dao) AppendCacheUserLikeList(c context.Context, mid int64, item *model.ItemLikeRecord, businessID int64, ...) (err error)
- func (d *Dao) Businesses(c context.Context) (res []*model.Business, err error)
- func (d *Dao) CacheItemLikeList(c context.Context, messageID, businessID int64, state int8, start, end int) (res []*model.UserLikeRecord, err error)
- func (d *Dao) CacheUserLikeList(c context.Context, mid, businessID int64, state int8, start, end int) (res []*model.ItemLikeRecord, err error)
- func (d *Dao) Close()
- func (d *Dao) DelHashStatsCache(c context.Context, businessID, originID int64) (err error)
- func (d *Dao) DelItemLikeCache(c context.Context, messageID, businessID int64, mid int64, state int8) (err error)
- func (d *Dao) DelStatsCache(c context.Context, businessID int64, messageID int64) (err error)
- func (d *Dao) DelUserLikeCache(c context.Context, mid, businessID int64, messageID int64, state int8) (err error)
- func (d *Dao) ExpireHashStatsCache(c context.Context, businessID, originID int64) (ok bool, err error)
- func (d *Dao) ExpireItemLikesCache(c context.Context, messageID, businessID int64, state int8) (ok bool, err error)
- func (d *Dao) ExpireUserLikesCache(c context.Context, mid, businessID int64, state int8) (ok bool, err error)
- func (d *Dao) HashStatsCache(c context.Context, businessID, originID int64, messageIDs []int64) (res map[int64]*model.Stats, err error)
- func (d *Dao) ItemHasLike(c context.Context, businessID int64, originID, messageID int64, mids []int64, ...) (res map[int64]int64, err error)
- func (d *Dao) ItemLikeExists(c context.Context, messageID, businessID int64, mids []int64, state int8) (res map[int64]int64, err error)
- func (d *Dao) ItemLikesCountCache(c context.Context, businessID, messageID int64) (res int, err error)
- func (d *Dao) LikeState(c context.Context, mid, businessID, originID, messageID int64) (res int8, err error)
- func (d *Dao) MessageStats(c context.Context, businessID int64, ids []int64) (res map[int64]*model.Stats, err error)
- func (d *Dao) OriginStats(c context.Context, businessID, originID int64) (res map[int64]*model.Stats, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubItemMsg(c context.Context, business string, originID, messageID int64, state int8) (err error)
- func (d *Dao) PubLikeDatabus(c context.Context, p *model.LikeMsg) (err error)
- func (d *Dao) PubStatDatabus(c context.Context, business string, mid int64, s *model.Stats, upMid int64) (err error)
- func (d *Dao) PubUserMsg(c context.Context, business string, mid int64, state int8) (err error)
- func (d *Dao) RawItemLikeList(c context.Context, messageID, businessID, originID int64, state int8, ...) (res []*model.UserLikeRecord, err error)
- func (d *Dao) RawStats(c context.Context, businessID, originID, messageID int64) (res model.RawStats, err error)
- func (d *Dao) RawUserLikeList(c context.Context, mid, businessID int64, state int8, start, end int) (res []*model.ItemLikeRecord, err error)
- func (d *Dao) Stat(c context.Context, businessID, originID, messageID int64) (res model.Stats, err error)
- func (d *Dao) StatsCache(c context.Context, businessID int64, messageIDs []int64) (cached map[int64]*model.Stats, missed []int64, err error)
- func (d *Dao) UpdateCount(c context.Context, businessID, originID, messageID int64, ...) (err error)
- func (d *Dao) UpdateCounts(c context.Context, businessID, originID, messageID int64, ...) (err error)
- func (d *Dao) UpdateUpMids(c context.Context, businessID int64, data []*model.UpMidsReq) (rows int64, err error)
- func (d *Dao) UserHasLike(c context.Context, businessID, mid int64, messageIDs []int64, typ int8) (res []*model.ItemLikeRecord, err error)
- func (d *Dao) UserLikeCount(c context.Context, businessID, mid int64, typ int8) (res int, err error)
- func (d *Dao) UserLikeExists(c context.Context, mid, businessID int64, messageIDs []int64, state int8) (res map[int64]*pb.UserLikeState, err error)
- func (d *Dao) UserLikeList(c context.Context, mid int64, businessID int64, state int8, start, end int) (res []*model.ItemLikeRecord, err error)
- func (d *Dao) UserLikesCountCache(c context.Context, businessID, mid int64) (res int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct { BusinessMap map[string]*model.Business BusinessIDMap map[int64]*model.Business // contains filtered or unexported fields }
Dao dao
func (*Dao) AddCacheItemLikeList ¶
func (d *Dao) AddCacheItemLikeList(c context.Context, messageID int64, miss []*model.UserLikeRecord, businessID int64, state int8) (err error)
AddCacheItemLikeList .
func (*Dao) AddCacheUserLikeList ¶
func (d *Dao) AddCacheUserLikeList(c context.Context, mid int64, miss []*model.ItemLikeRecord, businessID int64, state int8) (err error)
AddCacheUserLikeList .
func (*Dao) AddHashStatsCache ¶
func (d *Dao) AddHashStatsCache(c context.Context, businessID, originID int64, stats ...*model.Stats) (err error)
AddHashStatsCache .
func (*Dao) AddHashStatsCacheMap ¶
func (d *Dao) AddHashStatsCacheMap(c context.Context, businessID, originID int64, stats map[int64]*model.Stats) (err error)
AddHashStatsCacheMap .
func (*Dao) AddStatsCache ¶
AddStatsCache .
func (*Dao) AddStatsCacheMap ¶
func (d *Dao) AddStatsCacheMap(c context.Context, businessID int64, stats map[int64]*model.Stats) (err error)
AddStatsCacheMap .
func (*Dao) AppendCacheItemLikeList ¶
func (d *Dao) AppendCacheItemLikeList(c context.Context, messageID int64, item *model.UserLikeRecord, businessID int64, state int8) (err error)
AppendCacheItemLikeList .
func (*Dao) AppendCacheUserLikeList ¶
func (d *Dao) AppendCacheUserLikeList(c context.Context, mid int64, item *model.ItemLikeRecord, businessID int64, state int8) (err error)
AppendCacheUserLikeList .
func (*Dao) Businesses ¶
Businesses get business list
func (*Dao) CacheItemLikeList ¶
func (d *Dao) CacheItemLikeList(c context.Context, messageID, businessID int64, state int8, start, end int) (res []*model.UserLikeRecord, err error)
CacheItemLikeList .
func (*Dao) CacheUserLikeList ¶
func (d *Dao) CacheUserLikeList(c context.Context, mid, businessID int64, state int8, start, end int) (res []*model.ItemLikeRecord, err error)
CacheUserLikeList .
func (*Dao) DelHashStatsCache ¶
DelHashStatsCache del hash cache
func (*Dao) DelItemLikeCache ¶
func (d *Dao) DelItemLikeCache(c context.Context, messageID, businessID int64, mid int64, state int8) (err error)
DelItemLikeCache .
func (*Dao) DelStatsCache ¶
DelStatsCache del stats cache
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) HashStatsCache ¶
func (d *Dao) HashStatsCache(c context.Context, businessID, originID int64, messageIDs []int64) (res map[int64]*model.Stats, err error)
HashStatsCache .
func (*Dao) ItemHasLike ¶
func (d *Dao) ItemHasLike(c context.Context, businessID int64, originID, messageID int64, mids []int64, typ int8) (res map[int64]int64, err error)
ItemHasLike .
func (*Dao) ItemLikeExists ¶
func (d *Dao) ItemLikeExists(c context.Context, messageID, businessID int64, mids []int64, state int8) (res map[int64]int64, err error)
ItemLikeExists .
func (*Dao) ItemLikesCountCache ¶
func (d *Dao) ItemLikesCountCache(c context.Context, businessID, messageID int64) (res int, err error)
ItemLikesCountCache .
func (*Dao) LikeState ¶
func (d *Dao) LikeState(c context.Context, mid, businessID, originID, messageID int64) (res int8, err error)
LikeState get like state
func (*Dao) MessageStats ¶
func (d *Dao) MessageStats(c context.Context, businessID int64, ids []int64) (res map[int64]*model.Stats, err error)
MessageStats .
func (*Dao) OriginStats ¶
func (d *Dao) OriginStats(c context.Context, businessID, originID int64) (res map[int64]*model.Stats, err error)
OriginStats .
func (*Dao) PubItemMsg ¶
func (d *Dao) PubItemMsg(c context.Context, business string, originID, messageID int64, state int8) (err error)
PubItemMsg .
func (*Dao) PubLikeDatabus ¶
PubLikeDatabus .
func (*Dao) PubStatDatabus ¶
func (d *Dao) PubStatDatabus(c context.Context, business string, mid int64, s *model.Stats, upMid int64) (err error)
PubStatDatabus pub stat databus
func (*Dao) PubUserMsg ¶
PubUserMsg .
func (*Dao) RawItemLikeList ¶
func (d *Dao) RawItemLikeList(c context.Context, messageID, businessID, originID int64, state int8, start, end int) (res []*model.UserLikeRecord, err error)
RawItemLikeList item like list
func (*Dao) RawStats ¶
func (d *Dao) RawStats(c context.Context, businessID, originID, messageID int64) (res model.RawStats, err error)
RawStats stat changes
func (*Dao) RawUserLikeList ¶
func (d *Dao) RawUserLikeList(c context.Context, mid, businessID int64, state int8, start, end int) (res []*model.ItemLikeRecord, err error)
RawUserLikeList .
func (*Dao) Stat ¶
func (d *Dao) Stat(c context.Context, businessID, originID, messageID int64) (res model.Stats, err error)
Stat .
func (*Dao) StatsCache ¶
func (d *Dao) StatsCache(c context.Context, businessID int64, messageIDs []int64) (cached map[int64]*model.Stats, missed []int64, err error)
StatsCache .
func (*Dao) UpdateCount ¶
func (d *Dao) UpdateCount(c context.Context, businessID, originID, messageID int64, likeChange, dislikeChange int64) (err error)
UpdateCount .
func (*Dao) UpdateCounts ¶
func (d *Dao) UpdateCounts(c context.Context, businessID, originID, messageID int64, likeCount, dislikeCount int64, upMid int64) (err error)
UpdateCounts .
func (*Dao) UpdateUpMids ¶
func (d *Dao) UpdateUpMids(c context.Context, businessID int64, data []*model.UpMidsReq) (rows int64, err error)
UpdateUpMids .
func (*Dao) UserHasLike ¶
func (d *Dao) UserHasLike(c context.Context, businessID, mid int64, messageIDs []int64, typ int8) (res []*model.ItemLikeRecord, err error)
UserHasLike .
func (*Dao) UserLikeCount ¶
func (d *Dao) UserLikeCount(c context.Context, businessID, mid int64, typ int8) (res int, err error)
UserLikeCount count
func (*Dao) UserLikeExists ¶
func (d *Dao) UserLikeExists(c context.Context, mid, businessID int64, messageIDs []int64, state int8) (res map[int64]*pb.UserLikeState, err error)
UserLikeExists .