collectionservice

package
v0.1.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(collection repoiface.CollectionRepository) *Service

func (*Service) AddVideo2Collection

func (s *Service) AddVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) (err error)

func (*Service) CreateCollection

func (s *Service) CreateCollection(ctx context.Context, userId int64, name, description string) error

func (*Service) GenerateDefaultCollection added in v0.1.7

func (s *Service) GenerateDefaultCollection(ctx context.Context, userId int64) error

func (*Service) GetCollectionById

func (s *Service) GetCollectionById(ctx context.Context, collectionId int64) (*collection.Collection, error)

func (*Service) ListCollectedVideoByGiven added in v0.1.6

func (s *Service) ListCollectedVideoByGiven(ctx context.Context, userId int64, videoIdList []int64) ([]int64, error)

func (*Service) ListCollection

func (s *Service) ListCollection(ctx context.Context, userId int64, limit, offset int) (*collectionserviceiface.ListCollectionResult, error)

func (*Service) ListCollectionVideo

func (s *Service) ListCollectionVideo(ctx context.Context, collectionId int64, pagination *v1.PaginationRequest) (*collectionserviceiface.ListCollectionVideoResult, error)

func (*Service) RemoveCollection

func (s *Service) RemoveCollection(ctx context.Context, collectionId int64) error

func (*Service) RemoveVideo2Collection

func (s *Service) RemoveVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) error

func (*Service) UpdateCollection

func (s *Service) UpdateCollection(ctx context.Context, collectionId int64, name, description string) error

Jump to

Keyboard shortcuts

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