Documentation ¶
Index ¶
- Variables
- func CountCommentsByVideoId(ctx context.Context, videoId int64) (int64, error)
- func CreateFavorite(ctx context.Context, favorite *Favorite) error
- func GetFavouriteVideosByUid(ctx context.Context, uid int64) ([]int64, error)
- func GetUserFavouriteCount(ctx context.Context, uid int64) (int64, error)
- func GetVideoFavouriteCount(ctx context.Context, vid int64) (int64, error)
- func Init()
- func IsFavoriteExist(ctx context.Context, uid int64, vid int64) (bool, error)
- func IsFavorited(ctx context.Context, uid int64, vid int64, status int64) error
- func UpdateFavoriteStatus(ctx context.Context, uid int64, vid int64, status int64) error
- func UpdateVideoFavouriteCount(ctx context.Context, vid int64, count int64) error
- type Comment
- func CreateComment(ctx context.Context, comment *Comment) (*Comment, error)
- func DeleteComment(ctx context.Context, comment *Comment) (*Comment, error)
- func GetCommentById(ctx context.Context, commentId int64) (*Comment, error)
- func GetCommentsByVideoId(ctx context.Context, videoId int64) ([]Comment, error)
- type Favorite
- type VideoFavourite
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
View Source
var SF *utils.Snowflake
Functions ¶
func CountCommentsByVideoId ¶
func GetFavouriteVideosByUid ¶
func GetUserFavouriteCount ¶
func GetVideoFavouriteCount ¶
func IsFavoriteExist ¶
func UpdateFavoriteStatus ¶
Types ¶
type Comment ¶
Click to show internal directories.
Click to hide internal directories.