model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VideoInfo

type VideoInfo struct {
	// 视频唯一标识
	ID int64
	// 文件名
	Name string
	// 视频标题
	Title string
	// 视频大小
	Size int64
	// 上传时间
	UploadTime int64
	// 作者
	Author uint32
	// 状态
	Status uint8
}

type VideoModel

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

func NewVideoModel

func NewVideoModel(uri, user, password, realm string, node int64) (*VideoModel, error)

func (*VideoModel) Close

func (v *VideoModel) Close(ctx context.Context) error

func (*VideoModel) Create

func (v *VideoModel) Create(ctx context.Context, video *VideoInfo) error

func (*VideoModel) Delete

func (v *VideoModel) Delete(ctx context.Context, video *VideoInfo) error

func (*VideoModel) Get

func (v *VideoModel) Get(ctx context.Context, id int64) (*VideoInfo, error)

func (*VideoModel) ListByAuthor

func (v *VideoModel) ListByAuthor(ctx context.Context, author uint32) ([]*VideoInfo, error)

func (*VideoModel) ListByLastesTime

func (v *VideoModel) ListByLastesTime(ctx context.Context, lastest_time int64) ([]*VideoInfo, error)

func (*VideoModel) Update

func (v *VideoModel) Update(ctx context.Context, video *VideoInfo) error

Jump to

Keyboard shortcuts

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