Versions in this module Expand all Collapse all v0 v0.0.1 Jun 5, 2022 Changes in this version + func CreateComment(ctx context.Context, comment *Comment) error + func CreateFavorite(ctx context.Context, uid, vid uint64) error + func CreateVideo(ctx context.Context, videos []*Video) error + func DeleteComment(ctx context.Context, uid, cid uint64) error + func DeleteFavorite(ctx context.Context, uid, vid uint64) error + func GetSetInt64List(ctx context.Context, key string) ([]uint64, error) + func Init() + func InitMysql() + func InitRDB() + func MGetFavoriteVideoIDs(ctx context.Context, uid uint64) (ids []uint64, err error) + func QueryCommentCount(ctx context.Context, vid int64) (uint64, error) + func QueryFavoriteCount(ctx context.Context, vid uint64) uint64 + func QueryIsFavorite(ctx context.Context, uid, vid uint64) bool + type Comment struct + Content string + UID uint64 + VID uint64 + func MGetComments(ctx context.Context, vid uint64) ([]*Comment, error) + func (m *Comment) TableName() string + type Video struct + AuthorID uint64 + CommentCount uint64 + CoverUrl string + FavoriteCount uint64 + IsFavorite bool + PlayUrl string + Title string + func MGetVideos(ctx context.Context, uid, nextTime uint64) ([]*Video, error) + func MGetVideosByIDs(ctx context.Context, vids []uint64) ([]*Video, error) + func MGetVideosByUID(ctx context.Context, uid uint64) ([]*Video, error) + func (m *Video) TableName() string