cache

package
v0.0.0-...-dfc68d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 更新点赞状态

Jump to

Keyboard shortcuts

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