handler

package
v0.0.0-...-efbc704 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserClient

func UserClient() *pb.UserServiceClient

func VideoClient

func VideoClient() *pb.VideoServiceClient

Types

type GetUserInfoResponse

type GetUserInfoResponse struct {
	StatusCode int64    `json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  *string  `json:"status_msg"`  // 返回状态描述
	User       *pb.User `json:"user"`        // 用户信息
}

type GetVideoFlowResponse

type GetVideoFlowResponse struct {
	NextTime   *int64      `json:"next_time"`   // 本次返回的视频中,发布最早的时间,作为下次请求时的latest_time
	StatusCode int64       `json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  *string     `json:"status_msg"`  // 返回状态描述
	VideoList  []*pb.Video `json:"video_list"`  // 视频列表
}

type RegisterResponse

type RegisterResponse struct {
	StatusCode int64  `json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  string `json:"status_msg"`  // 返回状态描述
	Token      string `json:"token"`       // 用户鉴权token
	UserID     int64  `json:"user_id"`     // 用户id
}

type SendMessageRequest

type SendMessageRequest struct {
	ActionType string `json:"action_type"` // 1-发送消息
	Content    string `json:"content"`     // 消息内容
	ToUserID   string `json:"to_user_id"`  // 对方用户id
	Token      string `json:"token"`       // 用户鉴权token
}

type ServiceHandler

type ServiceHandler struct {
	// contains filtered or unexported fields
}

func (*ServiceHandler) CommentVideo

func (h *ServiceHandler) CommentVideo(c *gin.Context)

评论视频和删除评论

func (*ServiceHandler) FollowOrCancel

func (h *ServiceHandler) FollowOrCancel(c *gin.Context)

关注或取消关注

func (*ServiceHandler) GetChatMessages

func (h *ServiceHandler) GetChatMessages(c *gin.Context)

获取聊天记录

func (*ServiceHandler) GetFollowers

func (h *ServiceHandler) GetFollowers(c *gin.Context)

获取用户粉丝列表

func (*ServiceHandler) GetFollowings

func (h *ServiceHandler) GetFollowings(c *gin.Context)

获取用户关注列表

func (*ServiceHandler) GetFriends

func (h *ServiceHandler) GetFriends(c *gin.Context)

获取用户好友列表

func (*ServiceHandler) GetUserInfo

func (h *ServiceHandler) GetUserInfo(c *gin.Context)

处理获取用户信息请求

func (*ServiceHandler) GetUserLike

func (h *ServiceHandler) GetUserLike(c *gin.Context)

获取用户点赞的视频列表

func (*ServiceHandler) GetUserVideoList

func (h *ServiceHandler) GetUserVideoList(c *gin.Context)

处理获取用户视频列表请求

func (*ServiceHandler) GetVideoComment

func (h *ServiceHandler) GetVideoComment(c *gin.Context)

获取视频评论列表

func (*ServiceHandler) GetVideoFlow

func (h *ServiceHandler) GetVideoFlow(c *gin.Context)

func (*ServiceHandler) LikeVideo

func (h *ServiceHandler) LikeVideo(c *gin.Context)

点赞视频和取消点赞

func (*ServiceHandler) Login

func (h *ServiceHandler) Login(c *gin.Context)

处理登录请求

func (*ServiceHandler) PublishVideo

func (h *ServiceHandler) PublishVideo(c *gin.Context)

func (*ServiceHandler) Register

func (h *ServiceHandler) Register(c *gin.Context)

处理注册请求

func (*ServiceHandler) SendMessage

func (h *ServiceHandler) SendMessage(c *gin.Context)

发送消息

Jump to

Keyboard shortcuts

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