# Functions
AddFriendInviteHandler @Summary 邀请加为好友 @Tags 朋友 @Accept json @Produce json @Param jsonRaw body AddFriendInviteRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/friend/invite/add [post].
AddGroupMemberHandler @Summary 增加群成员 @Tags 群组 @Accept json @Produce json @Param jsonRaw body AddGroupMemberRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{data=AddGroupMemberResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/member/add [post].
AuthLoginHandler @Summary 登录 @Tags 认证 @Accept json @Produce json @Param jsonRaw body AuthLoginRequest true "请求JSON数据体" @Success 200 {object} Response{data=AuthLoginResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/auth/login [post].
AuthLogoutHandler 用户登陆请求方法.
AuthRegisterHandler @Summary 注册 @Tags 认证 @Accept json @Produce json @Param jsonRaw body AuthRegisterRequest true "请求JSON数据体" @Success 200 {object} Response{data=AuthRegisterResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/auth/register [post].
CheckAuthMiddleware 检验认证中间件 一般http请求使用的认证中间件,websocket使用 WebsocketMiddleware 方法进行独立鉴权及日志收集.
CORSMiddleware 允许跨域中间件.
CreateGroupHandler @Summary 创建群 @Tags 群组 @Accept json @Produce json @Param jsonRaw body CreateGroupRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{data=CreateGroupResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/create [post].
No description provided by the author
FindFriendHandler @Summary 查找好友 @Tags 朋友 @Accept json @Produce json @Param user_id query int false "用户ID; 'user_id'跟'nickname'必选一个" @Param nickname query int false "用户昵称; 'user_id'跟'nickname'必选一个" @Param start_id query int false "用于搜索下一批用户的起始ID;是上次返回结果中最大的用户ID" @Security APIKeyQuery @Success 200 {object} Response{data=[]User} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/friend/find [get].
GetCaptchaHandler @Summary 登录 @Tags 认证 @Accept json @Produce json @Param type query string true "capthca类型;audio,string,math,chinese,digit" @Success 200 {object} Response{data=GetCaptchaResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/auth/captcha [get].
GetLastChatMessagesHandler @Summary 获取最近的聊天消息 @Tags 聊天 @Accept json @Produce json @Param target_id query int true "目标ID; 朋友ID/群ID/世界频道ID" @Param session_type query int true "会话类型; 1-私人会话;2-群聊会话;99-世界频道会话" @Security APIKeyQuery @Success 200 {object} Response{data=[]ChatMessage} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/chat/message/last [get].
GetProfileInfoHandler 获取个人画像信息.
HTML 返回HTML模板数据.
InitCaptcha 初始化验证码相关配件.
No description provided by the author
InitSubscribe 初始化订阅.
JoinGroupHandler @Summary 加入群 @Tags 群组 @Accept json @Produce json @Param jsonRaw body JoinGroupRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/join [post].
JSON 返回JSON格式的数据.
JSONError 返回JSON格式的错误数据.
JSONP 返回JSONP格式的数据.
JSONPError 返回JSONP格式的错误数据.
LeaveGroupHandler @Summary 离开群 @Tags 群组 @Accept json @Produce json @Param jsonRaw body LeaveGroupRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/leave [post].
LoginUserFromContext 从上下文中获取当前登录的的用户信息 如果通过 checkAuth 方法鉴权过的,下文的 *gin.Context 必能找到用户信息.
MessageInvalidFormat 格式化参数无效错误.
RateLimitMiddleware 请求速率限定中间件.
RecoverMiddleware 回复中间件.
RemoveGroupMemberHandler @Summary 移除群成员 @Tags 群组 @Accept json @Produce json @Param jsonRaw body RemoveGroupMemberRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{data=RemoveGroupMemberResponse} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/member/remove [post].
RequestLogMiddleware 请求日志中间件.
RollbackChatMessageHandler 撤回聊天消息处理方法 @Summary 撤回聊天消息处理方法 @Tags 聊天 @Accept json @Produce json @Param jsonRaw body RollbackChatMessageRequest true "请求JSON数据体" @Security APIKeyQuery @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/chat/message/rollback [post].
SendChatMessageHandler @Summary 发送聊天消息 @Tags 聊天 @Accept json @Produce json @Param jsonRaw body SendChatMessageRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{data=[]ChatMessage} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/chat/message/send [post].
SubscribeChatMessageHandler 接收聊天消息.
SubscribeFriendInviteHandler 订阅好友邀请控制器.
UpdateFriendHandle @Summary 更新朋友信息 // 可进行删除好友,拉黑好友 @Tags 朋友 @Accept json @Produce json @Param jsonRaw body UpdateFriendInviteRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/friend/update [post].
UpdateFriendInviteHandler @Summary 处理好友邀请 @Tags 朋友 @Accept json @Produce json @Param jsonRaw body UpdateFriendInviteRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/friend/invite/update [post].
UpdateGroupHandler @Summary 更新群信息 @Tags 群组 @Accept json @Produce json @Param jsonRaw body UpdateGroupRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/update [post].
UpdateGroupMemberHandler @Summary 更新群成员 @Tags 群组 @Accept json @Produce json @Param jsonRaw body UpdateGroupMemberRequest true "请求JSON数据体" @Security APIKeyHeader @Success 200 {object} Response{} @Failure 400 {object} Response @Failure 404 {object} Response @Failure 500 {object} Response @Router /v1/group/member/update [post].
WebsocketHandler websocket连接处理方法 `/api/ws`.
WebsocketMiddleware websocket用的中间件 因为websocket连接会导致协程阻塞,无法进行到下一步,导致日志也一并堵塞 需要在ctx.Next() 之前调用 日志的send或者msg.
# Constants
No description provided by the author
No description provided by the author
MaxLoginFailTimes 最多登录失败次数.
NeedCaptchaLoginFailTimes 需要验证码的失败登录次数.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AddFriendInviteRequest 邀请用户成为好友操作请求参数 @Description 邀请用户成为好友操作请求参数.
AddGroupMemberRequest 增加群成员请求参数 @Description 增加群成员请求参数.
AddGroupMemberResponse 增加群成员返回参数 @Description 增加群返回请求参数.
AuthLoginRequest @Description 用户登陆请求参数.
AuthLoginResponse 用户登陆返回数据 @Description 用户登陆返回参数.
AuthRegisterRequest @Description 用户注册请求参数.
AuthRegisterResponse @Description 用户注册返回数据.
Captcha 验证码组件.
ChatMessage 消息体 @Description 消息体.
ChatMessageBody 消息主体 @Description 消息主体.
CreateGroupRequest 创建群请求参数 @Description 创建群请求参数.
CreateGroupResponse 创建群返回参数 @Description 创建群返回参数.
FindFriendRequest 查找好友请求参数 @Description 查找好友请求参数.
GetCaptchaRequest @Description 获取验证码请求参数.
GetCaptchaResponse @Description 获取验证码返回数据.
GetLastChatMessagesRequest @Description 获取最后聊天消息列表请求参数.
JoinGroupRequest 入群请求参数 @Description 入群请求参数.
LeaveGroupRequest 离群请求参数 @Description 离群请求参数.
ProfileInfoResponse 个人画像的数据结构.
RedisCaptchaStore 用于存储验证码的Redis结构.
RemoveGroupMemberRequest 移除群成员请求参数 @Description 移除群成员请求参数.
RemoveGroupMemberResponse 移除群成员返回参数 @Description 移除群返回请求参数.
No description provided by the author
RollbackChatMessageRequest 回滚聊天消息请求参数.
SendChatMessageRequest 聊天发送消息请求参数 @Description 聊天发送消息请求参数.
UpdateFriendInviteRequest 更新邀请好友请求 @Description 更新邀请好友请求.
UpdateFriendRequest 更新朋友信息请求参数 @Description 更新朋友信息请求参数.
UpdateGroupMemberRequest @Description 更新群成员信息请求参数.
UpdateGroupRequest 更新群组信息请求 @Description 更新群组信息请求参数.
User @Description 用户信息结构.
UserClaims 用户认证使用的一些解码资料.
WebsocketMessageRequest websocket请求参数.
WebsocketMessageResponse websocket返回数据.