Documentation ¶
Index ¶
- type PersistRepository
- func (p *PersistRepository) AddVideo2Collection(ctx context.Context, userId, collectionId, videoId int64) error
- func (p *PersistRepository) CountByUserId(ctx context.Context, userId int64) (int64, error)
- func (s *PersistRepository) CountByVideoIdList(ctx context.Context, videoIdList []int64) ([]*collectionserviceiface.CountResult, error)
- func (p *PersistRepository) CountCollectionVideo(ctx context.Context, collectionId int64) (int64, error)
- func (p *PersistRepository) Create(ctx context.Context, collection *model.Collection) error
- func (p *PersistRepository) GetById(ctx context.Context, id int64) (*model.Collection, error)
- func (p *PersistRepository) GetByIdTx(ctx context.Context, id int64) (*model.Collection, error)
- func (p *PersistRepository) GetCollectionVideo(ctx context.Context, collectionId, videoId int64) (*model.CollectionVideo, error)
- func (p *PersistRepository) ListByUserId(ctx context.Context, userId int64, limit, offset int) ([]*model.Collection, error)
- func (p *PersistRepository) ListCollectedVideoByGiven(ctx context.Context, userId int64, videoIdList []int64) ([]int64, error)
- func (p *PersistRepository) ListCollectionVideo(ctx context.Context, collectionId int64, limit, offset int) ([]*model.CollectionVideo, error)
- func (p *PersistRepository) ListFirstCollection4UserId(ctx context.Context, userId int64) (*model.Collection, error)
- func (p *PersistRepository) RemoveById(ctx context.Context, id int64) error
- func (p *PersistRepository) RemoveVideoFromCollection(ctx context.Context, collectionId, videoId int64) error
- func (p *PersistRepository) Update(ctx context.Context, collection *model.Collection) error
- func (p *PersistRepository) UpdateCollectionVideoTx(ctx context.Context, collectionVideo *model.CollectionVideo) error
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 (*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 (*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 (*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
Click to show internal directories.
Click to hide internal directories.