collectionrepo

package
v0.1.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistRepository

type PersistRepository struct {
}

func New

func New() *PersistRepository

func (*PersistRepository) AddVideo2Collection

func (p *PersistRepository) AddVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) error

func (*PersistRepository) CountByUserId added in v0.1.4

func (p *PersistRepository) CountByUserId(ctx context.Context, userId int64) (int64, error)

func (*PersistRepository) CountByVideoIdList added in v0.1.11

func (s *PersistRepository) CountByVideoIdList(ctx context.Context, videoIdList []int64) ([]*collectionserviceiface.CountResult, error)

func (*PersistRepository) CountCollectionVideo added in v0.1.4

func (p *PersistRepository) CountCollectionVideo(ctx context.Context, collectionId int64) (int64, error)

func (*PersistRepository) Create

func (p *PersistRepository) Create(ctx context.Context, collection *model.Collection) error

func (*PersistRepository) GetById

func (p *PersistRepository) GetById(ctx context.Context, id int64) (*model.Collection, error)

func (*PersistRepository) GetByIdTx added in v0.1.6

func (p *PersistRepository) GetByIdTx(ctx context.Context, id int64) (*model.Collection, error)

func (*PersistRepository) GetCollectionVideo added in v0.1.6

func (p *PersistRepository) GetCollectionVideo(ctx context.Context, collectionId, videoId int64) (*model.CollectionVideo, error)

func (*PersistRepository) ListByUserId

func (p *PersistRepository) ListByUserId(ctx context.Context, userId int64, limit, offset int) ([]*model.Collection, error)

func (*PersistRepository) ListCollectedVideoByGiven added in v0.1.6

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

func (*PersistRepository) ListCollectionVideo added in v0.1.6

func (p *PersistRepository) ListCollectionVideo(ctx context.Context, collectionId int64, limit, offset int) ([]*model.CollectionVideo, error)

func (*PersistRepository) ListFirstCollection4UserId added in v0.1.7

func (p *PersistRepository) ListFirstCollection4UserId(ctx context.Context, userId int64) (*model.Collection, error)

func (*PersistRepository) RemoveById

func (p *PersistRepository) RemoveById(ctx context.Context, id int64) error

func (*PersistRepository) RemoveVideoFromCollection

func (p *PersistRepository) RemoveVideoFromCollection(ctx context.Context, collectionId, videoId int64) error

func (*PersistRepository) Update

func (p *PersistRepository) Update(ctx context.Context, collection *model.Collection) error

func (*PersistRepository) UpdateCollectionVideoTx added in v0.1.6

func (p *PersistRepository) UpdateCollectionVideoTx(ctx context.Context, collectionVideo *model.CollectionVideo) error

Jump to

Keyboard shortcuts

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