crud

package
v0.0.0-...-3ac9adb Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelSubscribeUser

func CancelSubscribeUser(db *gorm.DB, user *models.User, subscriberUserID uint) (*models.User, error)

func CreateComment

func CreateComment(db *gorm.DB, comment *models.Comment) *models.Comment

func CreateUser

func CreateUser(db *gorm.DB, user *models.User) *models.User

func CreateVideo

func CreateVideo(db *gorm.DB, video *models.Video) *models.Video

func DeleteComment

func DeleteComment(db *gorm.DB, commentID uint) error

func GetComments

func GetComments(db *gorm.DB, videoID uint) []models.Comment

func GetUserByID

func GetUserByID(db *gorm.DB, userID uint) (*models.User, error)

func GetUserByName

func GetUserByName(db *gorm.DB, name string) *models.User

func GetUserFollowersByID

func GetUserFollowersByID(db *gorm.DB, userID uint) []models.User

func GetUserFollowersCountByID

func GetUserFollowersCountByID(db *gorm.DB, userID uint) int64

func GetUserLikeVideosByUserID

func GetUserLikeVideosByUserID(db *gorm.DB, userID uint) []models.Video

func GetUserPublishVideosByID

func GetUserPublishVideosByID(db *gorm.DB, userID uint) []models.Video

func GetUserSubscribersByID

func GetUserSubscribersByID(db *gorm.DB, userID uint) []models.User

func GetUserSubscribersCountByID

func GetUserSubscribersCountByID(db *gorm.DB, userID uint) int64

func GetVideoByID

func GetVideoByID(db *gorm.DB, videoID uint) (*models.Video, error)

func GetVideoCommentsCountByID

func GetVideoCommentsCountByID(db *gorm.DB, videoID uint) int64

func GetVideoLikesCount

func GetVideoLikesCount(db *gorm.DB, videoID uint) int64

func GetVideoUserFavoritesByID

func GetVideoUserFavoritesByID(db *gorm.DB, videoID uint) []models.User

func GetVideos

func GetVideos(db *gorm.DB, latestTime int64, userID uint) []models.Video

func IsUserFavoriteVideo

func IsUserFavoriteVideo(db *gorm.DB, userID, videoID uint) bool

func IsUserFollow

func IsUserFollow(db *gorm.DB, userID, anotherUserID uint) bool

func SubscribeUser

func SubscribeUser(db *gorm.DB, user *models.User, subscriberUserID uint) (*models.User, error)

func UserDislikeVideo

func UserDislikeVideo(db *gorm.DB, user *models.User, videoID uint) error

func UserLikeVideo

func UserLikeVideo(db *gorm.DB, user *models.User, videoID uint) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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