db

package
v0.0.0-...-48d44df Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateVideo

func CreateVideo(ctx context.Context, video *model.Video) error

func DecreaseCommentCountById

func DecreaseCommentCountById(ctx context.Context, videoId int64)

func DecreaseFavoriteCountById

func DecreaseFavoriteCountById(ctx context.Context, videoId int64)

func GetAuthorId

func GetAuthorId(ctx context.Context, videoId int64) int64

func IncreaseCommentCountById

func IncreaseCommentCountById(ctx context.Context, videoId int64)

func IncreaseFavoriteCountById

func IncreaseFavoriteCountById(ctx context.Context, videoId int64)

func Init

func Init()

func QueryVideo

func QueryVideo(ctx context.Context, latestTime int64, limit int) ([]*model.Video, error)

func QueryVideoByIdBatch

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

func QueryVideoByUserID

func QueryVideoByUserID(ctx context.Context, userID int64) ([]*model.Video, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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