Documentation ¶
Index ¶
- Constants
- Variables
- func AddCommentCount(ctx context.Context, vid int64) error
- func AddVideFavoriteCount(ctx context.Context, vid int64, uid int64) error
- func AddVideoSet(ctx context.Context, vid int64, expire time.Duration) error
- func GetCommentCount(ctx context.Context, vid int64) (int64, error)
- func GetCommentCountKey(vid int64) string
- func GetUserFavoriteCount(ctx context.Context, uid int64) (int64, error)
- func GetUserFavoriteVideos(ctx context.Context, uid int64) ([]int64, error)
- func GetVideoLikeCount(ctx context.Context, vid int64) (int64, error)
- func Init()
- func IsVideoFavoriteExist(ctx context.Context, vid int64, uid int64) (bool, error)
- func IsVideoInSet(ctx context.Context, vid int64) (bool, error)
- func ReduceVideoLikeCount(ctx context.Context, vid int64, uid int64) error
- func RemoveVideoSet(ctx context.Context, vid int64) error
- func SetCommentCount(ctx context.Context, vid int64, count int64) error
- func SetVideoLikeCount(ctx context.Context, vid int64, count int64) error
- func UpdateFavoriteVideoList(ctx context.Context, uid int64, vids []int64) error
- func UserFavoriteKey(uid int64) string
- func VideoFavoriteCountKey(vid int64) string
Constants ¶
View Source
const ( UserLikeKey = "user_like" VideoLikeCountKey = "video_like_count" VideoSetKey = "video_set" )
View Source
const (
CommentCountKey = "comment_count"
)
Variables ¶
View Source
var RedisClient *redis.Client
Functions ¶
func AddVideFavoriteCount ¶
func GetCommentCountKey ¶
func GetUserFavoriteCount ¶
func GetUserFavoriteVideos ¶
func IsVideoFavoriteExist ¶
func ReduceVideoLikeCount ¶
func UpdateFavoriteVideoList ¶
func UserFavoriteKey ¶
func VideoFavoriteCountKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.