Documentation ¶
Index ¶
- Variables
- type Comment
- func (c *Comment) CommentCountByVideoId(videoId int64) (int64, error)
- func (c *Comment) CreateComment(comment *model.Comment) error
- func (c *Comment) DeleteComment(id int64) error
- func (c *Comment) GetCommentIdListByVideoId(videoId int64) ([]string, error)
- func (c *Comment) GetCommentListByVideoId(videoId int64) ([]*model.Comment, error)
- type Favorite
- func (f *Favorite) CreateFavorite(fav *model.Favorite) error
- func (f *Favorite) GetFavoriteCountByVideoId(videoId int64) (int64, error)
- func (f *Favorite) GetFavoriteInfo(userId, videoId int64) (*model.Favorite, error)
- func (f *Favorite) GetFavoriteUserList(videoId int64) ([]int64, error)
- func (f *Favorite) GetFavoriteVideoCountByUserId(userId int64) (int64, error)
- func (f *Favorite) GetFavoriteVideoIdListByUserId(userId int64) ([]int64, error)
- func (f *Favorite) UpdateFavorite(userId, videoId int64, actionType int8) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoSuchRecord = errors.New("no such record") ErrRecordAlreadyExist = errors.New("record already exist") )
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
// contains filtered or unexported fields
}
func NewComment ¶
NewComment create an interaction comment dao.
func (*Comment) CommentCountByVideoId ¶
CommentCountByVideoId gets the number of comments by videoId.
func (*Comment) CreateComment ¶
CreateComment creates a comment.
func (*Comment) DeleteComment ¶
DeleteComment to delete a comment.
func (*Comment) GetCommentIdListByVideoId ¶
GetCommentIdListByVideoId gets commentId list by videoId
type Favorite ¶
type Favorite struct {
// contains filtered or unexported fields
}
func NewFavorite ¶
NewFavorite create a interaction favorite dao.
func (*Favorite) CreateFavorite ¶
CreateFavorite creates a favorite record.
func (*Favorite) GetFavoriteCountByVideoId ¶
GetFavoriteCountByVideoId gets the number of favorite by videoId.
func (*Favorite) GetFavoriteInfo ¶
GetFavoriteInfo get favorite info.
func (*Favorite) GetFavoriteUserList ¶
GetFavoriteUserList gets favorite user list by videoId.
func (*Favorite) GetFavoriteVideoCountByUserId ¶
GetFavoriteVideoCountByUserId gets a user's favorite video count.
func (*Favorite) GetFavoriteVideoIdListByUserId ¶
GetFavoriteVideoIdListByUserId gets a user's favorite video list
Click to show internal directories.
Click to hide internal directories.