Documentation ¶
Index ¶
- func PromCacheHit(name string)
- func PromCacheMiss(name string)
- func PromError(name string)
- func PromInfo(name string)
- type GuardDao
- func (d *GuardDao) AddGuard(ctx context.Context, req *model.GuardBuy) (err error)
- func (d *GuardDao) ClearCache(ctx context.Context, uid int64, ruid int64) (err error)
- func (d *GuardDao) Close()
- func (d *GuardDao) DelDHHFromRedis(c context.Context, mid int64) (err error)
- func (d *GuardDao) GetAnchorAllGuardFromRedis(ctx context.Context, anchorUIDs []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
- func (d *GuardDao) GetAnchorRecentTopGuardCache(ctx context.Context, uid int64) (resp map[int64]int64, err error)
- func (d *GuardDao) GetByAnchorUIDs(c context.Context, uids []int64) (dhhs []*dhhm.DHHDB, err error)
- func (d *GuardDao) GetByUIDs(c context.Context, uids []int64) (dhhs []*dhhm.DHHDB, err error)
- func (d *GuardDao) GetByUIDsWithMap(c context.Context, uids []int64) (dhhs map[int64][]*dhhm.DHHDB, err error)
- func (d *GuardDao) GetGuardByUID(ctx context.Context, uid int64) (info []*model.GuardInfo, err error)
- func (d *GuardDao) GetGuardByUIDRuid(ctx context.Context, uid int64, ruid int64) (info []*model.GuardInfo, err error)
- func (d *GuardDao) GetGuardTopListCache(ctx context.Context, uid int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
- func (d *GuardDao) GetUIDAllGuardFromRedis(ctx context.Context, mids []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
- func (d *GuardDao) GetUIDAllGuardFromRedisBatch(ctx context.Context, mids []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
- func (d *GuardDao) LockOrder(ctx context.Context, orderID string) (ok bool, err error)
- func (d *GuardDao) Ping(ctx context.Context) error
- func (d *GuardDao) SetAnchorGuardListCache(c context.Context, dhhList []dahanghaiModel.DaHangHaiRedis2, uid int64) (err error)
- func (d *GuardDao) SetDHHListCache(c context.Context, dhhList []dahanghaiModel.DaHangHaiRedis2, uid int64) (err error)
- func (d *GuardDao) UnlockOrder(ctx context.Context, orderID string) (err error)
- func (d *GuardDao) UpdateGuard(ctx context.Context, req *model.GuardBuy, cond string) (err error)
- func (d *GuardDao) UpsertGuard(ctx context.Context, req *model.GuardBuy, expiredTime string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GuardDao ¶
type GuardDao struct {
// contains filtered or unexported fields
}
GuardDao vip dao
func (*GuardDao) ClearCache ¶
ClearCache delete cache for guard
func (*GuardDao) DelDHHFromRedis ¶
DelDHHFromRedis 删除获取用户守护cache,不支持批量
func (*GuardDao) GetAnchorAllGuardFromRedis ¶
func (d *GuardDao) GetAnchorAllGuardFromRedis(ctx context.Context, anchorUIDs []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
GetAnchorAllGuardFromRedis 获取单个主播的全量被守护信息(同一个主播仅获取最高级别)
func (*GuardDao) GetAnchorRecentTopGuardCache ¶
func (d *GuardDao) GetAnchorRecentTopGuardCache(ctx context.Context, uid int64) (resp map[int64]int64, err error)
GetAnchorRecentTopGuardCache 获取单个主播最近的总督信息
func (*GuardDao) GetByAnchorUIDs ¶
GetByAnchorUIDs 批量查询
func (*GuardDao) GetByUIDsWithMap ¶
func (d *GuardDao) GetByUIDsWithMap(c context.Context, uids []int64) (dhhs map[int64][]*dhhm.DHHDB, err error)
GetByUIDsWithMap 批量查询
func (*GuardDao) GetGuardByUID ¶
func (d *GuardDao) GetGuardByUID(ctx context.Context, uid int64) (info []*model.GuardInfo, err error)
GetGuardByUID get guard info by uid
func (*GuardDao) GetGuardByUIDRuid ¶
func (d *GuardDao) GetGuardByUIDRuid(ctx context.Context, uid int64, ruid int64) (info []*model.GuardInfo, err error)
GetGuardByUIDRuid get guard info by uid and ruid
func (*GuardDao) GetGuardTopListCache ¶
func (d *GuardDao) GetGuardTopListCache(ctx context.Context, uid int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
GetGuardTopListCache 获取单个用户的全量守护信息
func (*GuardDao) GetUIDAllGuardFromRedis ¶
func (d *GuardDao) GetUIDAllGuardFromRedis(ctx context.Context, mids []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
GetUIDAllGuardFromRedis 获取单个用户的全量守护信息
func (*GuardDao) GetUIDAllGuardFromRedisBatch ¶
func (d *GuardDao) GetUIDAllGuardFromRedisBatch(ctx context.Context, mids []int64) (dhhList []*dahanghaiModel.DaHangHaiRedis2, err error)
GetUIDAllGuardFromRedisBatch 获取批量用户的全量守护信息
func (*GuardDao) SetAnchorGuardListCache ¶
func (d *GuardDao) SetAnchorGuardListCache(c context.Context, dhhList []dahanghaiModel.DaHangHaiRedis2, uid int64) (err error)
SetAnchorGuardListCache ... 批量设置主播维度守护信息cache
func (*GuardDao) SetDHHListCache ¶
func (d *GuardDao) SetDHHListCache(c context.Context, dhhList []dahanghaiModel.DaHangHaiRedis2, uid int64) (err error)
SetDHHListCache ... 批量设置用户守护cache
func (*GuardDao) UnlockOrder ¶
UnlockOrder release lock for same order
func (*GuardDao) UpdateGuard ¶
UpdateGuard update guard info
Click to show internal directories.
Click to hide internal directories.