service

package
v0.0.0-...-c93c141 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPasswordLen = 32
View Source
const MaxUsernameLen = 32
View Source
const ResourceBase = "http://47.108.239.8:8085/static/"

ResourceBase 如果映射的域名和改了,需要更改这个配置

Variables

This section is empty.

Functions

func ExampleReadFrameAsJpeg

func ExampleReadFrameAsJpeg(inFileName string, frameNum int) io.Reader

ExampleReadFrameAsJpeg 视频解析成流

Types

type CommentService

type CommentService struct {
}

func NewCommentServiceInstance

func NewCommentServiceInstance() *CommentService

NewCommentServiceInstance 返回一个评论服务类的指针变量,可以方便调用该结构体的方法

func (*CommentService) DoAddCommentAction

func (c *CommentService) DoAddCommentAction(loginUserId, videoId int64, commentText string) (*common.CommentVo, error)

DoAddCommentAction 新增评论功能

func (*CommentService) DoCommentList

func (c *CommentService) DoCommentList(loginUserId, videoId int64) ([]common.CommentVo, error)

DoCommentList 获取评论列表

func (*CommentService) DoDelCommentAction

func (c *CommentService) DoDelCommentAction(loginUserId, videoId, commentId int64) error

DoDelCommentAction 删除评论功能

type FavoriteService

type FavoriteService struct {
}

func NewFavoriteServiceInstance

func NewFavoriteServiceInstance() *FavoriteService

NewFavoriteServiceInstance 返回一个点赞服务类的指针变量,可以方便调用该结构体的方法

func (*FavoriteService) DoFavoriteAction

func (f *FavoriteService) DoFavoriteAction(userId, videoId int64, actionType int32) error

DoFavoriteAction 点赞

func (*FavoriteService) DoFavoriteList

func (f *FavoriteService) DoFavoriteList(userId, loginUserId int64) ([]common.VideoVo, error)

DoFavoriteList 获取点赞列表

type FeedService

type FeedService struct {
}

func NewFeedServiceInstance

func NewFeedServiceInstance() *FeedService

NewFeedServiceInstance 返回一个视频流服务类的指针变量,可以方便调用该结构体的方法

func (*FeedService) DoFeed

func (f *FeedService) DoFeed(loginUserId int64, latestTime string) ([]common.VideoVo, error)

DoFeed 获取视频流

type PublishService

type PublishService struct {
}

func NewPublishServiceInstance

func NewPublishServiceInstance() *PublishService

NewPublishServiceInstance 返回一个发布视频服务类的指针变量,可以方便调用该结构体的方法

func (*PublishService) DoPublishList

func (p *PublishService) DoPublishList(userId, loginUserId int64) ([]common.VideoVo, error)

DoPublishList 发布视频列表

func (*PublishService) DoPublishVideo

func (p *PublishService) DoPublishVideo(c *gin.Context, title string, userId int64) error

DoPublishVideo 发布视频

type RelationService

type RelationService struct {
}

func NewRelationServiceInstance

func NewRelationServiceInstance() *RelationService

NewRelationServiceInstance 返回一个关注服务类的指针变量,可以方便调用该结构体的方法

func (*RelationService) DoRelationAction

func (r *RelationService) DoRelationAction(userId, toUserId, actionType int64) error

DoRelationAction 关注

func (*RelationService) DoRelationFollowList

func (r *RelationService) DoRelationFollowList(userId, loginUserId int64) ([]common.UserVo, error)

DoRelationFollowList 获取关注列表

func (*RelationService) DoRelationFollowerList

func (r *RelationService) DoRelationFollowerList(userId, loginUserId int64) ([]common.UserVo, error)

DoRelationFollowerList 获取粉丝列表

type UserService

type UserService struct {
}

func NewUserServiceInstance

func NewUserServiceInstance() *UserService

NewUserServiceInstance 返回一个用户服务类的指针变量,可以方便调用该结构体的方法

func (*UserService) DoLogin

func (u *UserService) DoLogin(userName, password string) (*repository.User, string, error)

DoLogin 登录

func (*UserService) DoRegister

func (u *UserService) DoRegister(userName, password string) (int64, string, error)

DoRegister 注册

func (*UserService) DoUserInfo

func (u *UserService) DoUserInfo(userId, loginUserId int64) (*common.UserVo, error)

DoUserInfo 获取用户信息

Jump to

Keyboard shortcuts

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