Documentation ¶
Index ¶
- Variables
- func CountCommentsByVideoID(ctx context.Context, videoId int64) (int64, error)
- func FavoriteCreate(ctx context.Context, fav *Favorite) error
- func GetUserFavoriteCount(ctx context.Context, userID int64) (int64, error)
- func GetVideoLikeCount(ctx context.Context, videoID int64) (int64, error)
- func GetVideosByUserId(ctx context.Context, userID int64) ([]int64, error)
- func Init()
- func IsFavoriteExist(ctx context.Context, userID int64, videoID int64) error
- func IsFavorited(ctx context.Context, userID int64, videoID int64, status int64) error
- func UpdateFavoriteStatus(ctx context.Context, userID int64, videoID int64, status 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
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
View Source
var SF *utils.Snowflake
Functions ¶
func CountCommentsByVideoID ¶
func GetUserFavoriteCount ¶
func IsFavorited ¶
Types ¶
type Comment ¶
type Comment struct { Id int64 `msg:"i"` UserId int64 `msg:"u"` VideoId int64 `msg:"-"` Content string `msg:"c"` CreatedAt time.Time `msg:"-"` UpdatedAt time.Time `msg:"-"` DeletedAt gorm.DeletedAt `gorm:"index" msg:"-"` }
func GetCommentsByVideoID ¶
func (Comment) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.