Documentation ¶
Index ¶
- Variables
- func AddComment(ctx context.Context, key string, comment *db.Comment) (err error)
- func AddComments(ctx context.Context, key string, comments *[]db.Comment) (err error)
- func AddCount(ctx context.Context, increment int64, videoID string) (err error)
- func AddNoData(ctx context.Context, key string) (err error)
- func AddVideoLikeCount(ctx context.Context, videoID int64, userID int64) error
- func Delete(ctx context.Context, key string) (err error)
- func DeleteComment(ctx context.Context, key string, comment *db.Comment) (err error)
- func GetCommentKey(videoID string) string
- func GetCommentNXKey(videoID string) string
- func GetComments(ctx context.Context, key string) (comments *[]redis.Z, err error)
- func GetCount(ctx context.Context, key string) (ok bool, count string, err error)
- func GetCountKey(videoID string) string
- func GetCountNXKey(videoID string) string
- func GetUserFavoriteCount(ctx context.Context, userID int64) (int64, error)
- func GetUserFavoriteVideos(ctx context.Context, userID int64) ([]int64, error)
- func GetUserLikeKey(userID int64) string
- func GetVideoLikeCount(ctx context.Context, videoID int64) (bool, int64, error)
- func GetVideoLikeCountKey(videoID int64) string
- func Init()
- func IsExistComment(ctx context.Context, key string) (exist int64, err error)
- func IsVideoLikeExist(ctx context.Context, videoID int64, userID int64) (bool, error)
- func Lock(ctx context.Context, key string) (ok bool, err error)
- func ReduceVideoLikeCount(ctx context.Context, videoID int64, userID int64) error
- func SetCount(ctx context.Context, key string, count int64) (err error)
- func SetVideoLikeCount(ctx context.Context, videoID int64, count int64) error
- func Unlink(ctx context.Context, key string) (err error)
- func UpdateFavoriteVideoList(ctx context.Context, userID int64, videoIDList []int64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var RedisClient *redis.Client
Functions ¶
func AddComments ¶
func AddVideoLikeCount ¶
func DeleteComment ¶
func GetCommentKey ¶
func GetCommentNXKey ¶
func GetComments ¶
func GetCountKey ¶
func GetCountNXKey ¶
func GetUserFavoriteCount ¶
func GetUserFavoriteVideos ¶
func GetUserLikeKey ¶
func GetVideoLikeCount ¶
func GetVideoLikeCountKey ¶
func IsVideoLikeExist ¶
func ReduceVideoLikeCount ¶
func SetVideoLikeCount ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.