Documentation ¶
Index ¶
- type ProxyIndexMap
- func (i *ProxyIndexMap) GetFavorCount(userId int64) (int64, error)
- func (i *ProxyIndexMap) GetFavorState(userId int64, videoId int64) bool
- func (i *ProxyIndexMap) GetFavorVideoIds(userId int64) ([]int64, error)
- func (i *ProxyIndexMap) GetFavorVideoIdsBySet(userId int64) (map[int64]struct{}, error)
- func (i *ProxyIndexMap) GetVideoIsFavoritedCount(videoId int64) (int64, error)
- func (i *ProxyIndexMap) UpdateFavorState(userId int64, videoId int64, state bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyIndexMap ¶
type ProxyIndexMap struct { }
func NewProxyIndexMap ¶
func NewProxyIndexMap() *ProxyIndexMap
func (*ProxyIndexMap) GetFavorCount ¶
func (i *ProxyIndexMap) GetFavorCount(userId int64) (int64, error)
GetFavorCount 获取用户的点赞总数量
func (*ProxyIndexMap) GetFavorState ¶
func (i *ProxyIndexMap) GetFavorState(userId int64, videoId int64) bool
GetFavorState 得到点赞状态
func (*ProxyIndexMap) GetFavorVideoIds ¶
func (i *ProxyIndexMap) GetFavorVideoIds(userId int64) ([]int64, error)
GetFavorVideoIds 获取一个用户所有点过赞的视频id,以切片的形式返回
func (*ProxyIndexMap) GetFavorVideoIdsBySet ¶
func (i *ProxyIndexMap) GetFavorVideoIdsBySet(userId int64) (map[int64]struct{}, error)
GetFavorVideoIdsBySet 获取一个用户所有点过赞的视频id,以哈希表的形式返回
func (*ProxyIndexMap) GetVideoIsFavoritedCount ¶
func (i *ProxyIndexMap) GetVideoIsFavoritedCount(videoId int64) (int64, error)
GetVideoIsFavoritedCount 获取一个视频被点赞的总数量
func (*ProxyIndexMap) UpdateFavorState ¶
func (i *ProxyIndexMap) UpdateFavorState(userId int64, videoId int64, state bool) error
UpdateFavorState 更新点赞状态
Click to show internal directories.
Click to hide internal directories.