videodata

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IVideoRepo

type IVideoRepo interface {
	Save(ctx context.Context, tx *query.Query, v *model.Video) error
	UpdateById(ctx context.Context, tx *query.Query, v *model.Video) (int64, error)
	FindByID(ctx context.Context, tx *query.Query, id int64) (*model.Video, error)
	FindByIdList(ctx context.Context, idList []int64) ([]*model.Video, error)
	GetVideoList(
		ctx context.Context, tx *query.Query, userId int64, latestTime int64, PaginationRequest *infra_dto.PaginationRequest,
	) ([]*model.Video, *infra_dto.PaginationResponse, error)
	GetVideoFeed(ctx context.Context, tx *query.Query, userId, latestTime, num int64) ([]*model.Video, error)
}

type VideoRepo

type VideoRepo struct {
}

func NewVideoRepo

func NewVideoRepo() *VideoRepo

NewVideoRepo .

func (*VideoRepo) FindByID

func (r *VideoRepo) FindByID(ctx context.Context, tx *query.Query, id int64) (*model.Video, error)

func (*VideoRepo) FindByIdList added in v0.1.6

func (r *VideoRepo) FindByIdList(ctx context.Context, idList []int64) ([]*model.Video, error)

func (*VideoRepo) GetVideoFeed

func (r *VideoRepo) GetVideoFeed(ctx context.Context, tx *query.Query, userId, latestTime, num int64) ([]*model.Video, error)

func (*VideoRepo) GetVideoList

func (r *VideoRepo) GetVideoList(
	ctx context.Context, tx *query.Query, userId int64, latestTime int64, pageRequest *infra_dto.PaginationRequest,
) ([]*model.Video, *infra_dto.PaginationResponse, error)

func (*VideoRepo) Save

func (r *VideoRepo) Save(ctx context.Context, tx *query.Query, v *model.Video) error

func (*VideoRepo) UpdateById

func (r *VideoRepo) UpdateById(ctx context.Context, tx *query.Query, v *model.Video) (int64, error)

Jump to

Keyboard shortcuts

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