operation

package
v0.0.0-...-18974b4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteComment

func DeleteComment(ctx context.Context, commentId int64, videoId int64, userId int64) (err error)

func FavoriteAction

func FavoriteAction(ctx context.Context, userId int64, videoId int64, isFavorite bool) (err error)

func FollowAction

func FollowAction(ctx context.Context, userId int64, toUserId int64) (err error)

func GetFavoriteCount

func GetFavoriteCount(ctx context.Context, userId int64) (count int64, err error)

func GetWorkCount

func GetWorkCount(ctx context.Context, userId int64) (count int64, err error)

func IsFavorite

func IsFavorite(ctx context.Context, userId int64, videoId int64) (res bool, err error)

func IsFollow

func IsFollow(ctx context.Context, userId int64, followerId int64) (res bool, err error)

func PublishVideo

func PublishVideo(ctx context.Context, info *TVideoInfo, data []byte, objName string) (err error)

func SendMessage

func SendMessage(ctx context.Context, userId int64, toUserId int64, context string, sendTime time.Time) (err error)

func UnfollowAction

func UnfollowAction(ctx context.Context, userId int64, toUserId int64) (err error)

func WriteUserInfo

func WriteUserInfo(ctx context.Context, info *TUserInfo) (userId int64, err error)

Types

type PublicAttr

type PublicAttr struct {
	Id          int64
	GmtModified time.Time `gorm:"autoUpdateTime"`
}

type TComment

type TComment struct {
	UserId     int64
	VideoId    int64
	Content    string
	GmtCreated time.Time
	PublicAttr
}

func GetCommentList

func GetCommentList(ctx context.Context, videoId int64) (comments []TComment, err error)

func PublishComment

func PublishComment(ctx context.Context, input TComment) (comment TComment, err error)

type TFollowList

type TFollowList struct {
	UserId     int64
	FollowerId int64
	Status     bool
	PublicAttr
}

func GetFollowList

func GetFollowList(ctx context.Context, userId int64) (list []TFollowList, err error)

func GetFollowerList

func GetFollowerList(ctx context.Context, userId int64) (list []TFollowList, err error)

func GetFriendList

func GetFriendList(ctx context.Context, userId int64) (list []TFollowList, err error)

type TLikedVideo

type TLikedVideo struct {
	UserId  int64
	VideoId int64
	PublicAttr
}

type TMessage

type TMessage struct {
	UserId   int64
	ToUserId int64
	Content  string
	SendTime time.Time
	PublicAttr
}

func GetMessage

func GetMessage(ctx context.Context, userId int64, friendId int64, latestTime int64) (list []TMessage, err error)

type TUserInfo

type TUserInfo struct {
	Username      string
	Password      string
	FollowCount   int64
	FollowerCount int64
	PublicAttr
}

func GetUser

func GetUser(ctx context.Context, queryId int64) (user TUserInfo, err error)

func GetUserByName

func GetUserByName(ctx context.Context, username string) (user *TUserInfo, err error)

type TVideoInfo

type TVideoInfo struct {
	AuthorId      int64
	PublishTime   time.Time
	CoverUrl      string
	PlayUrl       string
	FavoriteCount int64
	CommentCount  int64
	Title         string
	PublicAttr
}

func GetFavoriteList

func GetFavoriteList(ctx context.Context, userId int64) (list []TVideoInfo, err error)

func GetVideoById

func GetVideoById(ctx context.Context, id int64) (list []TVideoInfo, err error)

func GetVideoList

func GetVideoList(ctx context.Context, latestTime int64) (list []TVideoInfo, err error)

Jump to

Keyboard shortcuts

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