repoiface

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

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)
	Update(ctx context.Context, collection *model.Collection) error
	AddVideo2Collection(ctx context.Context, collectionId, videoId int64) error
	RemoveVideoFromCollection(ctx context.Context, collectionId, videoId int64) 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 CountFavoriteResult struct {
	Id  int64
	Cnt int64
}

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
	RemoveFollow(ctx context.Context, userId, targetUserId int64) error
	ListFollowing(ctx context.Context, userId int64, followType int32, limit, offset int) ([]int64, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL