Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionRepository ¶
type CollectionRepository interface { Create(ctx context.Context, collection *model.Collection) error GetById(ctx context.Context, id int64) (*model.Collection, error) RemoveById(ctx context.Context, id int64) error ListByUserId(ctx context.Context, userId int64, limit, offset int) ([]*model.Collection, error) ListFirstCollection4UserId(ctx context.Context, userId int64) (*model.Collection, error) CountByUserId(ctx context.Context, userId int64) (int64, error) Update(ctx context.Context, collection *model.Collection) error ListCollectionVideo(ctx context.Context, collectionId int64, limit, offset int) ([]*model.CollectionVideo, error) AddVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) error RemoveVideoFromCollection(ctx context.Context, collectionId, videoId int64) error UpdateCollectionVideoTx(ctx context.Context, collectionVideo *model.CollectionVideo) error CountCollectionVideo(ctx context.Context, collectionId int64) (int64, error) ListCollectedVideoByGiven(ctx context.Context, userId int64, videoIdList []int64) ([]int64, error) GetCollectionVideo(ctx context.Context, collectionId, videoId int64) (*model.CollectionVideo, error) GetByIdTx(ctx context.Context, id int64) (*model.Collection, error) }
type CommentRepository ¶ added in v0.1.3
type CommentRepository interface { Create(ctx context.Context, comment *model.Comment) error Update(ctx context.Context, comment *model.Comment) error RemoveById(ctx context.Context, commentId int64) error ListByVideoId(ctx context.Context, videoId int64, limit, offset int) ([]*model.Comment, error) ListParentCommentByVideoId(ctx context.Context, videoId int64, limit, offset int) ([]*model.Comment, error) ListChildCommentByCommentId(ctx context.Context, commentId int64, limit, offset int) ([]*model.Comment, error) CountChildComments(ctx context.Context, commentId int64) (int64, error) GetById(ctx context.Context, commentId int64) (*model.Comment, error) GetByIdList(ctx context.Context, commentIdList []int64) ([]*model.Comment, error) CountByVideoId(ctx context.Context, videoId int64) (int64, error) CountByUserId(ctx context.Context, userId int64) (int64, error) }
type CountFavoriteResult ¶ added in v0.1.3
type FavoriteRepository ¶ added in v0.1.3
type FavoriteRepository interface { AddFavorite(ctx context.Context, userId, targetId int64, targetType, favoriteType int32) error RemoveFavorite(ctx context.Context, userId, targetId int64, targetType, favoriteType int32) error ListFavorite(ctx context.Context, bizId int64, aggType, favoriteType int32, limit, offset int) ([]int64, error) CountFavorite(ctx context.Context, bizId []int64, aggType, favoriteType int32) ([]*CountFavoriteResult, error) Get4IsFavorite(ctx context.Context, userId, bizId []int64) ([]*model.Favorite, error) }
type FollowRepository ¶ added in v0.1.3
type FollowRepository interface { AddFollow(ctx context.Context, userId, targetUserId int64) error GetFirstFollowRelation(ctx context.Context, userId, targetUserId int64) (int64, error) UpdateRelation2UnDeleted(ctx context.Context, id int64) error RemoveFollow(ctx context.Context, userId, targetUserId int64) error ListFollowing(ctx context.Context, userId int64, followType int32, limit, offset int) ([]int64, error) CountFollowing(ctx context.Context, userId int64, followType int32) (int64, error) ListFollowingInGivenList(ctx context.Context, userId int64, targetUserIdList []int64) ([]int64, error) }
Click to show internal directories.
Click to hide internal directories.