db

package
v0.0.0-...-1ef39ee Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MulanPSL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentDel

func CommentDel(cid int64) error

CommentDel 删除评论

func CommentGet

func CommentGet(vid int64) ([]*model.Comment, error)

CommentGet 获取评论

func CommentPush

func CommentPush(uid, vid int64, content string) (*model.Comment, error)

CommentPush 发送评论

func Feed

func Feed(uid int64, ip, ty string, repeat bool) ([]model.Video, error)

Feed 获取视频流

func GetDb

func GetDb() *gorm.DB

func InitDb

func InitDb(d *gorm.DB)

InitDb 初始化数据库服务

func Login

func Login(user, pawd string) (data *model.User, msg string, err error)

Login 登录

func MessageGet

func MessageGet(fid, tid, preTime int64) ([]*model.Message, error)

MessageGet 获取消息列表

func MessagePush

func MessagePush(fid, tid int64, content string) error

MessagePush 发送消息

func Register

func Register(data *model.User) (msg string, err error)

Register 注册

func RelationAction

func RelationAction(fid, tid int64, ActionType int) error

RelationAction 关注/取关

func RelationFollowGet

func RelationFollowGet(uid, tid int64) ([]*model.User, error)

RelationFollowGet 获取关注列表 uid:本人id tid:待查id

func RelationFollowerGet

func RelationFollowerGet(uid, tid int64) ([]*model.User, error)

RelationFollowerGet 获取粉丝列表 uid:本人id tid:待查id

func RelationFriendGet

func RelationFriendGet(uid int64) ([]*model.FriendUser, error)

RelationFriendGet 获取好友列表 uid:本人id tid:待查id

func UserInfo

func UserInfo(id int64) (data model.User, msg string, err error)

UserInfo 获取用户信息

func VideoFollowList

func VideoFollowList(uid int64) ([]*model.Video, error)

VideoFollowList 获取关注作品列表

func VideoLike

func VideoLike(uid, vid int64, _type int) error

VideoLike 视频点赞操作

func VideoLikeList

func VideoLikeList(uid int64) ([]*model.Video, error)

VideoLikeList 获取喜欢列表

func VideoList

func VideoList(uid int64) ([]*model.Video, error)

VideoList 获取作品列表

func VideoUpload

func VideoUpload(uid int64, file multipart.File, PlayUrl, CoverUrl, title, typeOf string, UserCreations []*model.UserCreation) (int64, string, error)

VideoUpload 视频投稿

Types

This section is empty.

Jump to

Keyboard shortcuts

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