diff --git a/.gitignore b/.gitignore
index 3390267f4..48cdc7f72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,12 +8,10 @@ out-test
.idea
-deploy/open_im_demo
deploy/open_im_api
deploy/open_im_msg_gateway
deploy/open_im_msg_transfer
deploy/open_im_push
-deploy/open_im_timer_task
deploy/open_im_rpc_user
deploy/open_im_rpc_friend
deploy/open_im_rpc_group
diff --git a/cmd/api/docs/docs.go b/cmd/api/docs/docs.go
deleted file mode 100644
index ab8190440..000000000
--- a/cmd/api/docs/docs.go
+++ /dev/null
@@ -1,8568 +0,0 @@
-// Package docs GENERATED BY SWAG; DO NOT EDIT
-// This file was generated by swaggo/swag
-package docs
-
-import "github.com/swaggo/swag"
-
-const docTemplate = `{
- "schemes": {{ marshal .Schemes }},
- "swagger": "2.0",
- "info": {
- "description": "{{escape .Description}}",
- "title": "{{.Title}}",
- "contact": {},
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/auth/force_logout": {
- "post": {
- "description": "对应的平台强制登出",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "强制登出",
- "operationId": "ForceLogout",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "platform为平台ID \u003cbr\u003e fromUserID为要执行强制登出的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ForceLogoutReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.ForceLogoutResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/parse_token": {
- "post": {
- "description": "解析当前用户token(token在请求头中传入)",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "解析当前用户token",
- "operationId": "ParseToken",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段\u003cbr\u003eplatform为平台ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ParseTokenReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ParseTokenResp"
- },
- {
- "type": "object",
- "properties": {
- "Map": {
- "$ref": "#/definitions/api_struct.ExpireTime"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/user_register": {
- "post": {
- "description": "用户注册",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "用户注册",
- "operationId": "UserRegister",
- "parameters": [
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UserRegisterReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UserRegisterResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/user_token": {
- "post": {
- "description": "获取用户的token",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "用户登录",
- "operationId": "UserToken",
- "parameters": [
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UserTokenReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UserTokenResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_black": {
- "post": {
- "description": "添加黑名单",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "添加黑名单",
- "operationId": "AddBlack",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为设置的用户 \u003cbr\u003e toUserID为被设置的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddBlacklistReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddBlacklistResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_friend": {
- "post": {
- "description": "添加好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "添加好友",
- "operationId": "AddFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "reqMsg为申请信息 \u003cbr\u003e fromUserID为申请用户 \u003cbr\u003e toUserID为被添加用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_friend_response": {
- "post": {
- "description": "同意/拒绝好友请求",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "同意/拒绝好友请求",
- "operationId": "AddFriendResponse",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID同意/拒绝的用户ID\u003cbr\u003etoUserID为申请用户D\u003cbr\u003ehandleMsg为处理信息\u003cbr\u003eflag为具体操作, 1为同意, 2为拒绝",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResponseReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResponseResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/delete_friend": {
- "post": {
- "description": "删除好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "删除好友",
- "operationId": "DeleteFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为操作用户\u003cbr\u003etoUserID为被删除用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/get_black_list": {
- "post": {
- "description": "获取黑名单列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取黑名单列表",
- "operationId": "GetBlacklist",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID要获取黑名单的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetBlackListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetBlackListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- }
- }
- }
- },
- "/friend/get_friend_apply_list": {
- "post": {
- "description": "删除好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取好友申请列表",
- "operationId": "GetFriendApplyList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取申请列表的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetFriendApplyListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetFriendApplyListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- }
- }
- }
- },
- "/friend/get_friend_list": {
- "post": {
- "description": "获取用户的好友列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取用户的好友列表",
- "operationId": "GetFriendList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取好友列表的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetFriendListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetFriendListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/get_self_friend_apply_list": {
- "post": {
- "description": "获取自己的好友申请列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取自己的好友申请列表",
- "operationId": "GetSelfFriendApplyList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为自己的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSelfApplyListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSelfApplyListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/import_friend": {
- "post": {
- "description": "批量加好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "批量加好友",
- "operationId": "ImportFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID批量加好友的用户ID\u003cbr\u003e friendUserIDList为",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ImportFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "data列表中对象的result-1为添加该用户失败\u003cbr\u003e0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.ImportFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/is_friend": {
- "post": {
- "description": "检查用户之间是否为好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "检查用户之间是否为好友",
- "operationId": "IsFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为请求用户\u003cbr\u003e toUserID为要检查的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.IsFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.IsFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/remove_black": {
- "post": {
- "description": "把用户移除黑名单",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "把用户移除黑名单",
- "operationId": "RemoveBlack",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID要获取黑名单的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.RemoveBlackListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.RemoveBlackListResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/set_friend_remark": {
- "post": {
- "description": "设置好友备注",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "设置好友备注",
- "operationId": "SetFriendRemark",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为设置的用户\u003cbr\u003e toUserID为被设置的用户\u003cbr\u003e remark为好友备注",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetFriendRemarkReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetFriendRemarkResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/cancel_mute_group": {
- "post": {
- "description": "取消禁言群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "取消禁言群组",
- "operationId": "CancelMuteGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/cancel_mute_group_member": {
- "post": {
- "description": "取消禁言群成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "取消禁言群成员",
- "operationId": "CancelMuteGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID \u003cbr\u003e userID为要取消禁言的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/create_group": {
- "post": {
- "description": "创建群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "创建群组",
- "operationId": "CreateGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupType这里填0代表普通群 \u003cbr\u003egroupName为群名称\u003cbr\u003e introduction为群介绍\u003cbr\u003e notification为群公共\u003cbr\u003eownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.CreateGroupResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/dismiss_group": {
- "post": {
- "description": "解散群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "解散群组",
- "operationId": "DismissGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要解散的群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_group_all_member_list": {
- "post": {
- "description": "获取全部群成员列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取全部群成员列表",
- "operationId": "GetGroupAllMemberList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要获取群成员的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupAllMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupAllMemberResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupMemberFullInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_group_members_info": {
- "post": {
- "description": "获取群成员信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取群成员信息",
- "operationId": "GetGroupMembersInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要获取的群ID \u003cbr\u003e memberList为要获取群成员的群ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupMembersInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupMembersInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupMemberFullInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_groups_info": {
- "post": {
- "description": "通过群ID列表获取群信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "通过群ID列表获取群信息",
- "operationId": "GetGroupsInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupIDList为群ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_joined_group_list": {
- "post": {
- "description": "获取用户加入群列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户加入群列表",
- "operationId": "FindJoinedGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetJoinedGroupListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetJoinedGroupListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_recv_group_applicationList": {
- "post": {
- "description": "获取用户收到的加群信息列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户收到的加群信息列表",
- "operationId": "GetRecvGroupApplicationList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_user_req_group_applicationList": {
- "post": {
- "description": "获取用户加群申请列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户加群申请列表",
- "operationId": "GetUserReqGroupApplicationList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserReqGroupApplicationListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/group_application_response": {
- "post": {
- "description": "处理加群消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "处理加群消息",
- "operationId": "ApplicationGroupResponse",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要处理的群ID \u003cbr\u003e fromUserID为要处理的用户ID \u003cbr\u003e handleMsg为处理结果信息 \u003cbr\u003e handleResult为处理结果 1为同意加群 2为拒绝加群",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ApplicationGroupResponseReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.ApplicationGroupResponseResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/invite_user_to_group": {
- "post": {
- "description": "将用户拉入群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "将用户拉入群组",
- "operationId": "InviteUserToGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要拉进的群组ID \u003cbr\u003e invitedUserIDList为要获取群成员的群ID列表 \u003cbr\u003e reason为原因",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.InviteUserToGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "result为结果码, -1为失败, 0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.InviteUserToGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/join_group": {
- "post": {
- "description": "加入群聊",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "加入群聊",
- "operationId": "JoinGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "reqMessage为申请进群信息\u003cbr\u003egroupID为申请的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.JoinGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.JoinGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/kick_group": {
- "post": {
- "description": "把用户踢出群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "把用户踢出群组",
- "operationId": "KickGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要操作的群ID \u003cbr\u003e kickedUserIDList为要踢出的群用户ID \u003cbr\u003e reason为原因",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.KickGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "result为结果码, -1为失败, 0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.KickGroupMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/mute_group": {
- "post": {
- "description": "禁言群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "禁言群组",
- "operationId": "MuteGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- }
- }
- }
- },
- "/group/mute_group_member": {
- "post": {
- "description": "禁言群成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "禁言群成员",
- "operationId": "MuteGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID \u003cbr\u003e userID为要禁言的用户ID \u003cbr\u003e mutedSeconds为禁言秒数",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/quit_group": {
- "post": {
- "description": "当前用户退出群聊",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "当前用户退出群聊",
- "operationId": "QuitGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要退出的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.QuitGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.QuitGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/set_group_info": {
- "post": {
- "description": "设置群信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "设置群信息",
- "operationId": "SetGroupInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要修改的群ID\u003cbr\u003egroupName为新的群名称\u003cbr\u003enotification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/set_group_member_info": {
- "post": {
- "description": "修改群成员信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "修改群成员信息",
- "operationId": "SetGroupMemberInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "除了operationID, userID, groupID其他参数可选\u003cbr\u003eex为拓展字段\u003cbr\u003efaceURL为群头像\u003cbr\u003enickName为群昵称\u003cbr\u003eroleLevel为群员角色,1为普通用户 2为群主 3为管理员",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupMemberInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupMemberInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/transfer_group": {
- "post": {
- "description": "转让群主",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "转让群主",
- "operationId": "TransferGroupOwner",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要操作的群ID \u003cbr\u003e oldOwnerUserID为老群主ID \u003cbr\u003e newOwnerUserID为新群主ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.TransferGroupOwnerReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.TransferGroupOwnerResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/batch_send_msg": {
- "post": {
- "description": "管理员批量发送群聊单聊消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "管理员批量发送群聊单聊消息",
- "operationId": "ManagementBatchSendMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
- "name": "管理员批量发送单聊消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
- "name": "管理员批量发送OA通知",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
- }
- }
- }
- ]
- }
- }
- ],
- "responses": {
- "0": {
- "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- }
- }
- }
- },
- "/msg/clear_msg": {
- "post": {
- "description": "清空用户消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "清空用户消息",
- "operationId": "ClearMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要清空的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CleanUpMsgReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CleanUpMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/del_msg": {
- "post": {
- "description": "根据seq列表删除消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "根据seq列表删除消息",
- "operationId": "DelMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要删除的用户ID \u003cbr\u003e seqList为seq列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DelMsgReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DelMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_all_conversations": {
- "post": {
- "description": "获取用户所有会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "获取用户所有会话",
- "operationId": "GetAllConversations",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllConversationsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllConversationsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_conversation": {
- "post": {
- "description": "根据会话ID获取会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "根据会话ID获取会话",
- "operationId": "GetConversation",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationID为要获取的会话ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_conversations": {
- "post": {
- "description": "根据会话ID列表获取会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "根据会话ID列表获取会话",
- "operationId": "GetConversations",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationIDs为要获取的会话ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/manage_send_msg": {
- "post": {
- "description": "管理员发送/撤回消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "管理员发送/撤回消息",
- "operationId": "ManagementSendMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员发送文字消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员发送OA通知消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员撤回单聊消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.RevokeElem"
- }
- }
- }
- ]
- }
- }
- ],
- "responses": {
- "0": {
- "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- }
- }
- }
- },
- "/office/comment_one_work_moment": {
- "post": {
- "description": "评论一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "评论一条工作圈",
- "operationId": "CommentOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CommentOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CommentOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/create_one_work_moment": {
- "post": {
- "description": "用户创建一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "创建一条工作圈",
- "operationId": "CreateOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求 atUserList likeUserList permissionGroupList permissionUserList 字段中userName可以不填",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/create_tag": {
- "post": {
- "description": "创建标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "创建标签",
- "operationId": "CreateTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_comment": {
- "post": {
- "description": "删除一条评论",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "删除一条评论",
- "operationId": "DeleteComment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteCommentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteCommentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_one_work_moment": {
- "post": {
- "description": "根据用户工作圈ID删除一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "删除一条工作圈",
- "operationId": "DeleteOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_tag": {
- "post": {
- "description": "根据标签ID创建标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "删除标签",
- "operationId": "DeleteTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_send_tag_log": {
- "post": {
- "description": "分页获取发送历史记录",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取发送历史记录",
- "operationId": "GetTagSendLogs",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetTagSendLogsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetTagSendLogsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_friend_work_moments": {
- "post": {
- "description": "查询用户工作圈页面",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "查询自己大工作圈页面",
- "operationId": "GetUserFriendWorkMoments",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserFriendWorkMomentsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserFriendWorkMomentsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_tag_by_id": {
- "post": {
- "description": "通过标签id获取该用户的标签信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取该用户的标签信息",
- "operationId": "GetUserTagByID",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagByIDReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagByIDResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_tags": {
- "post": {
- "description": "用户获取自己的所有的标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取用户标签信息",
- "operationId": "GetUserTags",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_work_moments": {
- "post": {
- "description": "查询用户工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "查询用户工作圈",
- "operationId": "GetUserWorkMoments",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserWorkMomentsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserWorkMomentsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_work_moment_by_id": {
- "post": {
- "description": "通过ID获取工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "通过ID获取工作圈",
- "operationId": "GetWorkMomentByID",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetWorkMomentByIDReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetWorkMomentByIDResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/like_one_work_moment": {
- "post": {
- "description": "工作圈ID点赞一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "点赞一条工作圈",
- "operationId": "LikeOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.LikeOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.LikeOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/send_msg_to_tag": {
- "post": {
- "description": "对标签用户发送消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "发送标签消息",
- "operationId": "SendMsg2Tag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SendMsg2TagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SendMsg2TagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/set_tag": {
- "post": {
- "description": "根据标签ID修改标签用户列表, 名称",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "修改标签",
- "operationId": "SetTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_department": {
- "post": {
- "description": "创建部门",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "创建部门",
- "operationId": "CreateDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.CreateDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.Department"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_department_member": {
- "post": {
- "description": "创建部门用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "创建部门用户",
- "operationId": "CreateDepartmentMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_organization_user": {
- "post": {
- "description": "组织架构导入用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "组织架构导入用户",
- "operationId": "CreateOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_department": {
- "post": {
- "description": "删除部门",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除部门",
- "operationId": "DeleteDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_organization_user": {
- "post": {
- "description": "删除组织架构中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除组织架构中某个用户",
- "operationId": "DeleteOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_user_in_department": {
- "post": {
- "description": "删除部门中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除部门中某个用户",
- "operationId": "DeleteUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteUserInDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_department_member": {
- "post": {
- "description": "获取部门中所有成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取部门中所有成员",
- "operationId": "GetDepartmentMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetDepartmentMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetDepartmentMemberResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.UserDepartmentMember"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_sub_department": {
- "post": {
- "description": "获取子部门列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取子部门列表",
- "operationId": "GetSubDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSubDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSubDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.Department"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_user_in_department": {
- "post": {
- "description": "获取部门中的所有用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取部门中的所有用户",
- "operationId": "GetUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetUserInDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserInDepartment"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_department": {
- "post": {
- "description": "更新部门信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新部门信息",
- "operationId": "UpdateDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_organization_user": {
- "post": {
- "description": "更新组织架构中的用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新组织架构中的用户",
- "operationId": "UpdateOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_user_in_department": {
- "post": {
- "description": "更新部门中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新部门中某个用户",
- "operationId": "UpdateUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/third/minio_upload": {
- "post": {
- "description": "minio上传文件(web api), 请注意本api请求为form并非json",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "第三方服务相关"
- ],
- "summary": "minio上传文件(web api)",
- "operationId": "MinioUploadFile",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "type": "file",
- "description": "要上传的文件文件",
- "name": "file",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "文件类型",
- "name": "fileType",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "操作唯一ID",
- "name": "operationID",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.MinioUploadFileResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/account_check": {
- "post": {
- "description": "传入UserIDList检查列表账户注册状态,并且返回结果",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "检查列表账户注册状态,并且返回结果",
- "operationId": "AccountCheck",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AccountCheckReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AccountCheckResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_all_users_uid": {
- "post": {
- "description": "获取所有用户uid列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取所有用户uid列表",
- "operationId": "GetAllUsersUid",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllUsersUidReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllUsersUidResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_self_user_info": {
- "post": {
- "description": "传入ID获取自己的信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取自己的信息",
- "operationId": "GetSelfUserInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSelfUserInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSelfUserInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_users_info": {
- "post": {
- "description": "根据用户列表批量获取用户信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取用户信息",
- "operationId": "GetUsersInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetUsersInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "Map": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_users_online_status": {
- "post": {
- "description": "获取用户在线状态",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取用户在线状态",
- "operationId": "GetUsersOnlineStatus",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersOnlineStatusReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersOnlineStatusResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/set_global_msg_recv_opt": {
- "post": {
- "description": "设置全局免打扰",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "设置全局免打扰",
- "operationId": "SetGlobalRecvMessageOpt",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGlobalRecvMessageOptReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGlobalRecvMessageOptResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/update_user_info": {
- "post": {
- "description": "修改用户信息 userID faceURL等",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "修改用户信息",
- "operationId": "UpdateUserInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateSelfUserInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "Open_IM_internal_api_manage.FileElem": {
- "type": "object",
- "properties": {
- "fileName": {
- "type": "string"
- },
- "filePath": {
- "type": "string"
- },
- "fileSize": {
- "type": "integer"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.OANotificationElem": {
- "type": "object",
- "required": [
- "notificationName",
- "notificationType",
- "text"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "fileElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.FileElem"
- },
- "mixType": {
- "type": "integer"
- },
- "notificationFaceURL": {
- "type": "string"
- },
- "notificationName": {
- "type": "string"
- },
- "notificationType": {
- "type": "integer"
- },
- "pictureElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureElem"
- },
- "soundElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.SoundElem"
- },
- "text": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "videoElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.VideoElem"
- }
- }
- },
- "Open_IM_internal_api_manage.PictureBaseInfo": {
- "type": "object",
- "properties": {
- "height": {
- "type": "integer"
- },
- "size": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- }
- }
- },
- "Open_IM_internal_api_manage.PictureElem": {
- "type": "object",
- "properties": {
- "bigPicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- },
- "snapshotPicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- },
- "sourcePath": {
- "type": "string"
- },
- "sourcePicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- }
- }
- },
- "Open_IM_internal_api_manage.RevokeElem": {
- "type": "object",
- "required": [
- "revokeMsgClientID"
- ],
- "properties": {
- "revokeMsgClientID": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.SoundElem": {
- "type": "object",
- "properties": {
- "dataSize": {
- "type": "integer"
- },
- "duration": {
- "type": "integer"
- },
- "soundPath": {
- "type": "string"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.TextElem": {
- "type": "object",
- "required": [
- "text"
- ],
- "properties": {
- "text": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.VideoElem": {
- "type": "object",
- "properties": {
- "duration": {
- "type": "integer"
- },
- "snapshotHeight": {
- "type": "integer"
- },
- "snapshotPath": {
- "type": "string"
- },
- "snapshotSize": {
- "type": "integer"
- },
- "snapshotURL": {
- "type": "string"
- },
- "snapshotUUID": {
- "type": "string"
- },
- "snapshotWidth": {
- "type": "integer"
- },
- "videoPath": {
- "type": "string"
- },
- "videoSize": {
- "type": "integer"
- },
- "videoType": {
- "type": "string"
- },
- "videoURL": {
- "type": "string"
- },
- "videoUUID": {
- "type": "string"
- }
- }
- },
- "api_struct.AccountCheckReq": {
- "type": "object",
- "required": [
- "checkUserIDList",
- "operationID"
- ],
- "properties": {
- "checkUserIDList": {
- "type": "array",
- "maxItems": 100,
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.AccountCheckResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/user.AccountCheckResp_SingleUserStatus"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddBlacklistReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddBlacklistResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "reqMsg": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResponseReq": {
- "type": "object",
- "required": [
- "flag",
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "flag": {
- "type": "integer",
- "enum": [
- -1,
- 0,
- 1
- ]
- },
- "fromUserID": {
- "type": "string"
- },
- "handleMsg": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResponseResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ApplicationGroupResponseReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "groupID",
- "handleResult",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "description": "application from FromUserID",
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer",
- "enum": [
- -1,
- 1
- ]
- },
- "handledMsg": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ApplicationGroupResponseResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID",
- "userID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CleanUpMsgReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CleanUpMsgResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Comment": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "contentID": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "replyUserID": {
- "type": "string"
- },
- "replyUserName": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "api_struct.CommentOneWorkMomentReq": {
- "type": "object",
- "required": [
- "content",
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "content": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "replyUserID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.CommentOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Conversation": {
- "type": "object",
- "required": [
- "conversationID",
- "conversationType",
- "ownerUserID"
- ],
- "properties": {
- "attachedInfo": {
- "type": "string"
- },
- "conversationID": {
- "type": "string"
- },
- "conversationType": {
- "type": "integer"
- },
- "draftTextTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "groupAtType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isNotInGroup": {
- "type": "boolean"
- },
- "isPinned": {
- "type": "boolean"
- },
- "isPrivateChat": {
- "type": "boolean"
- },
- "ownerUserID": {
- "type": "string"
- },
- "recvMsgOpt": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "unreadCount": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentMemberReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "api_struct.CreateDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateGroupReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "groupType": {
- "type": "integer"
- },
- "introduction": {
- "type": "string"
- },
- "memberList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.GroupAddMemberInfo"
- }
- },
- "notification": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOneWorkMomentReq": {
- "type": "object",
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMoment": {
- "$ref": "#/definitions/office.WorkMoment"
- }
- }
- },
- "api_struct.CreateOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagName",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagName": {
- "description": "tag名称",
- "type": "string"
- },
- "userIDList": {
- "description": "用户ID列表",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.CreateTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DelMsgReq": {
- "type": "object",
- "required": [
- "operationID",
- "seqList",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "seqList": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DelMsgResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteCommentReq": {
- "type": "object",
- "required": [
- "contentID",
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "contentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteCommentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteFriendResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOneWorkMomentReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteUserInDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID",
- "userID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DismissGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.DismissGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ExpireTime": {
- "type": "object",
- "properties": {
- "expireTimeSeconds": {
- "type": "integer"
- }
- }
- },
- "api_struct.ForceLogoutReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "platform"
- ],
- "properties": {
- "fromUserID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "platform": {
- "type": "integer",
- "maximum": 8,
- "minimum": 1
- }
- }
- },
- "api_struct.ForceLogoutResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllConversationsReq": {
- "type": "object",
- "required": [
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllConversationsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Conversation"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllUsersUidReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllUsersUidResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetBlackListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetBlackListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationReq": {
- "type": "object",
- "required": [
- "conversationID",
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "conversationID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.Conversation"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationsReq": {
- "type": "object",
- "required": [
- "conversationIDs",
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "conversationIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Conversation"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetDepartmentMemberReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetDepartmentMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendApplyListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendApplyListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupAllMemberReq": {
- "type": "object",
- "required": [
- "count",
- "groupID",
- "offset",
- "operationID"
- ],
- "properties": {
- "count": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "offset": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupAllMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupApplicationListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "description": "作为管理员或群主收到的 进群申请",
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupApplicationListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupInfoReq": {
- "type": "object",
- "required": [
- "groupIDList",
- "operationID"
- ],
- "properties": {
- "groupIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupMembersInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "memberList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "memberList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupMembersInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetJoinedGroupListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetJoinedGroupListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfApplyListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfApplyListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfUserInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfUserInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSubDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSubDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetTagSendLogsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "api_struct.GetTagSendLogsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "logs": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagSendLog"
- }
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserFriendWorkMomentsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "api_struct.GetUserFriendWorkMomentsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "workMoments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserInDepartmentReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserReqGroupApplicationListReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagByIDReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagByIDResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "tag": {
- "$ref": "#/definitions/office.Tag"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagsReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "tags": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.Tag"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserWorkMomentsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserWorkMomentsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "workMoments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUsersInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.GetUsersInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUsersOnlineStatusReq": {
- "type": "object",
- "required": [
- "operationID",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userIDList": {
- "type": "array",
- "maxItems": 200,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.GetUsersOnlineStatusResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetWorkMomentByIDReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetWorkMomentByIDResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "workMoment": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GroupAddMemberInfo": {
- "type": "object",
- "required": [
- "roleLevel",
- "userID"
- ],
- "properties": {
- "roleLevel": {
- "type": "integer",
- "enum": [
- 1,
- 3
- ]
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.ImportFriendReq": {
- "type": "object",
- "required": [
- "friendUserIDList",
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "friendUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ImportFriendResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.InviteUserToGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "invitedUserIDList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "invitedUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- }
- },
- "api_struct.InviteUserToGroupResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.IsFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.IsFriendResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.Response"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.JoinGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "reqMessage": {
- "type": "string"
- }
- }
- },
- "api_struct.JoinGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.KickGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "kickedUserIDList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "kickedUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- }
- },
- "api_struct.KickGroupMemberResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.LikeOneWorkMomentReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.LikeOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ManagementBatchSendMsgReq": {
- "type": "object",
- "required": [
- "contentType",
- "operationID",
- "sendID",
- "sessionType"
- ],
- "properties": {
- "businessOperationID": {
- "type": "string"
- },
- "contentType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isOnlineOnly": {
- "type": "boolean"
- },
- "notOfflinePush": {
- "type": "boolean"
- },
- "offlinePushInfo": {
- "$ref": "#/definitions/sdkws.OfflinePushInfo"
- },
- "operationID": {
- "type": "string"
- },
- "recvIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "sendID": {
- "type": "string"
- },
- "senderFaceURL": {
- "type": "string"
- },
- "senderNickname": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "sessionType": {
- "type": "integer"
- }
- }
- },
- "api_struct.ManagementSendMsgReq": {
- "type": "object",
- "required": [
- "contentType",
- "operationID",
- "sendID",
- "sessionType"
- ],
- "properties": {
- "businessOperationID": {
- "type": "string"
- },
- "contentType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isOnlineOnly": {
- "type": "boolean"
- },
- "notOfflinePush": {
- "type": "boolean"
- },
- "offlinePushInfo": {
- "$ref": "#/definitions/sdkws.OfflinePushInfo"
- },
- "operationID": {
- "type": "string"
- },
- "recvID": {
- "type": "string"
- },
- "sendID": {
- "type": "string"
- },
- "senderFaceURL": {
- "type": "string"
- },
- "senderNickname": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "sessionType": {
- "type": "integer"
- }
- }
- },
- "api_struct.ManagementSendMsgResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserSendMsgResp"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.MinioUploadFileResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "URL": {
- "type": "string"
- },
- "newName": {
- "type": "string"
- },
- "snapshotName": {
- "type": "string"
- },
- "snapshotURL": {
- "type": "string"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "mutedSeconds",
- "operationID",
- "userID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "mutedSeconds": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ParseTokenReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ParseTokenResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.QuitGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.QuitGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.RemoveBlackListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.RemoveBlackListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Response": {
- "type": "object",
- "properties": {
- "isFriend": {
- "type": "boolean"
- }
- }
- },
- "api_struct.SendMsg2TagReq": {
- "type": "object",
- "required": [
- "content",
- "operationID",
- "senderPlatformID"
- ],
- "properties": {
- "content": {
- "type": "string"
- },
- "groupList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "tagList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "userList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.SendMsg2TagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetFriendRemarkReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "remark": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetFriendRemarkResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGlobalRecvMessageOptReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "globalRecvMsgOpt": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGlobalRecvMessageOptResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "applyMemberFriend": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "introduction": {
- "type": "string"
- },
- "lookMemberInfo": {
- "type": "integer"
- },
- "needVerification": {
- "type": "integer"
- },
- "notification": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupMemberInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID",
- "userID"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "roleLevel": {
- "type": "integer",
- "maximum": 3,
- "minimum": 1
- },
- "userGroupFaceUrl": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupMemberInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "increaseUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "newName": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "reduceUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Swagger400Resp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer",
- "example": 400
- },
- "errMsg": {
- "type": "string",
- "example": "err msg"
- }
- }
- },
- "api_struct.Swagger500Resp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer",
- "example": 500
- },
- "errMsg": {
- "type": "string",
- "example": "err msg"
- }
- }
- },
- "api_struct.TransferGroupOwnerReq": {
- "type": "object",
- "required": [
- "groupID",
- "newOwnerUserID",
- "oldOwnerUserID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "newOwnerUserID": {
- "type": "string"
- },
- "oldOwnerUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.TransferGroupOwnerResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "api_struct.UpdateDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateSelfUserInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "email": {
- "type": "string",
- "maxLength": 64
- },
- "ex": {
- "type": "string",
- "maxLength": 1024
- },
- "faceURL": {
- "type": "string",
- "maxLength": 1024
- },
- "gender": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "nickname": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UpdateUserInDepartmentReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateUserInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UserIDResult": {
- "type": "object",
- "properties": {
- "result": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UserRegisterReq": {
- "type": "object",
- "required": [
- "operationID",
- "platform",
- "secret",
- "userID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "email": {
- "type": "string",
- "maxLength": 64
- },
- "ex": {
- "type": "string",
- "maxLength": 1024
- },
- "faceURL": {
- "type": "string",
- "maxLength": 1024
- },
- "gender": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "nickname": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string",
- "maxLength": 32
- },
- "platform": {
- "type": "integer",
- "maximum": 7,
- "minimum": 1
- },
- "secret": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UserRegisterResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.UserTokenInfo"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UserTokenInfo": {
- "type": "object",
- "properties": {
- "expiredTime": {
- "type": "integer"
- },
- "token": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UserTokenReq": {
- "type": "object",
- "required": [
- "operationID",
- "platform",
- "secret",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "platform": {
- "type": "integer",
- "maximum": 8,
- "minimum": 1
- },
- "secret": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UserTokenResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.UserTokenInfo"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.WorkMoment": {
- "type": "object",
- "properties": {
- "atUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "comments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Comment"
- }
- },
- "content": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "likeUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "permission": {
- "type": "integer"
- },
- "permissionUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.WorkMomentUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.FileElem": {
- "type": "object",
- "properties": {
- "fileName": {
- "type": "string"
- },
- "filePath": {
- "type": "string"
- },
- "fileSize": {
- "type": "integer"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.OANotificationElem": {
- "type": "object",
- "required": [
- "notificationName",
- "notificationType",
- "text"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "fileElem": {
- "$ref": "#/definitions/internal_api_manage.FileElem"
- },
- "mixType": {
- "type": "integer"
- },
- "notificationFaceURL": {
- "type": "string"
- },
- "notificationName": {
- "type": "string"
- },
- "notificationType": {
- "type": "integer"
- },
- "pictureElem": {
- "$ref": "#/definitions/internal_api_manage.PictureElem"
- },
- "soundElem": {
- "$ref": "#/definitions/internal_api_manage.SoundElem"
- },
- "text": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "videoElem": {
- "$ref": "#/definitions/internal_api_manage.VideoElem"
- }
- }
- },
- "internal_api_manage.PictureBaseInfo": {
- "type": "object",
- "properties": {
- "height": {
- "type": "integer"
- },
- "size": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- }
- }
- },
- "internal_api_manage.PictureElem": {
- "type": "object",
- "properties": {
- "bigPicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- },
- "snapshotPicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- },
- "sourcePath": {
- "type": "string"
- },
- "sourcePicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- }
- }
- },
- "internal_api_manage.RevokeElem": {
- "type": "object",
- "required": [
- "revokeMsgClientID"
- ],
- "properties": {
- "revokeMsgClientID": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.SoundElem": {
- "type": "object",
- "properties": {
- "dataSize": {
- "type": "integer"
- },
- "duration": {
- "type": "integer"
- },
- "soundPath": {
- "type": "string"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.TextElem": {
- "type": "object",
- "required": [
- "text"
- ],
- "properties": {
- "text": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.VideoElem": {
- "type": "object",
- "properties": {
- "duration": {
- "type": "integer"
- },
- "snapshotHeight": {
- "type": "integer"
- },
- "snapshotPath": {
- "type": "string"
- },
- "snapshotSize": {
- "type": "integer"
- },
- "snapshotURL": {
- "type": "string"
- },
- "snapshotUUID": {
- "type": "string"
- },
- "snapshotWidth": {
- "type": "integer"
- },
- "videoPath": {
- "type": "string"
- },
- "videoSize": {
- "type": "integer"
- },
- "videoType": {
- "type": "string"
- },
- "videoURL": {
- "type": "string"
- },
- "videoUUID": {
- "type": "string"
- }
- }
- },
- "office.Comment": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "contentID": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "replyUserID": {
- "type": "string"
- },
- "replyUserName": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "office.PermissionGroup": {
- "type": "object",
- "properties": {
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- }
- }
- },
- "office.Tag": {
- "type": "object",
- "properties": {
- "tagID": {
- "type": "string"
- },
- "tagName": {
- "type": "string"
- },
- "userList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagUser"
- }
- }
- }
- },
- "office.TagSendLog": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "sendTime": {
- "type": "integer"
- },
- "userList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagUser"
- }
- }
- }
- },
- "office.TagUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "office.WorkMoment": {
- "type": "object",
- "properties": {
- "atUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "comments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.Comment"
- }
- },
- "content": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "likeUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "permission": {
- "type": "integer"
- },
- "permissionGroupList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.PermissionGroup"
- }
- },
- "permissionUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "office.WorkMomentUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "pbRelay.GetUsersOnlineStatusResp_SuccessDetail": {
- "type": "object",
- "properties": {
- "platform": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- },
- "pbRelay.GetUsersOnlineStatusResp_SuccessResult": {
- "type": "object",
- "properties": {
- "detailPlatformStatus": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessDetail"
- }
- },
- "status": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.Department": {
- "type": "object",
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "sdkws.DepartmentMember": {
- "type": "object",
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.FriendInfo": {
- "type": "object",
- "properties": {
- "addSource": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "friendUser": {
- "$ref": "#/definitions/sdkws.UserInfo"
- },
- "operatorUserID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- },
- "remark": {
- "type": "string"
- }
- }
- },
- "sdkws.FriendRequest": {
- "type": "object",
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "fromFaceURL": {
- "type": "string"
- },
- "fromGender": {
- "type": "integer"
- },
- "fromNickname": {
- "type": "string"
- },
- "fromUserID": {
- "type": "string"
- },
- "handleMsg": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer"
- },
- "handleTime": {
- "type": "integer"
- },
- "handlerUserID": {
- "type": "string"
- },
- "reqMsg": {
- "type": "string"
- },
- "toFaceURL": {
- "type": "string"
- },
- "toGender": {
- "type": "integer"
- },
- "toNickname": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "sdkws.GroupInfo": {
- "type": "object",
- "properties": {
- "applyMemberFriend": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "creatorUserID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "groupType": {
- "type": "integer"
- },
- "introduction": {
- "type": "string"
- },
- "lookMemberInfo": {
- "type": "integer"
- },
- "memberCount": {
- "type": "integer"
- },
- "needVerification": {
- "type": "integer"
- },
- "notification": {
- "type": "string"
- },
- "notificationUpdateTime": {
- "type": "integer"
- },
- "notificationUserID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- }
- }
- },
- "sdkws.GroupMemberFullInfo": {
- "type": "object",
- "properties": {
- "appMangerLevel": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "joinTime": {
- "type": "integer"
- },
- "muteEndTime": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "operatorUserID": {
- "type": "string"
- },
- "roleLevel": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.GroupRequest": {
- "type": "object",
- "properties": {
- "ex": {
- "type": "string"
- },
- "groupInfo": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- },
- "handleMsg": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer"
- },
- "handleTime": {
- "type": "integer"
- },
- "handleUserID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "reqMsg": {
- "type": "string"
- },
- "reqTime": {
- "type": "integer"
- },
- "userInfo": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- },
- "sdkws.OfflinePushInfo": {
- "type": "object",
- "properties": {
- "desc": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "iOSBadgeCount": {
- "type": "boolean"
- },
- "iOSPushSound": {
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- }
- },
- "sdkws.OrganizationUser": {
- "type": "object",
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.PublicUserInfo": {
- "type": "object",
- "properties": {
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.UserDepartmentMember": {
- "type": "object",
- "properties": {
- "departmentMember": {
- "$ref": "#/definitions/sdkws.DepartmentMember"
- },
- "organizationUser": {
- "$ref": "#/definitions/sdkws.OrganizationUser"
- }
- }
- },
- "sdkws.UserInDepartment": {
- "type": "object",
- "properties": {
- "departmentMemberList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.DepartmentMember"
- }
- },
- "organizationUser": {
- "$ref": "#/definitions/sdkws.OrganizationUser"
- }
- }
- },
- "sdkws.UserInfo": {
- "type": "object",
- "properties": {
- "appMangerLevel": {
- "type": "integer"
- },
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "globalRecvMsgOpt": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.UserSendMsgResp": {
- "type": "object",
- "properties": {
- "clientMsgID": {
- "type": "string"
- },
- "sendTime": {
- "type": "integer"
- },
- "serverMsgID": {
- "type": "string"
- }
- }
- },
- "user.AccountCheckResp_SingleUserStatus": {
- "type": "object",
- "properties": {
- "accountStatus": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- }
- }
-}`
-
-// SwaggerInfo holds exported Swagger Info so clients can modify it
-var SwaggerInfo = &swag.Spec{
- Version: "1.0",
- Host: "",
- BasePath: "/",
- Schemes: []string{},
- Title: "open-IM-Server API",
- Description: "open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪",
- InfoInstanceName: "swagger",
- SwaggerTemplate: docTemplate,
-}
-
-func init() {
- swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
-}
diff --git a/cmd/api/docs/swagger.json b/cmd/api/docs/swagger.json
deleted file mode 100644
index 29d6c7041..000000000
--- a/cmd/api/docs/swagger.json
+++ /dev/null
@@ -1,8544 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "description": "open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪",
- "title": "open-IM-Server API",
- "contact": {},
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "1.0"
- },
- "basePath": "/",
- "paths": {
- "/auth/force_logout": {
- "post": {
- "description": "对应的平台强制登出",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "强制登出",
- "operationId": "ForceLogout",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "platform为平台ID \u003cbr\u003e fromUserID为要执行强制登出的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ForceLogoutReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.ForceLogoutResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/parse_token": {
- "post": {
- "description": "解析当前用户token(token在请求头中传入)",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "解析当前用户token",
- "operationId": "ParseToken",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段\u003cbr\u003eplatform为平台ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ParseTokenReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ParseTokenResp"
- },
- {
- "type": "object",
- "properties": {
- "Data": {
- "$ref": "#/definitions/api_struct.ExpireTime"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/user_register": {
- "post": {
- "description": "用户注册",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "用户注册",
- "operationId": "UserRegister",
- "parameters": [
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UserRegisterReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UserRegisterResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/auth/user_token": {
- "post": {
- "description": "获取用户的token",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "鉴权认证"
- ],
- "summary": "用户登录",
- "operationId": "UserToken",
- "parameters": [
- {
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UserTokenReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UserTokenResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_black": {
- "post": {
- "description": "添加黑名单",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "添加黑名单",
- "operationId": "AddBlack",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为设置的用户 \u003cbr\u003e toUserID为被设置的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddBlacklistReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddBlacklistResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_friend": {
- "post": {
- "description": "添加好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "添加好友",
- "operationId": "AddFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "reqMsg为申请信息 \u003cbr\u003e fromUserID为申请用户 \u003cbr\u003e toUserID为被添加用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/add_friend_response": {
- "post": {
- "description": "同意/拒绝好友请求",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "同意/拒绝好友请求",
- "operationId": "AddFriendResponse",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID同意/拒绝的用户ID\u003cbr\u003etoUserID为申请用户D\u003cbr\u003ehandleMsg为处理信息\u003cbr\u003eflag为具体操作, 1为同意, 2为拒绝",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResponseReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AddFriendResponseResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/delete_friend": {
- "post": {
- "description": "删除好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "删除好友",
- "operationId": "DeleteFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为操作用户\u003cbr\u003etoUserID为被删除用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/get_black_list": {
- "post": {
- "description": "获取黑名单列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取黑名单列表",
- "operationId": "GetBlacklist",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID要获取黑名单的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetBlackListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetBlackListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- }
- }
- }
- },
- "/friend/get_friend_apply_list": {
- "post": {
- "description": "删除好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取好友申请列表",
- "operationId": "GetFriendApplyList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取申请列表的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetFriendApplyListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetFriendApplyListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- }
- }
- }
- },
- "/friend/get_friend_list": {
- "post": {
- "description": "获取用户的好友列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取用户的好友列表",
- "operationId": "GetFriendList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取好友列表的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetFriendListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetFriendListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/get_self_friend_apply_list": {
- "post": {
- "description": "获取自己的好友申请列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "获取自己的好友申请列表",
- "operationId": "GetSelfFriendApplyList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为自己的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSelfApplyListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSelfApplyListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.FriendRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/import_friend": {
- "post": {
- "description": "批量加好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "批量加好友",
- "operationId": "ImportFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID批量加好友的用户ID\u003cbr\u003e friendUserIDList为",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ImportFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "data列表中对象的result-1为添加该用户失败\u003cbr\u003e0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.ImportFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/is_friend": {
- "post": {
- "description": "检查用户之间是否为好友",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "检查用户之间是否为好友",
- "operationId": "IsFriend",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为请求用户\u003cbr\u003e toUserID为要检查的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.IsFriendReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.IsFriendResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/remove_black": {
- "post": {
- "description": "把用户移除黑名单",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "把用户移除黑名单",
- "operationId": "RemoveBlack",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID要获取黑名单的用户",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.RemoveBlackListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.RemoveBlackListResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/friend/set_friend_remark": {
- "post": {
- "description": "设置好友备注",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "好友相关"
- ],
- "summary": "设置好友备注",
- "operationId": "SetFriendRemark",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为设置的用户\u003cbr\u003e toUserID为被设置的用户\u003cbr\u003e remark为好友备注",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetFriendRemarkReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetFriendRemarkResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/cancel_mute_group": {
- "post": {
- "description": "取消禁言群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "取消禁言群组",
- "operationId": "CancelMuteGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/cancel_mute_group_member": {
- "post": {
- "description": "取消禁言群成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "取消禁言群成员",
- "operationId": "CancelMuteGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID \u003cbr\u003e userID为要取消禁言的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CancelMuteGroupMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/create_group": {
- "post": {
- "description": "创建群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "创建群组",
- "operationId": "CreateGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupType这里填0代表普通群 \u003cbr\u003egroupName为群名称\u003cbr\u003e introduction为群介绍\u003cbr\u003e notification为群公共\u003cbr\u003eownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.CreateGroupResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/dismiss_group": {
- "post": {
- "description": "解散群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "解散群组",
- "operationId": "DismissGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要解散的群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_group_all_member_list": {
- "post": {
- "description": "获取全部群成员列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取全部群成员列表",
- "operationId": "GetGroupAllMemberList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要获取群成员的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupAllMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupAllMemberResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupMemberFullInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_group_members_info": {
- "post": {
- "description": "获取群成员信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取群成员信息",
- "operationId": "GetGroupMembersInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要获取的群ID \u003cbr\u003e memberList为要获取群成员的群ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupMembersInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupMembersInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupMemberFullInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_groups_info": {
- "post": {
- "description": "通过群ID列表获取群信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "通过群ID列表获取群信息",
- "operationId": "GetGroupsInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupIDList为群ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_joined_group_list": {
- "post": {
- "description": "获取用户加入群列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户加入群列表",
- "operationId": "GetJoinedGroupList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetJoinedGroupListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetJoinedGroupListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_recv_group_applicationList": {
- "post": {
- "description": "获取用户收到的加群信息列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户收到的加群信息列表",
- "operationId": "GetRecvGroupApplicationList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "fromUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/get_user_req_group_applicationList": {
- "post": {
- "description": "获取用户加群申请列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "获取用户加群申请列表",
- "operationId": "GetUserReqGroupApplicationList",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserReqGroupApplicationListReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetGroupApplicationListResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.GroupRequest"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/group_application_response": {
- "post": {
- "description": "处理加群消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "处理加群消息",
- "operationId": "ApplicationGroupResponse",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要处理的群ID \u003cbr\u003e fromUserID为要处理的用户ID \u003cbr\u003e handleMsg为处理结果信息 \u003cbr\u003e handleResult为处理结果 1为同意加群 2为拒绝加群",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.ApplicationGroupResponseReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.ApplicationGroupResponseResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/invite_user_to_group": {
- "post": {
- "description": "将用户拉入群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "将用户拉入群组",
- "operationId": "InviteUserToGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要拉进的群组ID \u003cbr\u003e invitedUserIDList为要获取群成员的群ID列表 \u003cbr\u003e reason为原因",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.InviteUserToGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "result为结果码, -1为失败, 0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.InviteUserToGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/join_group": {
- "post": {
- "description": "加入群聊",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "加入群聊",
- "operationId": "JoinGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "reqMessage为申请进群信息\u003cbr\u003egroupID为申请的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.JoinGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.JoinGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/kick_group": {
- "post": {
- "description": "把用户踢出群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "把用户踢出群组",
- "operationId": "KickGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要操作的群ID \u003cbr\u003e kickedUserIDList为要踢出的群用户ID \u003cbr\u003e reason为原因",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.KickGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "result为结果码, -1为失败, 0为成功",
- "schema": {
- "$ref": "#/definitions/api_struct.KickGroupMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/mute_group": {
- "post": {
- "description": "禁言群组",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "禁言群组",
- "operationId": "MuteGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupResp"
- }
- }
- }
- }
- },
- "/group/mute_group_member": {
- "post": {
- "description": "禁言群成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "禁言群成员",
- "operationId": "MuteGroupMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为群组ID \u003cbr\u003e userID为要禁言的用户ID \u003cbr\u003e mutedSeconds为禁言秒数",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.MuteGroupMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DismissGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/quit_group": {
- "post": {
- "description": "当前用户退出群聊",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "当前用户退出群聊",
- "operationId": "QuitGroup",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要退出的群ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.QuitGroupReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.QuitGroupResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/set_group_info": {
- "post": {
- "description": "设置群信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "设置群信息",
- "operationId": "SetGroupInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "groupID为要修改的群ID\u003cbr\u003egroupName为新的群名称\u003cbr\u003enotification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/set_group_member_info": {
- "post": {
- "description": "修改群成员信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "修改群成员信息",
- "operationId": "SetGroupMemberInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "除了operationID, userID, groupID其他参数可选\u003cbr\u003eex为拓展字段\u003cbr\u003efaceURL为群头像\u003cbr\u003enickName为群昵称\u003cbr\u003eroleLevel为群员角色,1为普通用户 2为群主 3为管理员",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupMemberInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGroupMemberInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/group/transfer_group": {
- "post": {
- "description": "转让群主",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "群组相关"
- ],
- "summary": "转让群主",
- "operationId": "TransferGroupOwner",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "GroupID为要操作的群ID \u003cbr\u003e oldOwnerUserID为老群主ID \u003cbr\u003e newOwnerUserID为新群主ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.TransferGroupOwnerReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.TransferGroupOwnerResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/batch_send_msg": {
- "post": {
- "description": "管理员批量发送群聊单聊消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "管理员批量发送群聊单聊消息",
- "operationId": "ManagementBatchSendMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
- "name": "管理员批量发送单聊消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
- "name": "管理员批量发送OA通知",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
- }
- }
- }
- ]
- }
- }
- ],
- "responses": {
- "0": {
- "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementBatchSendMsgReq"
- }
- }
- }
- }
- },
- "/msg/clear_msg": {
- "post": {
- "description": "清空用户消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "清空用户消息",
- "operationId": "ClearMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要清空的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CleanUpMsgReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CleanUpMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/del_msg": {
- "post": {
- "description": "根据seq列表删除消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "根据seq列表删除消息",
- "operationId": "DelMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "userID为要删除的用户ID \u003cbr\u003e seqList为seq列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DelMsgReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DelMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_all_conversations": {
- "post": {
- "description": "获取用户所有会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "获取用户所有会话",
- "operationId": "GetAllConversations",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllConversationsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllConversationsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_conversation": {
- "post": {
- "description": "根据会话ID获取会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "根据会话ID获取会话",
- "operationId": "GetConversation",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationID为要获取的会话ID",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/get_conversations": {
- "post": {
- "description": "根据会话ID列表获取会话",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "会话相关"
- ],
- "summary": "根据会话ID列表获取会话",
- "operationId": "GetConversations",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationIDs为要获取的会话ID列表",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetConversationsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/msg/manage_send_msg": {
- "post": {
- "description": "管理员发送/撤回消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息相关"
- ],
- "summary": "管理员发送/撤回消息",
- "operationId": "ManagementSendMsg",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员发送文字消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员发送OA通知消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
- }
- }
- }
- ]
- }
- },
- {
- "description": "该请求和消息结构体一样",
- "name": "管理员撤回单聊消息",
- "in": "body",
- "required": true,
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.ManagementSendMsgReq"
- },
- {
- "type": "object",
- "properties": {
- "content": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.RevokeElem"
- }
- }
- }
- ]
- }
- }
- ],
- "responses": {
- "0": {
- "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.ManagementSendMsgResp"
- }
- }
- }
- }
- },
- "/office/comment_one_work_moment": {
- "post": {
- "description": "评论一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "评论一条工作圈",
- "operationId": "CommentOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CommentOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CommentOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/create_one_work_moment": {
- "post": {
- "description": "用户创建一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "创建一条工作圈",
- "operationId": "CreateOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求 atUserList likeUserList permissionGroupList permissionUserList 字段中userName可以不填",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/create_tag": {
- "post": {
- "description": "创建标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "创建标签",
- "operationId": "CreateTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_comment": {
- "post": {
- "description": "删除一条评论",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "删除一条评论",
- "operationId": "DeleteComment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteCommentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteCommentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_one_work_moment": {
- "post": {
- "description": "根据用户工作圈ID删除一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "删除一条工作圈",
- "operationId": "DeleteOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/delete_tag": {
- "post": {
- "description": "根据标签ID创建标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "删除标签",
- "operationId": "DeleteTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_send_tag_log": {
- "post": {
- "description": "分页获取发送历史记录",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取发送历史记录",
- "operationId": "GetTagSendLogs",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetTagSendLogsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetTagSendLogsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_friend_work_moments": {
- "post": {
- "description": "查询用户工作圈页面",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "查询自己大工作圈页面",
- "operationId": "GetUserFriendWorkMoments",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserFriendWorkMomentsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserFriendWorkMomentsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_tag_by_id": {
- "post": {
- "description": "通过标签id获取该用户的标签信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取该用户的标签信息",
- "operationId": "GetUserTagByID",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagByIDReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagByIDResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_tags": {
- "post": {
- "description": "用户获取自己的所有的标签",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "获取用户标签信息",
- "operationId": "GetUserTags",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserTagsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_user_work_moments": {
- "post": {
- "description": "查询用户工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "查询用户工作圈",
- "operationId": "GetUserWorkMoments",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserWorkMomentsReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserWorkMomentsResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/get_work_moment_by_id": {
- "post": {
- "description": "通过ID获取工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "通过ID获取工作圈",
- "operationId": "GetWorkMomentByID",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetWorkMomentByIDReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetWorkMomentByIDResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/like_one_work_moment": {
- "post": {
- "description": "工作圈ID点赞一条工作圈",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "工作圈"
- ],
- "summary": "点赞一条工作圈",
- "operationId": "LikeOneWorkMoment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.LikeOneWorkMomentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.LikeOneWorkMomentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/send_msg_to_tag": {
- "post": {
- "description": "对标签用户发送消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "发送标签消息",
- "operationId": "SendMsg2Tag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SendMsg2TagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SendMsg2TagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/office/set_tag": {
- "post": {
- "description": "根据标签ID修改标签用户列表, 名称",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "标签"
- ],
- "summary": "修改标签",
- "operationId": "SetTag",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetTagReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetTagResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_department": {
- "post": {
- "description": "创建部门",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "创建部门",
- "operationId": "CreateDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.CreateDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.Department"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_department_member": {
- "post": {
- "description": "创建部门用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "创建部门用户",
- "operationId": "CreateDepartmentMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateDepartmentMemberResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/create_organization_user": {
- "post": {
- "description": "组织架构导入用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "组织架构导入用户",
- "operationId": "CreateOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.CreateOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_department": {
- "post": {
- "description": "删除部门",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除部门",
- "operationId": "DeleteDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_organization_user": {
- "post": {
- "description": "删除组织架构中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除组织架构中某个用户",
- "operationId": "DeleteOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/delete_user_in_department": {
- "post": {
- "description": "删除部门中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "删除部门中某个用户",
- "operationId": "DeleteUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.DeleteUserInDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_department_member": {
- "post": {
- "description": "获取部门中所有成员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取部门中所有成员",
- "operationId": "GetDepartmentMember",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetDepartmentMemberReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetDepartmentMemberResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.UserDepartmentMember"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_sub_department": {
- "post": {
- "description": "获取子部门列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取子部门列表",
- "operationId": "GetSubDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSubDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSubDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.Department"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/get_user_in_department": {
- "post": {
- "description": "获取部门中的所有用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "获取部门中的所有用户",
- "operationId": "GetUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetUserInDepartmentResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserInDepartment"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_department": {
- "post": {
- "description": "更新部门信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新部门信息",
- "operationId": "UpdateDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_organization_user": {
- "post": {
- "description": "更新组织架构中的用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新组织架构中的用户",
- "operationId": "UpdateOrganizationUser",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateOrganizationUserReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateOrganizationUserResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/organization/update_user_in_department": {
- "post": {
- "description": "更新部门中某个用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "组织架构相关"
- ],
- "summary": "更新部门中某个用户",
- "operationId": "UpdateUserInDepartment",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInDepartmentReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInDepartmentResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/third/minio_upload": {
- "post": {
- "description": "minio上传文件(web api), 请注意本api请求为form并非json",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "第三方服务相关"
- ],
- "summary": "minio上传文件(web api)",
- "operationId": "MinioUploadFile",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "type": "file",
- "description": "要上传的文件文件",
- "name": "file",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "文件类型",
- "name": "fileType",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "操作唯一ID",
- "name": "operationID",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.MinioUploadFileResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/account_check": {
- "post": {
- "description": "传入UserIDList检查列表账户注册状态,并且返回结果",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "检查列表账户注册状态,并且返回结果",
- "operationId": "AccountCheck",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.AccountCheckReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.AccountCheckResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_all_users_uid": {
- "post": {
- "description": "获取所有用户uid列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取所有用户uid列表",
- "operationId": "GetAllUsersUid",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllUsersUidReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetAllUsersUidResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_self_user_info": {
- "post": {
- "description": "传入ID获取自己的信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取自己的信息",
- "operationId": "GetSelfUserInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetSelfUserInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetSelfUserInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_users_info": {
- "post": {
- "description": "根据用户列表批量获取用户信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取用户信息",
- "operationId": "GetUsersInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/api_struct.GetUsersInfoResp"
- },
- {
- "type": "object",
- "properties": {
- "Data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/get_users_online_status": {
- "post": {
- "description": "获取用户在线状态",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "获取用户在线状态",
- "operationId": "GetUsersOnlineStatus",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersOnlineStatusReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.GetUsersOnlineStatusResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/set_global_msg_recv_opt": {
- "post": {
- "description": "设置全局免打扰",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "设置全局免打扰",
- "operationId": "SetGlobalRecvMessageOpt",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.SetGlobalRecvMessageOptReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.SetGlobalRecvMessageOptResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- },
- "/user/update_user_info": {
- "post": {
- "description": "修改用户信息 userID faceURL等",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "用户相关"
- ],
- "summary": "修改用户信息",
- "operationId": "UpdateUserInfo",
- "parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
- {
- "description": "请求体",
- "name": "req",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateSelfUserInfoReq"
- }
- }
- ],
- "responses": {
- "0": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/api_struct.UpdateUserInfoResp"
- }
- },
- "400": {
- "description": "errCode为400 一般为参数输入错误, token未带上等",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger400Resp"
- }
- },
- "500": {
- "description": "errCode为500 一般为服务器内部错误",
- "schema": {
- "$ref": "#/definitions/api_struct.Swagger500Resp"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "Open_IM_internal_api_manage.FileElem": {
- "type": "object",
- "properties": {
- "fileName": {
- "type": "string"
- },
- "filePath": {
- "type": "string"
- },
- "fileSize": {
- "type": "integer"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.OANotificationElem": {
- "type": "object",
- "required": [
- "notificationName",
- "notificationType",
- "text"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "fileElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.FileElem"
- },
- "mixType": {
- "type": "integer"
- },
- "notificationFaceURL": {
- "type": "string"
- },
- "notificationName": {
- "type": "string"
- },
- "notificationType": {
- "type": "integer"
- },
- "pictureElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureElem"
- },
- "soundElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.SoundElem"
- },
- "text": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "videoElem": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.VideoElem"
- }
- }
- },
- "Open_IM_internal_api_manage.PictureBaseInfo": {
- "type": "object",
- "properties": {
- "height": {
- "type": "integer"
- },
- "size": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- }
- }
- },
- "Open_IM_internal_api_manage.PictureElem": {
- "type": "object",
- "properties": {
- "bigPicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- },
- "snapshotPicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- },
- "sourcePath": {
- "type": "string"
- },
- "sourcePicture": {
- "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
- }
- }
- },
- "Open_IM_internal_api_manage.RevokeElem": {
- "type": "object",
- "required": [
- "revokeMsgClientID"
- ],
- "properties": {
- "revokeMsgClientID": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.SoundElem": {
- "type": "object",
- "properties": {
- "dataSize": {
- "type": "integer"
- },
- "duration": {
- "type": "integer"
- },
- "soundPath": {
- "type": "string"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.TextElem": {
- "type": "object",
- "required": [
- "text"
- ],
- "properties": {
- "text": {
- "type": "string"
- }
- }
- },
- "Open_IM_internal_api_manage.VideoElem": {
- "type": "object",
- "properties": {
- "duration": {
- "type": "integer"
- },
- "snapshotHeight": {
- "type": "integer"
- },
- "snapshotPath": {
- "type": "string"
- },
- "snapshotSize": {
- "type": "integer"
- },
- "snapshotURL": {
- "type": "string"
- },
- "snapshotUUID": {
- "type": "string"
- },
- "snapshotWidth": {
- "type": "integer"
- },
- "videoPath": {
- "type": "string"
- },
- "videoSize": {
- "type": "integer"
- },
- "videoType": {
- "type": "string"
- },
- "videoURL": {
- "type": "string"
- },
- "videoUUID": {
- "type": "string"
- }
- }
- },
- "api_struct.AccountCheckReq": {
- "type": "object",
- "required": [
- "checkUserIDList",
- "operationID"
- ],
- "properties": {
- "checkUserIDList": {
- "type": "array",
- "maxItems": 100,
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.AccountCheckResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/user.AccountCheckResp_SingleUserStatus"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddBlacklistReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddBlacklistResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "reqMsg": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResponseReq": {
- "type": "object",
- "required": [
- "flag",
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "flag": {
- "type": "integer",
- "enum": [
- -1,
- 0,
- 1
- ]
- },
- "fromUserID": {
- "type": "string"
- },
- "handleMsg": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.AddFriendResponseResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ApplicationGroupResponseReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "groupID",
- "handleResult",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "description": "application from FromUserID",
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer",
- "enum": [
- -1,
- 1
- ]
- },
- "handledMsg": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ApplicationGroupResponseResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID",
- "userID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.CancelMuteGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CleanUpMsgReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CleanUpMsgResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Comment": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "contentID": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "replyUserID": {
- "type": "string"
- },
- "replyUserName": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "api_struct.CommentOneWorkMomentReq": {
- "type": "object",
- "required": [
- "content",
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "content": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "replyUserID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.CommentOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Conversation": {
- "type": "object",
- "required": [
- "conversationID",
- "conversationType",
- "ownerUserID"
- ],
- "properties": {
- "attachedInfo": {
- "type": "string"
- },
- "conversationID": {
- "type": "string"
- },
- "conversationType": {
- "type": "integer"
- },
- "draftTextTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "groupAtType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isNotInGroup": {
- "type": "boolean"
- },
- "isPinned": {
- "type": "boolean"
- },
- "isPrivateChat": {
- "type": "boolean"
- },
- "ownerUserID": {
- "type": "string"
- },
- "recvMsgOpt": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "unreadCount": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentMemberReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateDepartmentReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "api_struct.CreateDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateGroupReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "groupType": {
- "type": "integer"
- },
- "introduction": {
- "type": "string"
- },
- "memberList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.GroupAddMemberInfo"
- }
- },
- "notification": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOneWorkMomentReq": {
- "type": "object",
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMoment": {
- "$ref": "#/definitions/office.WorkMoment"
- }
- }
- },
- "api_struct.CreateOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.CreateTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagName",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagName": {
- "description": "tag名称",
- "type": "string"
- },
- "userIDList": {
- "description": "用户ID列表",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.CreateTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DelMsgReq": {
- "type": "object",
- "required": [
- "operationID",
- "seqList",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "seqList": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DelMsgResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteCommentReq": {
- "type": "object",
- "required": [
- "contentID",
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "contentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteCommentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteFriendResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOneWorkMomentReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteUserInDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID",
- "userID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.DeleteUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.DismissGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.DismissGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ExpireTime": {
- "type": "object",
- "properties": {
- "expireTimeSeconds": {
- "type": "integer"
- }
- }
- },
- "api_struct.ForceLogoutReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "platform"
- ],
- "properties": {
- "fromUserID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "platform": {
- "type": "integer",
- "maximum": 8,
- "minimum": 1
- }
- }
- },
- "api_struct.ForceLogoutResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllConversationsReq": {
- "type": "object",
- "required": [
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllConversationsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Conversation"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllUsersUidReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetAllUsersUidResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetBlackListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetBlackListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationReq": {
- "type": "object",
- "required": [
- "conversationID",
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "conversationID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.Conversation"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationsReq": {
- "type": "object",
- "required": [
- "conversationIDs",
- "operationID",
- "ownerUserID"
- ],
- "properties": {
- "conversationIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetConversationsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Conversation"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetDepartmentMemberReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetDepartmentMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendApplyListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendApplyListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetFriendListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupAllMemberReq": {
- "type": "object",
- "required": [
- "count",
- "groupID",
- "offset",
- "operationID"
- ],
- "properties": {
- "count": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "offset": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupAllMemberResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupApplicationListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "description": "作为管理员或群主收到的 进群申请",
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupApplicationListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupInfoReq": {
- "type": "object",
- "required": [
- "groupIDList",
- "operationID"
- ],
- "properties": {
- "groupIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupMembersInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "memberList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "memberList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetGroupMembersInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetJoinedGroupListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetJoinedGroupListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfApplyListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfApplyListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfUserInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSelfUserInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSubDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetSubDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetTagSendLogsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "api_struct.GetTagSendLogsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "logs": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagSendLog"
- }
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserFriendWorkMomentsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- }
- }
- },
- "api_struct.GetUserFriendWorkMomentsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "workMoments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserInDepartmentReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserReqGroupApplicationListReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagByIDReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagByIDResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "tag": {
- "$ref": "#/definitions/office.Tag"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagsReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserTagsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "tags": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.Tag"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserWorkMomentsReq": {
- "type": "object",
- "required": [
- "operationID",
- "pageNumber",
- "showNumber"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "pageNumber": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUserWorkMomentsResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "currentPage": {
- "type": "integer"
- },
- "showNumber": {
- "type": "integer"
- },
- "workMoments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUsersInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.GetUsersInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetUsersOnlineStatusReq": {
- "type": "object",
- "required": [
- "operationID",
- "userIDList"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "userIDList": {
- "type": "array",
- "maxItems": 200,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.GetUsersOnlineStatusResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GetWorkMomentByIDReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.GetWorkMomentByIDResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "workMoment": {
- "$ref": "#/definitions/api_struct.WorkMoment"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.GroupAddMemberInfo": {
- "type": "object",
- "required": [
- "roleLevel",
- "userID"
- ],
- "properties": {
- "roleLevel": {
- "type": "integer",
- "enum": [
- 1,
- 3
- ]
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.ImportFriendReq": {
- "type": "object",
- "required": [
- "friendUserIDList",
- "fromUserID",
- "operationID"
- ],
- "properties": {
- "friendUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ImportFriendResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.InviteUserToGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "invitedUserIDList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "invitedUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- }
- },
- "api_struct.InviteUserToGroupResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.IsFriendReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.IsFriendResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.Response"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.JoinGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "reqMessage": {
- "type": "string"
- }
- }
- },
- "api_struct.JoinGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.KickGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "kickedUserIDList",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "kickedUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- }
- },
- "api_struct.KickGroupMemberResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.UserIDResult"
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.LikeOneWorkMomentReq": {
- "type": "object",
- "required": [
- "operationID",
- "workMomentID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.LikeOneWorkMomentResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ManagementBatchSendMsgReq": {
- "type": "object",
- "required": [
- "contentType",
- "operationID",
- "sendID",
- "sessionType"
- ],
- "properties": {
- "businessOperationID": {
- "type": "string"
- },
- "contentType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isOnlineOnly": {
- "type": "boolean"
- },
- "notOfflinePush": {
- "type": "boolean"
- },
- "offlinePushInfo": {
- "$ref": "#/definitions/sdkws.OfflinePushInfo"
- },
- "operationID": {
- "type": "string"
- },
- "recvIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "sendID": {
- "type": "string"
- },
- "senderFaceURL": {
- "type": "string"
- },
- "senderNickname": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "sessionType": {
- "type": "integer"
- }
- }
- },
- "api_struct.ManagementSendMsgReq": {
- "type": "object",
- "required": [
- "contentType",
- "operationID",
- "sendID",
- "sessionType"
- ],
- "properties": {
- "businessOperationID": {
- "type": "string"
- },
- "contentType": {
- "type": "integer"
- },
- "groupID": {
- "type": "string"
- },
- "isOnlineOnly": {
- "type": "boolean"
- },
- "notOfflinePush": {
- "type": "boolean"
- },
- "offlinePushInfo": {
- "$ref": "#/definitions/sdkws.OfflinePushInfo"
- },
- "operationID": {
- "type": "string"
- },
- "recvID": {
- "type": "string"
- },
- "sendID": {
- "type": "string"
- },
- "senderFaceURL": {
- "type": "string"
- },
- "senderNickname": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "sessionType": {
- "type": "integer"
- }
- }
- },
- "api_struct.ManagementSendMsgResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/sdkws.UserSendMsgResp"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.MinioUploadFileResp": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "URL": {
- "type": "string"
- },
- "newName": {
- "type": "string"
- },
- "snapshotName": {
- "type": "string"
- },
- "snapshotURL": {
- "type": "string"
- }
- }
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupMemberReq": {
- "type": "object",
- "required": [
- "groupID",
- "mutedSeconds",
- "operationID",
- "userID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "mutedSeconds": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.MuteGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.ParseTokenReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.ParseTokenResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.QuitGroupReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.QuitGroupResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.RemoveBlackListReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.RemoveBlackListResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Response": {
- "type": "object",
- "properties": {
- "isFriend": {
- "type": "boolean"
- }
- }
- },
- "api_struct.SendMsg2TagReq": {
- "type": "object",
- "required": [
- "content",
- "operationID",
- "senderPlatformID"
- ],
- "properties": {
- "content": {
- "type": "string"
- },
- "groupList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "operationID": {
- "type": "string"
- },
- "senderPlatformID": {
- "type": "integer"
- },
- "tagList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "userList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "api_struct.SendMsg2TagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetFriendRemarkReq": {
- "type": "object",
- "required": [
- "fromUserID",
- "operationID",
- "toUserID"
- ],
- "properties": {
- "fromUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "remark": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetFriendRemarkResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGlobalRecvMessageOptReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "globalRecvMsgOpt": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGlobalRecvMessageOptResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID"
- ],
- "properties": {
- "applyMemberFriend": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "introduction": {
- "type": "string"
- },
- "lookMemberInfo": {
- "type": "integer"
- },
- "needVerification": {
- "type": "integer"
- },
- "notification": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupMemberInfoReq": {
- "type": "object",
- "required": [
- "groupID",
- "operationID",
- "userID"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "roleLevel": {
- "type": "integer",
- "maximum": 3,
- "minimum": 1
- },
- "userGroupFaceUrl": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetGroupMemberInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.SetTagReq": {
- "type": "object",
- "required": [
- "operationID",
- "tagID"
- ],
- "properties": {
- "increaseUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "newName": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "reduceUserIDList": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "tagID": {
- "type": "string"
- }
- }
- },
- "api_struct.SetTagResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.Swagger400Resp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer",
- "example": 400
- },
- "errMsg": {
- "type": "string",
- "example": "err msg"
- }
- }
- },
- "api_struct.Swagger500Resp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer",
- "example": 500
- },
- "errMsg": {
- "type": "string",
- "example": "err msg"
- }
- }
- },
- "api_struct.TransferGroupOwnerReq": {
- "type": "object",
- "required": [
- "groupID",
- "newOwnerUserID",
- "oldOwnerUserID",
- "operationID"
- ],
- "properties": {
- "groupID": {
- "type": "string"
- },
- "newOwnerUserID": {
- "type": "string"
- },
- "oldOwnerUserID": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- }
- }
- },
- "api_struct.TransferGroupOwnerResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateDepartmentReq": {
- "type": "object",
- "required": [
- "departmentID",
- "operationID"
- ],
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "api_struct.UpdateDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateOrganizationUserReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "operationID": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateOrganizationUserResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateSelfUserInfoReq": {
- "type": "object",
- "required": [
- "operationID",
- "userID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "email": {
- "type": "string",
- "maxLength": 64
- },
- "ex": {
- "type": "string",
- "maxLength": 1024
- },
- "faceURL": {
- "type": "string",
- "maxLength": 1024
- },
- "gender": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "nickname": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UpdateUserInDepartmentReq": {
- "type": "object",
- "required": [
- "operationID"
- ],
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "operationID": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateUserInDepartmentResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UpdateUserInfoResp": {
- "type": "object",
- "properties": {
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UserIDResult": {
- "type": "object",
- "properties": {
- "result": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UserRegisterReq": {
- "type": "object",
- "required": [
- "operationID",
- "platform",
- "secret",
- "userID"
- ],
- "properties": {
- "birth": {
- "type": "integer"
- },
- "email": {
- "type": "string",
- "maxLength": 64
- },
- "ex": {
- "type": "string",
- "maxLength": 1024
- },
- "faceURL": {
- "type": "string",
- "maxLength": 1024
- },
- "gender": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "nickname": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- },
- "operationID": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string",
- "maxLength": 32
- },
- "platform": {
- "type": "integer",
- "maximum": 7,
- "minimum": 1
- },
- "secret": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UserRegisterResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.UserTokenInfo"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.UserTokenInfo": {
- "type": "object",
- "properties": {
- "expiredTime": {
- "type": "integer"
- },
- "token": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "api_struct.UserTokenReq": {
- "type": "object",
- "required": [
- "operationID",
- "platform",
- "secret",
- "userID"
- ],
- "properties": {
- "operationID": {
- "type": "string"
- },
- "platform": {
- "type": "integer",
- "maximum": 8,
- "minimum": 1
- },
- "secret": {
- "type": "string",
- "maxLength": 32
- },
- "userID": {
- "type": "string",
- "maxLength": 64,
- "minLength": 1
- }
- }
- },
- "api_struct.UserTokenResp": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/api_struct.UserTokenInfo"
- },
- "errCode": {
- "type": "integer"
- },
- "errMsg": {
- "type": "string"
- }
- }
- },
- "api_struct.WorkMoment": {
- "type": "object",
- "properties": {
- "atUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "comments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.Comment"
- }
- },
- "content": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "likeUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "permission": {
- "type": "integer"
- },
- "permissionUsers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/api_struct.WorkMomentUser"
- }
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "api_struct.WorkMomentUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.FileElem": {
- "type": "object",
- "properties": {
- "fileName": {
- "type": "string"
- },
- "filePath": {
- "type": "string"
- },
- "fileSize": {
- "type": "integer"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.OANotificationElem": {
- "type": "object",
- "required": [
- "notificationName",
- "notificationType",
- "text"
- ],
- "properties": {
- "ex": {
- "type": "string"
- },
- "fileElem": {
- "$ref": "#/definitions/internal_api_manage.FileElem"
- },
- "mixType": {
- "type": "integer"
- },
- "notificationFaceURL": {
- "type": "string"
- },
- "notificationName": {
- "type": "string"
- },
- "notificationType": {
- "type": "integer"
- },
- "pictureElem": {
- "$ref": "#/definitions/internal_api_manage.PictureElem"
- },
- "soundElem": {
- "$ref": "#/definitions/internal_api_manage.SoundElem"
- },
- "text": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "videoElem": {
- "$ref": "#/definitions/internal_api_manage.VideoElem"
- }
- }
- },
- "internal_api_manage.PictureBaseInfo": {
- "type": "object",
- "properties": {
- "height": {
- "type": "integer"
- },
- "size": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- }
- }
- },
- "internal_api_manage.PictureElem": {
- "type": "object",
- "properties": {
- "bigPicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- },
- "snapshotPicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- },
- "sourcePath": {
- "type": "string"
- },
- "sourcePicture": {
- "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
- }
- }
- },
- "internal_api_manage.RevokeElem": {
- "type": "object",
- "required": [
- "revokeMsgClientID"
- ],
- "properties": {
- "revokeMsgClientID": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.SoundElem": {
- "type": "object",
- "properties": {
- "dataSize": {
- "type": "integer"
- },
- "duration": {
- "type": "integer"
- },
- "soundPath": {
- "type": "string"
- },
- "sourceURL": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.TextElem": {
- "type": "object",
- "required": [
- "text"
- ],
- "properties": {
- "text": {
- "type": "string"
- }
- }
- },
- "internal_api_manage.VideoElem": {
- "type": "object",
- "properties": {
- "duration": {
- "type": "integer"
- },
- "snapshotHeight": {
- "type": "integer"
- },
- "snapshotPath": {
- "type": "string"
- },
- "snapshotSize": {
- "type": "integer"
- },
- "snapshotURL": {
- "type": "string"
- },
- "snapshotUUID": {
- "type": "string"
- },
- "snapshotWidth": {
- "type": "integer"
- },
- "videoPath": {
- "type": "string"
- },
- "videoSize": {
- "type": "integer"
- },
- "videoType": {
- "type": "string"
- },
- "videoURL": {
- "type": "string"
- },
- "videoUUID": {
- "type": "string"
- }
- }
- },
- "office.Comment": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "contentID": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "replyUserID": {
- "type": "string"
- },
- "replyUserName": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "office.PermissionGroup": {
- "type": "object",
- "properties": {
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- }
- }
- },
- "office.Tag": {
- "type": "object",
- "properties": {
- "tagID": {
- "type": "string"
- },
- "tagName": {
- "type": "string"
- },
- "userList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagUser"
- }
- }
- }
- },
- "office.TagSendLog": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "sendTime": {
- "type": "integer"
- },
- "userList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.TagUser"
- }
- }
- }
- },
- "office.TagUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "office.WorkMoment": {
- "type": "object",
- "properties": {
- "atUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "comments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.Comment"
- }
- },
- "content": {
- "type": "string"
- },
- "createTime": {
- "type": "integer"
- },
- "faceURL": {
- "type": "string"
- },
- "likeUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "permission": {
- "type": "integer"
- },
- "permissionGroupList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.PermissionGroup"
- }
- },
- "permissionUserList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/office.WorkMomentUser"
- }
- },
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- },
- "workMomentID": {
- "type": "string"
- }
- }
- },
- "office.WorkMomentUser": {
- "type": "object",
- "properties": {
- "userID": {
- "type": "string"
- },
- "userName": {
- "type": "string"
- }
- }
- },
- "pbRelay.GetUsersOnlineStatusResp_SuccessDetail": {
- "type": "object",
- "properties": {
- "platform": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- },
- "pbRelay.GetUsersOnlineStatusResp_SuccessResult": {
- "type": "object",
- "properties": {
- "detailPlatformStatus": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessDetail"
- }
- },
- "status": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.Department": {
- "type": "object",
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "departmentID": {
- "type": "string"
- },
- "departmentType": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "memberNum": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "order": {
- "type": "integer"
- },
- "parentID": {
- "type": "string"
- },
- "subDepartmentNum": {
- "type": "integer"
- }
- }
- },
- "sdkws.DepartmentMember": {
- "type": "object",
- "properties": {
- "departmentID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "leader": {
- "type": "integer"
- },
- "order": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.FriendInfo": {
- "type": "object",
- "properties": {
- "addSource": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "friendUser": {
- "$ref": "#/definitions/sdkws.UserInfo"
- },
- "operatorUserID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- },
- "remark": {
- "type": "string"
- }
- }
- },
- "sdkws.FriendRequest": {
- "type": "object",
- "properties": {
- "createTime": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "fromFaceURL": {
- "type": "string"
- },
- "fromGender": {
- "type": "integer"
- },
- "fromNickname": {
- "type": "string"
- },
- "fromUserID": {
- "type": "string"
- },
- "handleMsg": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer"
- },
- "handleTime": {
- "type": "integer"
- },
- "handlerUserID": {
- "type": "string"
- },
- "reqMsg": {
- "type": "string"
- },
- "toFaceURL": {
- "type": "string"
- },
- "toGender": {
- "type": "integer"
- },
- "toNickname": {
- "type": "string"
- },
- "toUserID": {
- "type": "string"
- }
- }
- },
- "sdkws.GroupInfo": {
- "type": "object",
- "properties": {
- "applyMemberFriend": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "creatorUserID": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- },
- "groupType": {
- "type": "integer"
- },
- "introduction": {
- "type": "string"
- },
- "lookMemberInfo": {
- "type": "integer"
- },
- "memberCount": {
- "type": "integer"
- },
- "needVerification": {
- "type": "integer"
- },
- "notification": {
- "type": "string"
- },
- "notificationUpdateTime": {
- "type": "integer"
- },
- "notificationUserID": {
- "type": "string"
- },
- "ownerUserID": {
- "type": "string"
- },
- "status": {
- "type": "integer"
- }
- }
- },
- "sdkws.GroupMemberFullInfo": {
- "type": "object",
- "properties": {
- "appMangerLevel": {
- "type": "integer"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "joinTime": {
- "type": "integer"
- },
- "muteEndTime": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "operatorUserID": {
- "type": "string"
- },
- "roleLevel": {
- "type": "integer"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.GroupRequest": {
- "type": "object",
- "properties": {
- "ex": {
- "type": "string"
- },
- "groupInfo": {
- "$ref": "#/definitions/sdkws.GroupInfo"
- },
- "handleMsg": {
- "type": "string"
- },
- "handleResult": {
- "type": "integer"
- },
- "handleTime": {
- "type": "integer"
- },
- "handleUserID": {
- "type": "string"
- },
- "inviterUserID": {
- "type": "string"
- },
- "joinSource": {
- "type": "integer"
- },
- "reqMsg": {
- "type": "string"
- },
- "reqTime": {
- "type": "integer"
- },
- "userInfo": {
- "$ref": "#/definitions/sdkws.PublicUserInfo"
- }
- }
- },
- "sdkws.OfflinePushInfo": {
- "type": "object",
- "properties": {
- "desc": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "iOSBadgeCount": {
- "type": "boolean"
- },
- "iOSPushSound": {
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- }
- },
- "sdkws.OrganizationUser": {
- "type": "object",
- "properties": {
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "englishName": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "mobile": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "telephone": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.PublicUserInfo": {
- "type": "object",
- "properties": {
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.UserDepartmentMember": {
- "type": "object",
- "properties": {
- "departmentMember": {
- "$ref": "#/definitions/sdkws.DepartmentMember"
- },
- "organizationUser": {
- "$ref": "#/definitions/sdkws.OrganizationUser"
- }
- }
- },
- "sdkws.UserInDepartment": {
- "type": "object",
- "properties": {
- "departmentMemberList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/sdkws.DepartmentMember"
- }
- },
- "organizationUser": {
- "$ref": "#/definitions/sdkws.OrganizationUser"
- }
- }
- },
- "sdkws.UserInfo": {
- "type": "object",
- "properties": {
- "appMangerLevel": {
- "type": "integer"
- },
- "birth": {
- "type": "integer"
- },
- "createTime": {
- "type": "integer"
- },
- "email": {
- "type": "string"
- },
- "ex": {
- "type": "string"
- },
- "faceURL": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "globalRecvMsgOpt": {
- "type": "integer"
- },
- "nickname": {
- "type": "string"
- },
- "phoneNumber": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- },
- "sdkws.UserSendMsgResp": {
- "type": "object",
- "properties": {
- "clientMsgID": {
- "type": "string"
- },
- "sendTime": {
- "type": "integer"
- },
- "serverMsgID": {
- "type": "string"
- }
- }
- },
- "user.AccountCheckResp_SingleUserStatus": {
- "type": "object",
- "properties": {
- "accountStatus": {
- "type": "string"
- },
- "userID": {
- "type": "string"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/cmd/api/docs/swagger.yaml b/cmd/api/docs/swagger.yaml
deleted file mode 100644
index e3a90d694..000000000
--- a/cmd/api/docs/swagger.yaml
+++ /dev/null
@@ -1,5624 +0,0 @@
-basePath: /
-definitions:
- Open_IM_internal_api_manage.FileElem:
- properties:
- fileName:
- type: string
- filePath:
- type: string
- fileSize:
- type: integer
- sourceURL:
- type: string
- uuid:
- type: string
- type: object
- Open_IM_internal_api_manage.OANotificationElem:
- properties:
- ex:
- type: string
- fileElem:
- $ref: '#/definitions/Open_IM_internal_api_manage.FileElem'
- mixType:
- type: integer
- notificationFaceURL:
- type: string
- notificationName:
- type: string
- notificationType:
- type: integer
- pictureElem:
- $ref: '#/definitions/Open_IM_internal_api_manage.PictureElem'
- soundElem:
- $ref: '#/definitions/Open_IM_internal_api_manage.SoundElem'
- text:
- type: string
- url:
- type: string
- videoElem:
- $ref: '#/definitions/Open_IM_internal_api_manage.VideoElem'
- required:
- - notificationName
- - notificationType
- - text
- type: object
- Open_IM_internal_api_manage.PictureBaseInfo:
- properties:
- height:
- type: integer
- size:
- type: integer
- type:
- type: string
- url:
- type: string
- uuid:
- type: string
- width:
- type: integer
- type: object
- Open_IM_internal_api_manage.PictureElem:
- properties:
- bigPicture:
- $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
- snapshotPicture:
- $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
- sourcePath:
- type: string
- sourcePicture:
- $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
- type: object
- Open_IM_internal_api_manage.RevokeElem:
- properties:
- revokeMsgClientID:
- type: string
- required:
- - revokeMsgClientID
- type: object
- Open_IM_internal_api_manage.SoundElem:
- properties:
- dataSize:
- type: integer
- duration:
- type: integer
- soundPath:
- type: string
- sourceURL:
- type: string
- uuid:
- type: string
- type: object
- Open_IM_internal_api_manage.TextElem:
- properties:
- text:
- type: string
- required:
- - text
- type: object
- Open_IM_internal_api_manage.VideoElem:
- properties:
- duration:
- type: integer
- snapshotHeight:
- type: integer
- snapshotPath:
- type: string
- snapshotSize:
- type: integer
- snapshotURL:
- type: string
- snapshotUUID:
- type: string
- snapshotWidth:
- type: integer
- videoPath:
- type: string
- videoSize:
- type: integer
- videoType:
- type: string
- videoURL:
- type: string
- videoUUID:
- type: string
- type: object
- api_struct.AccountCheckReq:
- properties:
- checkUserIDList:
- items:
- type: string
- maxItems: 100
- type: array
- operationID:
- type: string
- required:
- - checkUserIDList
- - operationID
- type: object
- api_struct.AccountCheckResp:
- properties:
- data:
- items:
- $ref: '#/definitions/user.AccountCheckResp_SingleUserStatus'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.AddBlacklistReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.AddBlacklistResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.AddFriendReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- reqMsg:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.AddFriendResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.AddFriendResponseReq:
- properties:
- flag:
- enum:
- - -1
- - 0
- - 1
- type: integer
- fromUserID:
- type: string
- handleMsg:
- type: string
- operationID:
- type: string
- toUserID:
- type: string
- required:
- - flag
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.AddFriendResponseResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.ApplicationGroupResponseReq:
- properties:
- fromUserID:
- description: application from FromUserID
- type: string
- groupID:
- type: string
- handleResult:
- enum:
- - -1
- - 1
- type: integer
- handledMsg:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - groupID
- - handleResult
- - operationID
- type: object
- api_struct.ApplicationGroupResponseResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CancelMuteGroupMemberReq:
- properties:
- groupID:
- type: string
- operationID:
- type: string
- userID:
- type: string
- required:
- - groupID
- - operationID
- - userID
- type: object
- api_struct.CancelMuteGroupMemberResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CancelMuteGroupReq:
- properties:
- groupID:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.CancelMuteGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CleanUpMsgReq:
- properties:
- operationID:
- type: string
- userID:
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.CleanUpMsgResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.Comment:
- properties:
- content:
- type: string
- contentID:
- type: string
- createTime:
- type: integer
- replyUserID:
- type: string
- replyUserName:
- type: string
- userID:
- type: string
- userName:
- type: string
- type: object
- api_struct.CommentOneWorkMomentReq:
- properties:
- content:
- type: string
- operationID:
- type: string
- replyUserID:
- type: string
- workMomentID:
- type: string
- required:
- - content
- - operationID
- - workMomentID
- type: object
- api_struct.CommentOneWorkMomentResp:
- properties:
- data:
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.Conversation:
- properties:
- attachedInfo:
- type: string
- conversationID:
- type: string
- conversationType:
- type: integer
- draftTextTime:
- type: integer
- ex:
- type: string
- groupAtType:
- type: integer
- groupID:
- type: string
- isNotInGroup:
- type: boolean
- isPinned:
- type: boolean
- isPrivateChat:
- type: boolean
- ownerUserID:
- type: string
- recvMsgOpt:
- enum:
- - 0
- - 1
- - 2
- type: integer
- unreadCount:
- type: integer
- userID:
- type: string
- required:
- - conversationID
- - conversationType
- - ownerUserID
- type: object
- api_struct.CreateDepartmentMemberReq:
- properties:
- departmentID:
- type: string
- ex:
- type: string
- leader:
- type: integer
- operationID:
- type: string
- order:
- type: integer
- position:
- type: string
- status:
- type: integer
- userID:
- type: string
- required:
- - operationID
- type: object
- api_struct.CreateDepartmentMemberResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CreateDepartmentReq:
- properties:
- createTime:
- type: integer
- departmentID:
- type: string
- departmentType:
- type: integer
- ex:
- type: string
- faceURL:
- type: string
- memberNum:
- type: integer
- name:
- type: string
- operationID:
- type: string
- order:
- type: integer
- parentID:
- type: string
- subDepartmentNum:
- type: integer
- required:
- - operationID
- type: object
- api_struct.CreateDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CreateGroupReq:
- properties:
- ex:
- type: string
- faceURL:
- type: string
- groupID:
- type: string
- groupName:
- type: string
- groupType:
- type: integer
- introduction:
- type: string
- memberList:
- items:
- $ref: '#/definitions/api_struct.GroupAddMemberInfo'
- type: array
- notification:
- type: string
- operationID:
- type: string
- ownerUserID:
- type: string
- required:
- - operationID
- type: object
- api_struct.CreateGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CreateOneWorkMomentReq:
- properties:
- operationID:
- type: string
- workMoment:
- $ref: '#/definitions/office.WorkMoment'
- type: object
- api_struct.CreateOneWorkMomentResp:
- properties:
- data:
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CreateOrganizationUserReq:
- properties:
- birth:
- type: integer
- createTime:
- type: integer
- email:
- type: string
- englishName:
- type: string
- ex:
- type: string
- faceURL:
- type: string
- gender:
- type: integer
- mobile:
- type: string
- nickname:
- type: string
- operationID:
- type: string
- telephone:
- type: string
- userID:
- type: string
- required:
- - operationID
- type: object
- api_struct.CreateOrganizationUserResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.CreateTagReq:
- properties:
- operationID:
- type: string
- tagName:
- description: tag名称
- type: string
- userIDList:
- description: 用户ID列表
- items:
- type: string
- type: array
- required:
- - operationID
- - tagName
- - userIDList
- type: object
- api_struct.CreateTagResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DelMsgReq:
- properties:
- operationID:
- type: string
- seqList:
- items:
- type: integer
- type: array
- userID:
- type: string
- required:
- - operationID
- - seqList
- - userID
- type: object
- api_struct.DelMsgResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteCommentReq:
- properties:
- contentID:
- type: string
- operationID:
- type: string
- workMomentID:
- type: string
- required:
- - contentID
- - operationID
- - workMomentID
- type: object
- api_struct.DeleteCommentResp:
- properties:
- data:
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteDepartmentReq:
- properties:
- departmentID:
- type: string
- operationID:
- type: string
- required:
- - departmentID
- - operationID
- type: object
- api_struct.DeleteDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteFriendReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.DeleteFriendResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteOneWorkMomentReq:
- properties:
- operationID:
- type: string
- workMomentID:
- type: string
- required:
- - operationID
- - workMomentID
- type: object
- api_struct.DeleteOneWorkMomentResp:
- properties:
- data:
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteOrganizationUserReq:
- properties:
- operationID:
- type: string
- userID:
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.DeleteOrganizationUserResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteTagReq:
- properties:
- operationID:
- type: string
- tagID:
- type: string
- required:
- - operationID
- - tagID
- type: object
- api_struct.DeleteTagResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DeleteUserInDepartmentReq:
- properties:
- departmentID:
- type: string
- operationID:
- type: string
- userID:
- type: string
- required:
- - departmentID
- - operationID
- - userID
- type: object
- api_struct.DeleteUserInDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.DismissGroupReq:
- properties:
- groupID:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.DismissGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.ExpireTime:
- properties:
- expireTimeSeconds:
- type: integer
- type: object
- api_struct.ForceLogoutReq:
- properties:
- fromUserID:
- maxLength: 64
- minLength: 1
- type: string
- operationID:
- type: string
- platform:
- maximum: 8
- minimum: 1
- type: integer
- required:
- - fromUserID
- - operationID
- - platform
- type: object
- api_struct.ForceLogoutResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetAllConversationsReq:
- properties:
- operationID:
- type: string
- ownerUserID:
- type: string
- required:
- - operationID
- - ownerUserID
- type: object
- api_struct.GetAllConversationsResp:
- properties:
- data:
- items:
- $ref: '#/definitions/api_struct.Conversation'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetAllUsersUidReq:
- properties:
- operationID:
- type: string
- required:
- - operationID
- type: object
- api_struct.GetAllUsersUidResp:
- properties:
- data:
- items:
- type: string
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetBlackListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetBlackListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetConversationReq:
- properties:
- conversationID:
- type: string
- operationID:
- type: string
- ownerUserID:
- type: string
- required:
- - conversationID
- - operationID
- - ownerUserID
- type: object
- api_struct.GetConversationResp:
- properties:
- data:
- $ref: '#/definitions/api_struct.Conversation'
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetConversationsReq:
- properties:
- conversationIDs:
- items:
- type: string
- type: array
- operationID:
- type: string
- ownerUserID:
- type: string
- required:
- - conversationIDs
- - operationID
- - ownerUserID
- type: object
- api_struct.GetConversationsResp:
- properties:
- data:
- items:
- $ref: '#/definitions/api_struct.Conversation'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetDepartmentMemberReq:
- properties:
- departmentID:
- type: string
- operationID:
- type: string
- required:
- - departmentID
- - operationID
- type: object
- api_struct.GetDepartmentMemberResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetFriendApplyListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetFriendApplyListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetFriendListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetFriendListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetGroupAllMemberReq:
- properties:
- count:
- type: integer
- groupID:
- type: string
- offset:
- type: integer
- operationID:
- type: string
- required:
- - count
- - groupID
- - offset
- - operationID
- type: object
- api_struct.GetGroupAllMemberResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetGroupApplicationListReq:
- properties:
- fromUserID:
- description: 作为管理员或群主收到的 进群申请
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetGroupApplicationListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetGroupInfoReq:
- properties:
- groupIDList:
- items:
- type: string
- type: array
- operationID:
- type: string
- required:
- - groupIDList
- - operationID
- type: object
- api_struct.GetGroupInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetGroupMembersInfoReq:
- properties:
- groupID:
- type: string
- memberList:
- items:
- type: string
- type: array
- operationID:
- type: string
- required:
- - groupID
- - memberList
- - operationID
- type: object
- api_struct.GetGroupMembersInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetJoinedGroupListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetJoinedGroupListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetSelfApplyListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - fromUserID
- - operationID
- type: object
- api_struct.GetSelfApplyListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetSelfUserInfoReq:
- properties:
- operationID:
- type: string
- userID:
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.GetSelfUserInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetSubDepartmentReq:
- properties:
- departmentID:
- type: string
- operationID:
- type: string
- required:
- - departmentID
- - operationID
- type: object
- api_struct.GetSubDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetTagSendLogsReq:
- properties:
- operationID:
- type: string
- pageNumber:
- type: integer
- showNumber:
- type: integer
- required:
- - operationID
- - pageNumber
- - showNumber
- type: object
- api_struct.GetTagSendLogsResp:
- properties:
- data:
- properties:
- currentPage:
- type: integer
- logs:
- items:
- $ref: '#/definitions/office.TagSendLog'
- type: array
- showNumber:
- type: integer
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUserFriendWorkMomentsReq:
- properties:
- operationID:
- type: string
- pageNumber:
- type: integer
- showNumber:
- type: integer
- required:
- - operationID
- - pageNumber
- - showNumber
- type: object
- api_struct.GetUserFriendWorkMomentsResp:
- properties:
- data:
- properties:
- currentPage:
- type: integer
- showNumber:
- type: integer
- workMoments:
- items:
- $ref: '#/definitions/api_struct.WorkMoment'
- type: array
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUserInDepartmentReq:
- properties:
- operationID:
- type: string
- userID:
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.GetUserInDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUserReqGroupApplicationListReq:
- properties:
- operationID:
- type: string
- userID:
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.GetUserTagByIDReq:
- properties:
- operationID:
- type: string
- tagID:
- type: string
- required:
- - operationID
- - tagID
- type: object
- api_struct.GetUserTagByIDResp:
- properties:
- data:
- properties:
- tag:
- $ref: '#/definitions/office.Tag'
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUserTagsReq:
- properties:
- operationID:
- type: string
- required:
- - operationID
- type: object
- api_struct.GetUserTagsResp:
- properties:
- data:
- properties:
- tags:
- items:
- $ref: '#/definitions/office.Tag'
- type: array
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUserWorkMomentsReq:
- properties:
- operationID:
- type: string
- pageNumber:
- type: integer
- showNumber:
- type: integer
- userID:
- type: string
- required:
- - operationID
- - pageNumber
- - showNumber
- type: object
- api_struct.GetUserWorkMomentsResp:
- properties:
- data:
- properties:
- currentPage:
- type: integer
- showNumber:
- type: integer
- workMoments:
- items:
- $ref: '#/definitions/api_struct.WorkMoment'
- type: array
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUsersInfoReq:
- properties:
- operationID:
- type: string
- userIDList:
- items:
- type: string
- type: array
- required:
- - operationID
- - userIDList
- type: object
- api_struct.GetUsersInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetUsersOnlineStatusReq:
- properties:
- operationID:
- type: string
- userIDList:
- items:
- type: string
- maxItems: 200
- type: array
- required:
- - operationID
- - userIDList
- type: object
- api_struct.GetUsersOnlineStatusResp:
- properties:
- data:
- items:
- $ref: '#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessResult'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GetWorkMomentByIDReq:
- properties:
- operationID:
- type: string
- workMomentID:
- type: string
- required:
- - operationID
- - workMomentID
- type: object
- api_struct.GetWorkMomentByIDResp:
- properties:
- data:
- properties:
- workMoment:
- $ref: '#/definitions/api_struct.WorkMoment'
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.GroupAddMemberInfo:
- properties:
- roleLevel:
- enum:
- - 1
- - 3
- type: integer
- userID:
- type: string
- required:
- - roleLevel
- - userID
- type: object
- api_struct.ImportFriendReq:
- properties:
- friendUserIDList:
- items:
- type: string
- type: array
- fromUserID:
- type: string
- operationID:
- type: string
- required:
- - friendUserIDList
- - fromUserID
- - operationID
- type: object
- api_struct.ImportFriendResp:
- properties:
- data:
- items:
- $ref: '#/definitions/api_struct.UserIDResult'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.InviteUserToGroupReq:
- properties:
- groupID:
- type: string
- invitedUserIDList:
- items:
- type: string
- type: array
- operationID:
- type: string
- reason:
- type: string
- required:
- - groupID
- - invitedUserIDList
- - operationID
- type: object
- api_struct.InviteUserToGroupResp:
- properties:
- data:
- items:
- $ref: '#/definitions/api_struct.UserIDResult'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.IsFriendReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.IsFriendResp:
- properties:
- data:
- $ref: '#/definitions/api_struct.Response'
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.JoinGroupReq:
- properties:
- groupID:
- type: string
- inviterUserID:
- type: string
- joinSource:
- type: integer
- operationID:
- type: string
- reqMessage:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.JoinGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.KickGroupMemberReq:
- properties:
- groupID:
- type: string
- kickedUserIDList:
- items:
- type: string
- type: array
- operationID:
- type: string
- reason:
- type: string
- required:
- - groupID
- - kickedUserIDList
- - operationID
- type: object
- api_struct.KickGroupMemberResp:
- properties:
- data:
- items:
- $ref: '#/definitions/api_struct.UserIDResult'
- type: array
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.LikeOneWorkMomentReq:
- properties:
- operationID:
- type: string
- workMomentID:
- type: string
- required:
- - operationID
- - workMomentID
- type: object
- api_struct.LikeOneWorkMomentResp:
- properties:
- data:
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.ManagementBatchSendMsgReq:
- properties:
- businessOperationID:
- type: string
- contentType:
- type: integer
- groupID:
- type: string
- isOnlineOnly:
- type: boolean
- notOfflinePush:
- type: boolean
- offlinePushInfo:
- $ref: '#/definitions/sdkws.OfflinePushInfo'
- operationID:
- type: string
- recvIDList:
- items:
- type: string
- type: array
- sendID:
- type: string
- senderFaceURL:
- type: string
- senderNickname:
- type: string
- senderPlatformID:
- type: integer
- sessionType:
- type: integer
- required:
- - contentType
- - operationID
- - sendID
- - sessionType
- type: object
- api_struct.ManagementSendMsgReq:
- properties:
- businessOperationID:
- type: string
- contentType:
- type: integer
- groupID:
- type: string
- isOnlineOnly:
- type: boolean
- notOfflinePush:
- type: boolean
- offlinePushInfo:
- $ref: '#/definitions/sdkws.OfflinePushInfo'
- operationID:
- type: string
- recvID:
- type: string
- sendID:
- type: string
- senderFaceURL:
- type: string
- senderNickname:
- type: string
- senderPlatformID:
- type: integer
- sessionType:
- type: integer
- required:
- - contentType
- - operationID
- - sendID
- - sessionType
- type: object
- api_struct.ManagementSendMsgResp:
- properties:
- data:
- $ref: '#/definitions/sdkws.UserSendMsgResp'
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.MinioUploadFileResp:
- properties:
- data:
- properties:
- URL:
- type: string
- newName:
- type: string
- snapshotName:
- type: string
- snapshotURL:
- type: string
- type: object
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.MuteGroupMemberReq:
- properties:
- groupID:
- type: string
- mutedSeconds:
- type: integer
- operationID:
- type: string
- userID:
- type: string
- required:
- - groupID
- - mutedSeconds
- - operationID
- - userID
- type: object
- api_struct.MuteGroupReq:
- properties:
- groupID:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.MuteGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.ParseTokenReq:
- properties:
- operationID:
- type: string
- required:
- - operationID
- type: object
- api_struct.ParseTokenResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.QuitGroupReq:
- properties:
- groupID:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.QuitGroupResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.RemoveBlackListReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.RemoveBlackListResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.Response:
- properties:
- isFriend:
- type: boolean
- type: object
- api_struct.SendMsg2TagReq:
- properties:
- content:
- type: string
- groupList:
- items:
- type: string
- type: array
- operationID:
- type: string
- senderPlatformID:
- type: integer
- tagList:
- items:
- type: string
- type: array
- userList:
- items:
- type: string
- type: array
- required:
- - content
- - operationID
- - senderPlatformID
- type: object
- api_struct.SendMsg2TagResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.SetFriendRemarkReq:
- properties:
- fromUserID:
- type: string
- operationID:
- type: string
- remark:
- type: string
- toUserID:
- type: string
- required:
- - fromUserID
- - operationID
- - toUserID
- type: object
- api_struct.SetFriendRemarkResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.SetGlobalRecvMessageOptReq:
- properties:
- globalRecvMsgOpt:
- enum:
- - 0
- - 1
- - 2
- type: integer
- operationID:
- type: string
- required:
- - operationID
- type: object
- api_struct.SetGlobalRecvMessageOptResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.SetGroupInfoReq:
- properties:
- applyMemberFriend:
- type: integer
- ex:
- type: string
- faceURL:
- type: string
- groupID:
- type: string
- groupName:
- type: string
- introduction:
- type: string
- lookMemberInfo:
- type: integer
- needVerification:
- type: integer
- notification:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - operationID
- type: object
- api_struct.SetGroupInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.SetGroupMemberInfoReq:
- properties:
- ex:
- type: string
- groupID:
- type: string
- nickname:
- type: string
- operationID:
- type: string
- roleLevel:
- maximum: 3
- minimum: 1
- type: integer
- userGroupFaceUrl:
- type: string
- userID:
- type: string
- required:
- - groupID
- - operationID
- - userID
- type: object
- api_struct.SetGroupMemberInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.SetTagReq:
- properties:
- increaseUserIDList:
- items:
- type: string
- type: array
- newName:
- type: string
- operationID:
- type: string
- reduceUserIDList:
- items:
- type: string
- type: array
- tagID:
- type: string
- required:
- - operationID
- - tagID
- type: object
- api_struct.SetTagResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.Swagger400Resp:
- properties:
- errCode:
- example: 400
- type: integer
- errMsg:
- example: err msg
- type: string
- type: object
- api_struct.Swagger500Resp:
- properties:
- errCode:
- example: 500
- type: integer
- errMsg:
- example: err msg
- type: string
- type: object
- api_struct.TransferGroupOwnerReq:
- properties:
- groupID:
- type: string
- newOwnerUserID:
- type: string
- oldOwnerUserID:
- type: string
- operationID:
- type: string
- required:
- - groupID
- - newOwnerUserID
- - oldOwnerUserID
- - operationID
- type: object
- api_struct.TransferGroupOwnerResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UpdateDepartmentReq:
- properties:
- createTime:
- type: integer
- departmentID:
- type: string
- departmentType:
- type: integer
- ex:
- type: string
- faceURL:
- type: string
- memberNum:
- type: integer
- name:
- type: string
- operationID:
- type: string
- order:
- type: integer
- parentID:
- type: string
- subDepartmentNum:
- type: integer
- required:
- - departmentID
- - operationID
- type: object
- api_struct.UpdateDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UpdateOrganizationUserReq:
- properties:
- birth:
- type: integer
- createTime:
- type: integer
- email:
- type: string
- englishName:
- type: string
- ex:
- type: string
- faceURL:
- type: string
- gender:
- type: integer
- mobile:
- type: string
- nickname:
- type: string
- operationID:
- type: string
- telephone:
- type: string
- userID:
- type: string
- required:
- - operationID
- type: object
- api_struct.UpdateOrganizationUserResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UpdateSelfUserInfoReq:
- properties:
- birth:
- type: integer
- email:
- maxLength: 64
- type: string
- ex:
- maxLength: 1024
- type: string
- faceURL:
- maxLength: 1024
- type: string
- gender:
- enum:
- - 0
- - 1
- - 2
- type: integer
- nickname:
- maxLength: 64
- minLength: 1
- type: string
- operationID:
- type: string
- phoneNumber:
- maxLength: 32
- type: string
- userID:
- maxLength: 64
- minLength: 1
- type: string
- required:
- - operationID
- - userID
- type: object
- api_struct.UpdateUserInDepartmentReq:
- properties:
- departmentID:
- type: string
- ex:
- type: string
- leader:
- type: integer
- operationID:
- type: string
- order:
- type: integer
- position:
- type: string
- status:
- type: integer
- userID:
- type: string
- required:
- - operationID
- type: object
- api_struct.UpdateUserInDepartmentResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UpdateUserInfoResp:
- properties:
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UserIDResult:
- properties:
- result:
- type: integer
- userID:
- type: string
- type: object
- api_struct.UserRegisterReq:
- properties:
- birth:
- type: integer
- email:
- maxLength: 64
- type: string
- ex:
- maxLength: 1024
- type: string
- faceURL:
- maxLength: 1024
- type: string
- gender:
- enum:
- - 0
- - 1
- - 2
- type: integer
- nickname:
- maxLength: 64
- minLength: 1
- type: string
- operationID:
- type: string
- phoneNumber:
- maxLength: 32
- type: string
- platform:
- maximum: 7
- minimum: 1
- type: integer
- secret:
- maxLength: 32
- type: string
- userID:
- maxLength: 64
- minLength: 1
- type: string
- required:
- - operationID
- - platform
- - secret
- - userID
- type: object
- api_struct.UserRegisterResp:
- properties:
- data:
- $ref: '#/definitions/api_struct.UserTokenInfo'
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.UserTokenInfo:
- properties:
- expiredTime:
- type: integer
- token:
- type: string
- userID:
- type: string
- type: object
- api_struct.UserTokenReq:
- properties:
- operationID:
- type: string
- platform:
- maximum: 8
- minimum: 1
- type: integer
- secret:
- maxLength: 32
- type: string
- userID:
- maxLength: 64
- minLength: 1
- type: string
- required:
- - operationID
- - platform
- - secret
- - userID
- type: object
- api_struct.UserTokenResp:
- properties:
- data:
- $ref: '#/definitions/api_struct.UserTokenInfo'
- errCode:
- type: integer
- errMsg:
- type: string
- type: object
- api_struct.WorkMoment:
- properties:
- atUsers:
- items:
- $ref: '#/definitions/api_struct.WorkMomentUser'
- type: array
- comments:
- items:
- $ref: '#/definitions/api_struct.Comment'
- type: array
- content:
- type: string
- createTime:
- type: integer
- faceURL:
- type: string
- likeUsers:
- items:
- $ref: '#/definitions/api_struct.WorkMomentUser'
- type: array
- permission:
- type: integer
- permissionUsers:
- items:
- $ref: '#/definitions/api_struct.WorkMomentUser'
- type: array
- userID:
- type: string
- userName:
- type: string
- workMomentID:
- type: string
- type: object
- api_struct.WorkMomentUser:
- properties:
- userID:
- type: string
- userName:
- type: string
- type: object
- internal_api_manage.FileElem:
- properties:
- fileName:
- type: string
- filePath:
- type: string
- fileSize:
- type: integer
- sourceURL:
- type: string
- uuid:
- type: string
- type: object
- internal_api_manage.OANotificationElem:
- properties:
- ex:
- type: string
- fileElem:
- $ref: '#/definitions/internal_api_manage.FileElem'
- mixType:
- type: integer
- notificationFaceURL:
- type: string
- notificationName:
- type: string
- notificationType:
- type: integer
- pictureElem:
- $ref: '#/definitions/internal_api_manage.PictureElem'
- soundElem:
- $ref: '#/definitions/internal_api_manage.SoundElem'
- text:
- type: string
- url:
- type: string
- videoElem:
- $ref: '#/definitions/internal_api_manage.VideoElem'
- required:
- - notificationName
- - notificationType
- - text
- type: object
- internal_api_manage.PictureBaseInfo:
- properties:
- height:
- type: integer
- size:
- type: integer
- type:
- type: string
- url:
- type: string
- uuid:
- type: string
- width:
- type: integer
- type: object
- internal_api_manage.PictureElem:
- properties:
- bigPicture:
- $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
- snapshotPicture:
- $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
- sourcePath:
- type: string
- sourcePicture:
- $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
- type: object
- internal_api_manage.RevokeElem:
- properties:
- revokeMsgClientID:
- type: string
- required:
- - revokeMsgClientID
- type: object
- internal_api_manage.SoundElem:
- properties:
- dataSize:
- type: integer
- duration:
- type: integer
- soundPath:
- type: string
- sourceURL:
- type: string
- uuid:
- type: string
- type: object
- internal_api_manage.TextElem:
- properties:
- text:
- type: string
- required:
- - text
- type: object
- internal_api_manage.VideoElem:
- properties:
- duration:
- type: integer
- snapshotHeight:
- type: integer
- snapshotPath:
- type: string
- snapshotSize:
- type: integer
- snapshotURL:
- type: string
- snapshotUUID:
- type: string
- snapshotWidth:
- type: integer
- videoPath:
- type: string
- videoSize:
- type: integer
- videoType:
- type: string
- videoURL:
- type: string
- videoUUID:
- type: string
- type: object
- office.Comment:
- properties:
- content:
- type: string
- contentID:
- type: string
- createTime:
- type: integer
- faceURL:
- type: string
- replyUserID:
- type: string
- replyUserName:
- type: string
- userID:
- type: string
- userName:
- type: string
- type: object
- office.PermissionGroup:
- properties:
- groupID:
- type: string
- groupName:
- type: string
- type: object
- office.Tag:
- properties:
- tagID:
- type: string
- tagName:
- type: string
- userList:
- items:
- $ref: '#/definitions/office.TagUser'
- type: array
- type: object
- office.TagSendLog:
- properties:
- content:
- type: string
- sendTime:
- type: integer
- userList:
- items:
- $ref: '#/definitions/office.TagUser'
- type: array
- type: object
- office.TagUser:
- properties:
- userID:
- type: string
- userName:
- type: string
- type: object
- office.WorkMoment:
- properties:
- atUserList:
- items:
- $ref: '#/definitions/office.WorkMomentUser'
- type: array
- comments:
- items:
- $ref: '#/definitions/office.Comment'
- type: array
- content:
- type: string
- createTime:
- type: integer
- faceURL:
- type: string
- likeUserList:
- items:
- $ref: '#/definitions/office.WorkMomentUser'
- type: array
- permission:
- type: integer
- permissionGroupList:
- items:
- $ref: '#/definitions/office.PermissionGroup'
- type: array
- permissionUserList:
- items:
- $ref: '#/definitions/office.WorkMomentUser'
- type: array
- userID:
- type: string
- userName:
- type: string
- workMomentID:
- type: string
- type: object
- office.WorkMomentUser:
- properties:
- userID:
- type: string
- userName:
- type: string
- type: object
- pbRelay.GetUsersOnlineStatusResp_SuccessDetail:
- properties:
- platform:
- type: string
- status:
- type: string
- type: object
- pbRelay.GetUsersOnlineStatusResp_SuccessResult:
- properties:
- detailPlatformStatus:
- items:
- $ref: '#/definitions/pbRelay.GetUsersOnlineStatusResp_SuccessDetail'
- type: array
- status:
- type: string
- userID:
- type: string
- type: object
- sdkws.Department:
- properties:
- createTime:
- type: integer
- departmentID:
- type: string
- departmentType:
- type: integer
- ex:
- type: string
- faceURL:
- type: string
- memberNum:
- type: integer
- name:
- type: string
- order:
- type: integer
- parentID:
- type: string
- subDepartmentNum:
- type: integer
- type: object
- sdkws.DepartmentMember:
- properties:
- departmentID:
- type: string
- ex:
- type: string
- leader:
- type: integer
- order:
- type: integer
- position:
- type: string
- status:
- type: integer
- userID:
- type: string
- type: object
- sdkws.FriendInfo:
- properties:
- addSource:
- type: integer
- createTime:
- type: integer
- ex:
- type: string
- friendUser:
- $ref: '#/definitions/sdkws.UserInfo'
- operatorUserID:
- type: string
- ownerUserID:
- type: string
- remark:
- type: string
- type: object
- sdkws.FriendRequest:
- properties:
- createTime:
- type: integer
- ex:
- type: string
- fromFaceURL:
- type: string
- fromGender:
- type: integer
- fromNickname:
- type: string
- fromUserID:
- type: string
- handleMsg:
- type: string
- handleResult:
- type: integer
- handleTime:
- type: integer
- handlerUserID:
- type: string
- reqMsg:
- type: string
- toFaceURL:
- type: string
- toGender:
- type: integer
- toNickname:
- type: string
- toUserID:
- type: string
- type: object
- sdkws.GroupInfo:
- properties:
- applyMemberFriend:
- type: integer
- createTime:
- type: integer
- creatorUserID:
- type: string
- ex:
- type: string
- faceURL:
- type: string
- groupID:
- type: string
- groupName:
- type: string
- groupType:
- type: integer
- introduction:
- type: string
- lookMemberInfo:
- type: integer
- memberCount:
- type: integer
- needVerification:
- type: integer
- notification:
- type: string
- notificationUpdateTime:
- type: integer
- notificationUserID:
- type: string
- ownerUserID:
- type: string
- status:
- type: integer
- type: object
- sdkws.GroupMemberFullInfo:
- properties:
- appMangerLevel:
- type: integer
- ex:
- type: string
- faceURL:
- type: string
- groupID:
- type: string
- inviterUserID:
- type: string
- joinSource:
- type: integer
- joinTime:
- type: integer
- muteEndTime:
- type: integer
- nickname:
- type: string
- operatorUserID:
- type: string
- roleLevel:
- type: integer
- userID:
- type: string
- type: object
- sdkws.GroupRequest:
- properties:
- ex:
- type: string
- groupInfo:
- $ref: '#/definitions/sdkws.GroupInfo'
- handleMsg:
- type: string
- handleResult:
- type: integer
- handleTime:
- type: integer
- handleUserID:
- type: string
- inviterUserID:
- type: string
- joinSource:
- type: integer
- reqMsg:
- type: string
- reqTime:
- type: integer
- userInfo:
- $ref: '#/definitions/sdkws.PublicUserInfo'
- type: object
- sdkws.OfflinePushInfo:
- properties:
- desc:
- type: string
- ex:
- type: string
- iOSBadgeCount:
- type: boolean
- iOSPushSound:
- type: string
- title:
- type: string
- type: object
- sdkws.OrganizationUser:
- properties:
- birth:
- type: integer
- createTime:
- type: integer
- email:
- type: string
- englishName:
- type: string
- ex:
- type: string
- faceURL:
- type: string
- gender:
- type: integer
- mobile:
- type: string
- nickname:
- type: string
- telephone:
- type: string
- userID:
- type: string
- type: object
- sdkws.PublicUserInfo:
- properties:
- ex:
- type: string
- faceURL:
- type: string
- gender:
- type: integer
- nickname:
- type: string
- userID:
- type: string
- type: object
- sdkws.UserDepartmentMember:
- properties:
- departmentMember:
- $ref: '#/definitions/sdkws.DepartmentMember'
- organizationUser:
- $ref: '#/definitions/sdkws.OrganizationUser'
- type: object
- sdkws.UserInDepartment:
- properties:
- departmentMemberList:
- items:
- $ref: '#/definitions/sdkws.DepartmentMember'
- type: array
- organizationUser:
- $ref: '#/definitions/sdkws.OrganizationUser'
- type: object
- sdkws.UserInfo:
- properties:
- appMangerLevel:
- type: integer
- birth:
- type: integer
- createTime:
- type: integer
- email:
- type: string
- ex:
- type: string
- faceURL:
- type: string
- gender:
- type: integer
- globalRecvMsgOpt:
- type: integer
- nickname:
- type: string
- phoneNumber:
- type: string
- userID:
- type: string
- type: object
- sdkws.UserSendMsgResp:
- properties:
- clientMsgID:
- type: string
- sendTime:
- type: integer
- serverMsgID:
- type: string
- type: object
- user.AccountCheckResp_SingleUserStatus:
- properties:
- accountStatus:
- type: string
- userID:
- type: string
- type: object
-info:
- contact: {}
- description: open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪
- license:
- name: Apache 2.0
- url: http://www.apache.org/licenses/LICENSE-2.0.html
- title: open-IM-Server API
- version: "1.0"
-paths:
- /auth/force_logout:
- post:
- consumes:
- - application/json
- description: 对应的平台强制登出
- operationId: ForceLogout
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: platform为平台ID
fromUserID为要执行强制登出的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.ForceLogoutReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.ForceLogoutResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 强制登出
- tags:
- - 鉴权认证
- /auth/parse_token:
- post:
- consumes:
- - application/json
- description: 解析当前用户token(token在请求头中传入)
- operationId: ParseToken
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.ParseTokenReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ParseTokenResp'
- - properties:
- Data:
- $ref: '#/definitions/api_struct.ExpireTime'
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 解析当前用户token
- tags:
- - 鉴权认证
- /auth/user_register:
- post:
- consumes:
- - application/json
- description: 用户注册
- operationId: UserRegister
- parameters:
- - description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
-
ex为拓展字段
gender为性别, 0为女, 1为男
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UserRegisterReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UserRegisterResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 用户注册
- tags:
- - 鉴权认证
- /auth/user_token:
- post:
- consumes:
- - application/json
- description: 获取用户的token
- operationId: UserToken
- parameters:
- - description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UserTokenReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UserTokenResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 用户登录
- tags:
- - 鉴权认证
- /friend/add_black:
- post:
- consumes:
- - application/json
- description: 添加黑名单
- operationId: AddBlack
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为设置的用户
toUserID为被设置的用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.AddBlacklistReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.AddBlacklistResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 添加黑名单
- tags:
- - 好友相关
- /friend/add_friend:
- post:
- consumes:
- - application/json
- description: 添加好友
- operationId: AddFriend
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: reqMsg为申请信息
fromUserID为申请用户
toUserID为被添加用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.AddFriendReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.AddFriendResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 添加好友
- tags:
- - 好友相关
- /friend/add_friend_response:
- post:
- consumes:
- - application/json
- description: 同意/拒绝好友请求
- operationId: AddFriendResponse
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID同意/拒绝的用户ID
toUserID为申请用户D
handleMsg为处理信息
flag为具体操作,
- 1为同意, 2为拒绝
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.AddFriendResponseReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.AddFriendResponseResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 同意/拒绝好友请求
- tags:
- - 好友相关
- /friend/delete_friend:
- post:
- consumes:
- - application/json
- description: 删除好友
- operationId: DeleteFriend
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为操作用户
toUserID为被删除用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteFriendReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteFriendResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除好友
- tags:
- - 好友相关
- /friend/get_black_list:
- post:
- consumes:
- - application/json
- description: 获取黑名单列表
- operationId: GetBlacklist
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID要获取黑名单的用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetBlackListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetBlackListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.PublicUserInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- summary: 获取黑名单列表
- tags:
- - 好友相关
- /friend/get_friend_apply_list:
- post:
- consumes:
- - application/json
- description: 删除好友
- operationId: GetFriendApplyList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为要获取申请列表的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetFriendApplyListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetFriendApplyListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.FriendRequest'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- summary: 获取好友申请列表
- tags:
- - 好友相关
- /friend/get_friend_list:
- post:
- consumes:
- - application/json
- description: 获取用户的好友列表
- operationId: GetFriendList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为要获取好友列表的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetFriendListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetFriendListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.FriendInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户的好友列表
- tags:
- - 好友相关
- /friend/get_self_friend_apply_list:
- post:
- consumes:
- - application/json
- description: 获取自己的好友申请列表
- operationId: GetSelfFriendApplyList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为自己的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetSelfApplyListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetSelfApplyListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.FriendRequest'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取自己的好友申请列表
- tags:
- - 好友相关
- /friend/import_friend:
- post:
- consumes:
- - application/json
- description: 批量加好友
- operationId: ImportFriend
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID批量加好友的用户ID
friendUserIDList为
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.ImportFriendReq'
- produces:
- - application/json
- responses:
- "0":
- description: data列表中对象的result-1为添加该用户失败
0为成功
- schema:
- $ref: '#/definitions/api_struct.ImportFriendResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 批量加好友
- tags:
- - 好友相关
- /friend/is_friend:
- post:
- consumes:
- - application/json
- description: 检查用户之间是否为好友
- operationId: IsFriend
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为请求用户
toUserID为要检查的用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.IsFriendReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.IsFriendResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 检查用户之间是否为好友
- tags:
- - 好友相关
- /friend/remove_black:
- post:
- consumes:
- - application/json
- description: 把用户移除黑名单
- operationId: RemoveBlack
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID要获取黑名单的用户
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.RemoveBlackListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.RemoveBlackListResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 把用户移除黑名单
- tags:
- - 好友相关
- /friend/set_friend_remark:
- post:
- consumes:
- - application/json
- description: 设置好友备注
- operationId: SetFriendRemark
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为设置的用户
toUserID为被设置的用户
remark为好友备注
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SetFriendRemarkReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SetFriendRemarkResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 设置好友备注
- tags:
- - 好友相关
- /group/cancel_mute_group:
- post:
- consumes:
- - application/json
- description: 取消禁言群组
- operationId: CancelMuteGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为群组ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CancelMuteGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CancelMuteGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 取消禁言群组
- tags:
- - 群组相关
- /group/cancel_mute_group_member:
- post:
- consumes:
- - application/json
- description: 取消禁言群成员
- operationId: CancelMuteGroupMember
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为群组ID
userID为要取消禁言的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CancelMuteGroupMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CancelMuteGroupMemberResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 取消禁言群成员
- tags:
- - 群组相关
- /group/create_group:
- post:
- consumes:
- - application/json
- description: 创建群组
- operationId: CreateGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupType这里填0代表普通群
groupName为群名称
introduction为群介绍
- notification为群公共
ownerUserID为群主ID
ex为群扩展字段
memberList中对象roleLevel为群员角色,1为普通用户
- 2为群主 3为管理员
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.CreateGroupResp'
- - properties:
- data:
- $ref: '#/definitions/sdkws.GroupInfo'
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 创建群组
- tags:
- - 群组相关
- /group/dismiss_group:
- post:
- consumes:
- - application/json
- description: 解散群组
- operationId: DismissGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要解散的群组ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DismissGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DismissGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 解散群组
- tags:
- - 群组相关
- /group/get_group_all_member_list:
- post:
- consumes:
- - application/json
- description: 获取全部群成员列表
- operationId: GetGroupAllMemberList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: GroupID为要获取群成员的群ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetGroupAllMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetGroupAllMemberResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.GroupMemberFullInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取全部群成员列表
- tags:
- - 群组相关
- /group/get_group_members_info:
- post:
- consumes:
- - application/json
- description: 获取群成员信息
- operationId: GetGroupMembersInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要获取的群ID
memberList为要获取群成员的群ID列表
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetGroupMembersInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetGroupMembersInfoResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.GroupMemberFullInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取群成员信息
- tags:
- - 群组相关
- /group/get_groups_info:
- post:
- consumes:
- - application/json
- description: 通过群ID列表获取群信息
- operationId: GetGroupsInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupIDList为群ID列表
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetGroupInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetGroupInfoResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 通过群ID列表获取群信息
- tags:
- - 群组相关
- /group/get_joined_group_list:
- post:
- consumes:
- - application/json
- description: 获取用户加入群列表
- operationId: GetJoinedGroupList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为要获取的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetJoinedGroupListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetJoinedGroupListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.GroupInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户加入群列表
- tags:
- - 群组相关
- /group/get_recv_group_applicationList:
- post:
- consumes:
- - application/json
- description: 获取用户收到的加群信息列表
- operationId: GetRecvGroupApplicationList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: fromUserID为要获取的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetGroupApplicationListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetGroupApplicationListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.GroupRequest'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户收到的加群信息列表
- tags:
- - 群组相关
- /group/get_user_req_group_applicationList:
- post:
- consumes:
- - application/json
- description: 获取用户加群申请列表
- operationId: GetUserReqGroupApplicationList
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: userID为要获取的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserReqGroupApplicationListReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetGroupApplicationListResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.GroupRequest'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户加群申请列表
- tags:
- - 群组相关
- /group/group_application_response:
- post:
- consumes:
- - application/json
- description: 处理加群消息
- operationId: ApplicationGroupResponse
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要处理的群ID
fromUserID为要处理的用户ID
handleMsg为处理结果信息
-
handleResult为处理结果 1为同意加群 2为拒绝加群
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.ApplicationGroupResponseReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.ApplicationGroupResponseResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 处理加群消息
- tags:
- - 群组相关
- /group/invite_user_to_group:
- post:
- consumes:
- - application/json
- description: 将用户拉入群组
- operationId: InviteUserToGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要拉进的群组ID
invitedUserIDList为要获取群成员的群ID列表
reason为原因
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.InviteUserToGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: result为结果码, -1为失败, 0为成功
- schema:
- $ref: '#/definitions/api_struct.InviteUserToGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 将用户拉入群组
- tags:
- - 群组相关
- /group/join_group:
- post:
- consumes:
- - application/json
- description: 加入群聊
- operationId: JoinGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: reqMessage为申请进群信息
groupID为申请的群ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.JoinGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.JoinGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 加入群聊
- tags:
- - 群组相关
- /group/kick_group:
- post:
- consumes:
- - application/json
- description: 把用户踢出群组
- operationId: KickGroupMember
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: GroupID为要操作的群ID
kickedUserIDList为要踢出的群用户ID
reason为原因
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.KickGroupMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: result为结果码, -1为失败, 0为成功
- schema:
- $ref: '#/definitions/api_struct.KickGroupMemberResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 把用户踢出群组
- tags:
- - 群组相关
- /group/mute_group:
- post:
- consumes:
- - application/json
- description: 禁言群组
- operationId: MuteGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为群组ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.MuteGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.MuteGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.MuteGroupResp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.MuteGroupResp'
- summary: 禁言群组
- tags:
- - 群组相关
- /group/mute_group_member:
- post:
- consumes:
- - application/json
- description: 禁言群成员
- operationId: MuteGroupMember
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为群组ID
userID为要禁言的用户ID
mutedSeconds为禁言秒数
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.MuteGroupMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DismissGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 禁言群成员
- tags:
- - 群组相关
- /group/quit_group:
- post:
- consumes:
- - application/json
- description: 当前用户退出群聊
- operationId: QuitGroup
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要退出的群ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.QuitGroupReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.QuitGroupResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 当前用户退出群聊
- tags:
- - 群组相关
- /group/set_group_info:
- post:
- consumes:
- - application/json
- description: 设置群信息
- operationId: SetGroupInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: groupID为要修改的群ID
groupName为新的群名称
notification为群介绍
introduction为群公告
-
needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SetGroupInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SetGroupInfoResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 设置群信息
- tags:
- - 群组相关
- /group/set_group_member_info:
- post:
- consumes:
- - application/json
- description: 修改群成员信息
- operationId: SetGroupMemberInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 除了operationID, userID, groupID其他参数可选
ex为拓展字段
faceURL为群头像
nickName为群昵称
roleLevel为群员角色,1为普通用户
- 2为群主 3为管理员
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SetGroupMemberInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SetGroupMemberInfoResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 修改群成员信息
- tags:
- - 群组相关
- /group/transfer_group:
- post:
- consumes:
- - application/json
- description: 转让群主
- operationId: TransferGroupOwner
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: GroupID为要操作的群ID
oldOwnerUserID为老群主ID
newOwnerUserID为新群主ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.TransferGroupOwnerReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.TransferGroupOwnerResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 转让群主
- tags:
- - 群组相关
- /msg/batch_send_msg:
- post:
- consumes:
- - application/json
- description: 管理员批量发送群聊单聊消息 消息格式详细见消息格式
- operationId: ManagementBatchSendMsg
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 该请求和消息结构体一样
recvIDList为接受消息的用户ID列表
- in: body
- name: 管理员批量发送单聊消息
- required: true
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ManagementBatchSendMsgReq'
- - properties:
- content:
- $ref: '#/definitions/Open_IM_internal_api_manage.TextElem'
- type: object
- - description: 该请求和消息结构体一样
recvIDList为接受消息的用户ID列表
- in: body
- name: 管理员批量发送OA通知
- required: true
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ManagementSendMsgReq'
- - properties:
- content:
- $ref: '#/definitions/Open_IM_internal_api_manage.OANotificationElem'
- type: object
- produces:
- - application/json
- responses:
- "0":
- description: serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间
- schema:
- $ref: '#/definitions/api_struct.ManagementBatchSendMsgReq'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.ManagementBatchSendMsgReq'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.ManagementBatchSendMsgReq'
- summary: 管理员批量发送群聊单聊消息
- tags:
- - 消息相关
- /msg/clear_msg:
- post:
- consumes:
- - application/json
- description: 清空用户消息
- operationId: ClearMsg
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: userID为要清空的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CleanUpMsgReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CleanUpMsgResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 清空用户消息
- tags:
- - 消息相关
- /msg/del_msg:
- post:
- consumes:
- - application/json
- description: 根据seq列表删除消息
- operationId: DelMsg
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: userID为要删除的用户ID
seqList为seq列表
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DelMsgReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DelMsgResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 根据seq列表删除消息
- tags:
- - 消息相关
- /msg/get_all_conversations:
- post:
- consumes:
- - application/json
- description: 获取用户所有会话
- operationId: GetAllConversations
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: ownerUserID为要获取的用户ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetAllConversationsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetAllConversationsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户所有会话
- tags:
- - 会话相关
- /msg/get_conversation:
- post:
- consumes:
- - application/json
- description: 根据会话ID获取会话
- operationId: GetConversation
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: ownerUserID为要获取的用户ID
conversationID为要获取的会话ID
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetConversationReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetConversationResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 根据会话ID获取会话
- tags:
- - 会话相关
- /msg/get_conversations:
- post:
- consumes:
- - application/json
- description: 根据会话ID列表获取会话
- operationId: GetConversations
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: ownerUserID为要获取的用户ID
conversationIDs为要获取的会话ID列表
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetConversationsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetConversationsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 根据会话ID列表获取会话
- tags:
- - 会话相关
- /msg/manage_send_msg:
- post:
- consumes:
- - application/json
- description: 管理员发送/撤回消息 消息格式详细见消息格式
- operationId: ManagementSendMsg
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 该请求和消息结构体一样
- in: body
- name: 管理员发送文字消息
- required: true
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ManagementSendMsgReq'
- - properties:
- content:
- $ref: '#/definitions/Open_IM_internal_api_manage.TextElem'
- type: object
- - description: 该请求和消息结构体一样
- in: body
- name: 管理员发送OA通知消息
- required: true
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ManagementSendMsgReq'
- - properties:
- content:
- $ref: '#/definitions/Open_IM_internal_api_manage.OANotificationElem'
- type: object
- - description: 该请求和消息结构体一样
- in: body
- name: 管理员撤回单聊消息
- required: true
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.ManagementSendMsgReq'
- - properties:
- content:
- $ref: '#/definitions/Open_IM_internal_api_manage.RevokeElem'
- type: object
- produces:
- - application/json
- responses:
- "0":
- description: serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间
- schema:
- $ref: '#/definitions/api_struct.ManagementSendMsgResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.ManagementSendMsgResp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.ManagementSendMsgResp'
- summary: 管理员发送/撤回消息
- tags:
- - 消息相关
- /office/comment_one_work_moment:
- post:
- consumes:
- - application/json
- description: 评论一条工作圈
- operationId: CommentOneWorkMoment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CommentOneWorkMomentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CommentOneWorkMomentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 评论一条工作圈
- tags:
- - 工作圈
- /office/create_one_work_moment:
- post:
- consumes:
- - application/json
- description: 用户创建一条工作圈
- operationId: CreateOneWorkMoment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求 atUserList likeUserList permissionGroupList permissionUserList
- 字段中userName可以不填
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateOneWorkMomentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CreateOneWorkMomentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 创建一条工作圈
- tags:
- - 工作圈
- /office/create_tag:
- post:
- consumes:
- - application/json
- description: 创建标签
- operationId: CreateTag
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateTagReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CreateTagResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 创建标签
- tags:
- - 标签
- /office/delete_comment:
- post:
- consumes:
- - application/json
- description: 删除一条评论
- operationId: DeleteComment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteCommentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteCommentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除一条评论
- tags:
- - 工作圈
- /office/delete_one_work_moment:
- post:
- consumes:
- - application/json
- description: 根据用户工作圈ID删除一条工作圈
- operationId: DeleteOneWorkMoment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteOneWorkMomentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteOneWorkMomentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除一条工作圈
- tags:
- - 工作圈
- /office/delete_tag:
- post:
- consumes:
- - application/json
- description: 根据标签ID创建标签
- operationId: DeleteTag
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteTagReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteTagResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除标签
- tags:
- - 标签
- /office/get_send_tag_log:
- post:
- consumes:
- - application/json
- description: 分页获取发送历史记录
- operationId: GetTagSendLogs
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetTagSendLogsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetTagSendLogsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取发送历史记录
- tags:
- - 标签
- /office/get_user_friend_work_moments:
- post:
- consumes:
- - application/json
- description: 查询用户工作圈页面
- operationId: GetUserFriendWorkMoments
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserFriendWorkMomentsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetUserFriendWorkMomentsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 查询自己大工作圈页面
- tags:
- - 工作圈
- /office/get_user_tag_by_id:
- post:
- consumes:
- - application/json
- description: 通过标签id获取该用户的标签信息
- operationId: GetUserTagByID
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserTagByIDReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetUserTagByIDResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取该用户的标签信息
- tags:
- - 标签
- /office/get_user_tags:
- post:
- consumes:
- - application/json
- description: 用户获取自己的所有的标签
- operationId: GetUserTags
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserTagsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetUserTagsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户标签信息
- tags:
- - 标签
- /office/get_user_work_moments:
- post:
- consumes:
- - application/json
- description: 查询用户工作圈
- operationId: GetUserWorkMoments
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserWorkMomentsReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetUserWorkMomentsResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 查询用户工作圈
- tags:
- - 工作圈
- /office/get_work_moment_by_id:
- post:
- consumes:
- - application/json
- description: 通过ID获取工作圈
- operationId: GetWorkMomentByID
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetWorkMomentByIDReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetWorkMomentByIDResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 通过ID获取工作圈
- tags:
- - 工作圈
- /office/like_one_work_moment:
- post:
- consumes:
- - application/json
- description: 工作圈ID点赞一条工作圈
- operationId: LikeOneWorkMoment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.LikeOneWorkMomentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.LikeOneWorkMomentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 点赞一条工作圈
- tags:
- - 工作圈
- /office/send_msg_to_tag:
- post:
- consumes:
- - application/json
- description: 对标签用户发送消息
- operationId: SendMsg2Tag
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SendMsg2TagReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SendMsg2TagResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 发送标签消息
- tags:
- - 标签
- /office/set_tag:
- post:
- consumes:
- - application/json
- description: 根据标签ID修改标签用户列表, 名称
- operationId: SetTag
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SetTagReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SetTagResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 修改标签
- tags:
- - 标签
- /organization/create_department:
- post:
- consumes:
- - application/json
- description: 创建部门
- operationId: CreateDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.CreateDepartmentResp'
- - properties:
- data:
- $ref: '#/definitions/sdkws.Department'
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 创建部门
- tags:
- - 组织架构相关
- /organization/create_department_member:
- post:
- consumes:
- - application/json
- description: 创建部门用户
- operationId: CreateDepartmentMember
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateDepartmentMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CreateDepartmentMemberResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 创建部门用户
- tags:
- - 组织架构相关
- /organization/create_organization_user:
- post:
- consumes:
- - application/json
- description: 组织架构导入用户
- operationId: CreateOrganizationUser
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.CreateOrganizationUserReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.CreateOrganizationUserResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 组织架构导入用户
- tags:
- - 组织架构相关
- /organization/delete_department:
- post:
- consumes:
- - application/json
- description: 删除部门
- operationId: DeleteDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteDepartmentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除部门
- tags:
- - 组织架构相关
- /organization/delete_organization_user:
- post:
- consumes:
- - application/json
- description: 删除组织架构中某个用户
- operationId: DeleteOrganizationUser
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteOrganizationUserReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteOrganizationUserResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除组织架构中某个用户
- tags:
- - 组织架构相关
- /organization/delete_user_in_department:
- post:
- consumes:
- - application/json
- description: 删除部门中某个用户
- operationId: DeleteUserInDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.DeleteUserInDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.DeleteUserInDepartmentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 删除部门中某个用户
- tags:
- - 组织架构相关
- /organization/get_department_member:
- post:
- consumes:
- - application/json
- description: 获取部门中所有成员
- operationId: GetDepartmentMember
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetDepartmentMemberReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetDepartmentMemberResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.UserDepartmentMember'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取部门中所有成员
- tags:
- - 组织架构相关
- /organization/get_sub_department:
- post:
- consumes:
- - application/json
- description: 获取子部门列表
- operationId: GetSubDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetSubDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetSubDepartmentResp'
- - properties:
- data:
- items:
- $ref: '#/definitions/sdkws.Department'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取子部门列表
- tags:
- - 组织架构相关
- /organization/get_user_in_department:
- post:
- consumes:
- - application/json
- description: 获取部门中的所有用户
- operationId: GetUserInDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUserInDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetUserInDepartmentResp'
- - properties:
- data:
- $ref: '#/definitions/sdkws.UserInDepartment'
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取部门中的所有用户
- tags:
- - 组织架构相关
- /organization/update_department:
- post:
- consumes:
- - application/json
- description: 更新部门信息
- operationId: UpdateDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UpdateDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UpdateDepartmentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 更新部门信息
- tags:
- - 组织架构相关
- /organization/update_organization_user:
- post:
- consumes:
- - application/json
- description: 更新组织架构中的用户
- operationId: UpdateOrganizationUser
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UpdateOrganizationUserReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UpdateOrganizationUserResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 更新组织架构中的用户
- tags:
- - 组织架构相关
- /organization/update_user_in_department:
- post:
- consumes:
- - application/json
- description: 更新部门中某个用户
- operationId: UpdateUserInDepartment
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UpdateUserInDepartmentReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UpdateUserInDepartmentResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 更新部门中某个用户
- tags:
- - 组织架构相关
- /third/minio_upload:
- post:
- consumes:
- - application/json
- description: minio上传文件(web api), 请注意本api请求为form并非json
- operationId: MinioUploadFile
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 要上传的文件文件
- in: formData
- name: file
- required: true
- type: file
- - description: 文件类型
- in: formData
- name: fileType
- required: true
- type: integer
- - description: 操作唯一ID
- in: formData
- name: operationID
- required: true
- type: string
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.MinioUploadFileResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: minio上传文件(web api)
- tags:
- - 第三方服务相关
- /user/account_check:
- post:
- consumes:
- - application/json
- description: 传入UserIDList检查列表账户注册状态,并且返回结果
- operationId: AccountCheck
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.AccountCheckReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.AccountCheckResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 检查列表账户注册状态,并且返回结果
- tags:
- - 用户相关
- /user/get_all_users_uid:
- post:
- consumes:
- - application/json
- description: 获取所有用户uid列表
- operationId: GetAllUsersUid
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetAllUsersUidReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetAllUsersUidResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取所有用户uid列表
- tags:
- - 用户相关
- /user/get_self_user_info:
- post:
- consumes:
- - application/json
- description: 传入ID获取自己的信息
- operationId: GetSelfUserInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetSelfUserInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetSelfUserInfoResp'
- - properties:
- data:
- $ref: '#/definitions/sdkws.UserInfo'
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取自己的信息
- tags:
- - 用户相关
- /user/get_users_info:
- post:
- consumes:
- - application/json
- description: 根据用户列表批量获取用户信息
- operationId: GetUsersInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUsersInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- allOf:
- - $ref: '#/definitions/api_struct.GetUsersInfoResp'
- - properties:
- Data:
- items:
- $ref: '#/definitions/sdkws.PublicUserInfo'
- type: array
- type: object
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户信息
- tags:
- - 用户相关
- /user/get_users_online_status:
- post:
- consumes:
- - application/json
- description: 获取用户在线状态
- operationId: GetUsersOnlineStatus
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.GetUsersOnlineStatusReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.GetUsersOnlineStatusResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 获取用户在线状态
- tags:
- - 用户相关
- /user/set_global_msg_recv_opt:
- post:
- consumes:
- - application/json
- description: 设置全局免打扰
- operationId: SetGlobalRecvMessageOpt
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.SetGlobalRecvMessageOptReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.SetGlobalRecvMessageOptResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 设置全局免打扰
- tags:
- - 用户相关
- /user/update_user_info:
- post:
- consumes:
- - application/json
- description: 修改用户信息 userID faceURL等
- operationId: UpdateUserInfo
- parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- - description: 请求体
- in: body
- name: req
- required: true
- schema:
- $ref: '#/definitions/api_struct.UpdateSelfUserInfoReq'
- produces:
- - application/json
- responses:
- "0":
- description: ""
- schema:
- $ref: '#/definitions/api_struct.UpdateUserInfoResp'
- "400":
- description: errCode为400 一般为参数输入错误, token未带上等
- schema:
- $ref: '#/definitions/api_struct.Swagger400Resp'
- "500":
- description: errCode为500 一般为服务器内部错误
- schema:
- $ref: '#/definitions/api_struct.Swagger500Resp'
- summary: 修改用户信息
- tags:
- - 用户相关
-swagger: "2.0"
diff --git a/cmd/api/main.go b/cmd/api/main.go
index 3224b4e67..aaff71bf8 100644
--- a/cmd/api/main.go
+++ b/cmd/api/main.go
@@ -8,19 +8,16 @@ import (
"Open_IM/internal/api/group"
"Open_IM/internal/api/manage"
apiChat "Open_IM/internal/api/msg"
- "Open_IM/internal/api/office"
apiThird "Open_IM/internal/api/third"
"Open_IM/internal/api/user"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/middleware"
"Open_IM/pkg/common/tokenverify"
- "Open_IM/pkg/getcdv3"
"Open_IM/pkg/utils"
"flag"
"fmt"
- //_ "github.com/razeencheng/demo-go/swaggo-gin/docs"
"io"
"os"
"strconv"
@@ -49,7 +46,6 @@ func main() {
// gin.SetMode(gin.DebugMode)
r := gin.New()
r.Use(gin.Recovery())
- r.Use(utils.CorsHandler())
r.Use(middleware.GinParseOperationID)
log.Info("load config: ", config.Config)
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
@@ -191,30 +187,7 @@ func main() {
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
}
- //// office
- officeGroup := r.Group("/office")
- {
- officeGroup.POST("/get_user_tags", office.GetUserTags)
- officeGroup.POST("/get_user_tag_by_id", office.GetUserTagByID)
- officeGroup.POST("/create_tag", office.CreateTag)
- officeGroup.POST("/delete_tag", office.DeleteTag)
- officeGroup.POST("/set_tag", office.SetTag)
- officeGroup.POST("/send_msg_to_tag", office.SendMsg2Tag)
- officeGroup.POST("/get_send_tag_log", office.GetTagSendLogs)
- officeGroup.POST("/create_one_work_moment", office.CreateOneWorkMoment)
- officeGroup.POST("/delete_one_work_moment", office.DeleteOneWorkMoment)
- officeGroup.POST("/like_one_work_moment", office.LikeOneWorkMoment)
- officeGroup.POST("/comment_one_work_moment", office.CommentOneWorkMoment)
- officeGroup.POST("/get_work_moment_by_id", office.GetWorkMomentByID)
- officeGroup.POST("/get_user_work_moments", office.GetUserWorkMoments)
- officeGroup.POST("/get_user_friend_work_moments", office.GetUserFriendWorkMoments)
- officeGroup.POST("/set_user_work_moments_level", office.SetUserWorkMomentsLevel)
- officeGroup.POST("/delete_comment", office.DeleteComment)
- }
- //
-
- go rpc.RegisterConf()
go apiThird.MinioInit()
defaultPorts := config.Config.Api.GinPort
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10002 as port")
diff --git a/cmd/cmsapi/Makefile b/cmd/cmsapi/Makefile
deleted file mode 100644
index 31304542d..000000000
--- a/cmd/cmsapi/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-.PHONY: all build run gotool install clean help
-
-BINARY_NAME=open_im_cms_api
-BIN_DIR=../../bin/
-
-
-all: gotool build
-
-build:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
-
-run:
- @go run ./
-
-gotool:
- go fmt ./
- go vet ./
-
-install:
- make build
- mv ${BINARY_NAME} ${BIN_DIR}
-
-clean:
- @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
-
diff --git a/cmd/cmsapi/main.go b/cmd/cmsapi/main.go
deleted file mode 100644
index d917a69ff..000000000
--- a/cmd/cmsapi/main.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package main
-
-import (
- "Open_IM/internal/cms_api"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/utils"
- "flag"
- "fmt"
- "strconv"
-
- "Open_IM/pkg/common/config"
-
- "github.com/gin-gonic/gin"
-)
-
-func main() {
- gin.SetMode(gin.ReleaseMode)
- router := cmsapi.NewGinRouter()
- router.Use(utils.CorsHandler())
- defaultPorts := config.Config.CmsApi.GinPort
- ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10006 as port")
- flag.Parse()
- address := "0.0.0.0:" + strconv.Itoa(*ginPort)
- if config.Config.Api.ListenIP != "" {
- address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
- }
- address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort)
- fmt.Println("start cms api server, address: ", address, ", OpenIM version: ", constant.CurrentVersion, "\n")
- router.Run(address)
-}
diff --git a/cmd/rpc/admincms/Makefile b/cmd/rpc/admincms/Makefile
deleted file mode 100644
index f6efc1c08..000000000
--- a/cmd/rpc/admincms/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-.PHONY: all build run gotool install clean help
-
-BINARY_NAME=open_im_admin_cms
-BIN_DIR=../../../bin/
-
-all: gotool build
-
-build:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
-
-run:
- @go run ./
-
-gotool:
- go fmt ./
- go vet ./
-
-install:
- make build
- mv ${BINARY_NAME} ${BIN_DIR}
-
-clean:
- @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
diff --git a/cmd/rpc/admincms/main.go b/cmd/rpc/admincms/main.go
deleted file mode 100644
index d7f58dafd..000000000
--- a/cmd/rpc/admincms/main.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package main
-
-import (
- rpcMessageCMS "Open_IM/internal/rpc/admin_cms"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- promePkg "Open_IM/pkg/common/prometheus"
- "flag"
- "fmt"
-)
-
-func main() {
- defaultPorts := config.Config.RpcPort.OpenImAdminCmsPort
- rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
- prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AdminCmsPrometheusPort[0], "adminCMSPrometheusPort default listen port")
- flag.Parse()
- fmt.Println("start cms rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
- rpcServer := rpcMessageCMS.NewAdminCMSServer(*rpcPort)
- go func() {
- err := promePkg.StartPromeSrv(*prometheusPort)
- if err != nil {
- panic(err)
- }
- }()
- rpcServer.Run()
-}
diff --git a/cmd/rpc/office/Makefile b/cmd/rpc/office/Makefile
deleted file mode 100644
index b86230c64..000000000
--- a/cmd/rpc/office/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-.PHONY: all build run gotool install clean help
-
-BINARY_NAME=open_im_office
-BIN_DIR=../../../bin/
-
-all: gotool build
-
-build:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
-
-run:
- @go run ./
-
-gotool:
- go fmt ./
- go vet ./
-
-install:
- make build
- mv ${BINARY_NAME} ${BIN_DIR}
-
-clean:
- @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
diff --git a/cmd/rpc/office/main.go b/cmd/rpc/office/main.go
deleted file mode 100644
index a22bc4c97..000000000
--- a/cmd/rpc/office/main.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package main
-
-import (
- rpc "Open_IM/internal/rpc/office"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- promePkg "Open_IM/pkg/common/prometheus"
- "flag"
- "fmt"
-)
-
-func main() {
- defaultPorts := config.Config.RpcPort.OpenImOfficePort
- rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
- prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.OfficePrometheusPort[0], "officePrometheusPort default listen port")
- flag.Parse()
- fmt.Println("start office rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
- rpcServer := rpc.NewOfficeServer(*rpcPort)
- go func() {
- err := promePkg.StartPromeSrv(*prometheusPort)
- if err != nil {
- panic(err)
- }
- }()
- rpcServer.Run()
-}
diff --git a/config/config.yaml b/config/config.yaml
index c3810750b..871cc4e49 100644
--- a/config/config.yaml
+++ b/config/config.yaml
@@ -1,5 +1,4 @@
# The class cannot be named by Pascal or camel case.
-# The class cannot be named by Pascal or camel case.
# If it is not used, the corresponding structure will not be set,
# and it will not be read naturally.
serverversion: 2.3.7
@@ -78,7 +77,6 @@ kafka:
# automatically obtain the machine's valid network card ip as the service ip,
# otherwise the configuration ip is preferred
#如果是单机模式,用0.0.0.0或者不填,默认即可
-serverip: 0.0.0.0
#作为rpc时,注册到etcd的地址,单机默认即可,如果是集群部署,需要修改(具体使用内网地址还是外网地址,要依情况而定,目的是api/gateway能访问到)
rpcRegisterIP:
@@ -88,7 +86,6 @@ listenIP: 0.0.0.0
# endpoints 内部组件间访问的端点host名称,访问时,可以内部直接访问 host:port 来访问
endpoints:
api: openim_api
- cmsapi: openim_cms_api
push: openim_push
msg_gateway: openim_msg_gateway
rpc_auth: openim_rpc_auth
@@ -96,15 +93,11 @@ endpoints:
rpc_group: openim_rpc_group
rpc_msg: openim_rpc_msg
rpc_user: openim_rpc_user
- rpc_admin_cms: openim_rpc_admin_cms
- rpc_office: openim_rpc_office
api:
openImApiPort: [ 10002 ] #api服务端口,默认即可,需要开放此端口或做nginx转发
listenIP: 0.0.0.0
-cmsapi:
- openImCmsApiPort: [ 10006 ] #管理后台api服务端口,默认即可,需要开放此端口或做nginx转发
- listenIP: 0.0.0.0
+
sdk:
openImSdkWsPort: [ 10003 ] #jssdk服务端口,默认即可,项目中使用jssdk才需开放此端口或做nginx转发
dataDir: [ ../db/sdk/ ]
@@ -159,20 +152,9 @@ rpcport: #rpc服务端口 默认即可
openImGroupPort: [ 10150 ]
openImAuthPort: [ 10160 ]
openImPushPort: [ 10170 ]
- openImAdminCmsPort: [ 10200 ]
- openImOfficePort: [ 10210 ]
openImConversationPort: [ 10230 ]
- openImCachePort: [ 10240 ]
openImRealTimeCommPort: [ 11300 ]
- c2c:
- callbackBeforeSendMsg:
- switch: false
- timeoutStrategy: 1 #1:send
- callbackAfterSendMsg:
- switch: false
- state:
- stateChange:
- switch: false
+
rpcregistername: #rpc注册服务名,默认即可
openImUserName: User
@@ -182,10 +164,9 @@ rpcregistername: #rpc注册服务名,默认即可
openImRelayName: Relay
openImGroupName: Group
openImAuthName: Auth
- openImAdminCMSName: AdminCMS
- openImOfficeName: Office
openImConversationName: Conversation
openImRealTimeCommName: RealTimeComm
+
log:
storageLocation: ../logs/
rotationTime: 24
@@ -274,15 +255,6 @@ tokenpolicy:
messageverify:
friendVerify:
-# c2c:
-# callbackBeforeSendMsg:
-# switch: false
-# timeoutStrategy: 1 #1:send
-# callbackAfterSendMsg:
-# switch: false
-# state:
-# stateChange:
-# switch: false
#ios系统推送声音以及标记计数
iospush:
pushSound: "xxx"
@@ -353,424 +325,6 @@ callback:
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
-
-notification:
- groupCreated:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: true
- title: "create group title" # xx create the group
- desc: "create group desc"
- ext: "create group ext"
- defaultTips:
- tips: "create the group" # xx create the group
-
- groupInfoSet:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupInfoSet title"
- desc: "groupInfoSet desc"
- ext: "groupInfoSet ext"
- defaultTips:
- tips: "modified the group profile" # group info changed by xx
-
- joinGroupApplication:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: false
- title: "joinGroupApplication title"
- desc: "joinGroupApplication desc"
- ext: "joinGroupApplication ext"
- defaultTips:
- tips: "apply to join the group" # group info changed by xx
-
- memberQuit:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "memberQuit title"
- desc: "memberQuit desc"
- ext: "memberQuit ext"
- defaultTips:
- tips: "quit group msg" # group info changed by xx
-
- groupApplicationAccepted:
- conversation:
- reliabilityLevel: 2
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupApplicationAccepted title"
- desc: "groupApplicationAccepted desc"
- ext: "groupApplicationAccepted ext"
- defaultTips:
- tips: "was allowed to join the group" # group info changed by xx
-
- groupApplicationRejected:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: false
- title: " title"
- desc: " desc"
- ext: " ext"
- defaultTips:
- tips: "was rejected into the group" # group info changed by xx
-
- groupOwnerTransferred:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupOwnerTransferred title"
- desc: "groupOwnerTransferred desc"
- ext: "groupOwnerTransferred ext"
- defaultTips:
- tips: "become a new group owner" # group info changed by xx
-
- memberKicked:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "memberKicked title"
- desc: "memberKicked desc"
- ext: "memberKicked ext"
- defaultTips:
- tips: "was kicked out of the group" # group info changed by xx
-
- memberInvited:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "memberInvited title"
- desc: "memberInvited desc"
- ext: "memberInvited ext"
- defaultTips:
- tips: "was invited into the group" # group info changed by xx
-
- memberEnter:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "memberEnter title"
- desc: "memberEnter desc"
- ext: "memberEnter ext"
- defaultTips:
- tips: "entered the group" # group info changed by xx
-
- groupDismissed:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupDismissed title"
- desc: "groupDismissed desc"
- ext: "groupDismissed ext"
- defaultTips:
- tips: "group dismissed"
-
-
- groupMuted:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupMuted title"
- desc: "groupMuted desc"
- ext: "groupMuted ext"
- defaultTips:
- tips: "group Muted"
-
- groupCancelMuted:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupCancelMuted title"
- desc: "groupCancelMuted desc"
- ext: "groupCancelMuted ext"
- defaultTips:
- tips: "group Cancel Muted"
-
-
- groupMemberMuted:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupMemberMuted title"
- desc: "groupMemberMuted desc"
- ext: "groupMemberMuted ext"
- defaultTips:
- tips: "group Member Muted"
-
- groupMemberCancelMuted:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: false
- title: "groupMemberCancelMuted title"
- desc: "groupMemberCancelMuted desc"
- ext: "groupMemberCancelMuted ext"
- defaultTips:
- tips: "group Member Cancel Muted"
-
- groupMemberInfoSet:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: false
- title: "groupMemberInfoSet title"
- desc: "groupMemberInfoSet desc"
- ext: "groupMemberInfoSet ext"
- defaultTips:
- tips: "group member info set"
-
-
-
- #############################friend#################################
-
- friendApplicationAdded:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Somebody applies to add you as a friend"
- desc: "Somebody applies to add you as a friend"
- ext: "Somebody applies to add you as a friend"
- defaultTips:
- tips: "I applies to add you as a friend" #
-
- friendApplicationApproved:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Someone applies to add your friend application"
- desc: "Someone applies to add your friend application"
- ext: "Someone applies to add your friend application"
- defaultTips:
- tips: "I applies to add your friend application" #
-
-
- friendApplicationRejected:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Someone rejected your friend application"
- desc: "Someone rejected your friend application"
- ext: "Someone rejected your friend application"
- defaultTips:
- tips: "I rejected your friend application" #
-
-
-
-
-
- friendAdded:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: true
- title: "We have become friends"
- desc: "We have become friends"
- ext: "We have become friends"
- defaultTips:
- tips: "We have become friends" #
-
-
-
- friendDeleted:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "deleted a friend"
- desc: "deleted a friend"
- ext: "deleted a friend"
- defaultTips:
- tips: "deleted a friend" #
-
-
- friendRemarkSet:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Your friend's profile has been changed"
- desc: "Your friend's profile has been changed"
- ext: "Your friend's profile has been changed"
- defaultTips:
- tips: "Your friend's profile has been changed" #
-
-
-
- blackAdded:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "blocked a user"
- desc: "blocked a user"
- ext: "blocked a user"
- defaultTips:
- tips: "blocked a user" #
-
-
- blackDeleted:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Remove a blocked user"
- desc: "Remove a blocked user"
- ext: "Remove a blocked user"
- defaultTips:
- tips: "Remove a blocked user"
-
- friendInfoUpdated:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "friend info updated"
- desc: "friend info updated"
- ext: "friend info updated"
- defaultTips:
- tips: "friend info updated"
-
-
- #####################user#########################
- userInfoUpdated:
- conversation:
- reliabilityLevel: 2
- unreadCount: false
- offlinePush:
- switch: true
- title: "Remove a blocked user"
- desc: "Remove a blocked user"
- ext: "Remove a blocked user"
- defaultTips:
- tips: "remove a blocked user"
-
- #####################conversation#########################
- conversationOptUpdate:
- conversation:
- reliabilityLevel: 1
- unreadCount: false
- offlinePush:
- switch: true
- title: "conversation opt update"
- desc: "conversation opt update"
- ext: "conversation opt update"
- defaultTips:
- tips: "conversation opt update"
-
- conversationSetPrivate:
- conversation:
- reliabilityLevel: 3
- unreadCount: true
- offlinePush:
- switch: true
- title: "burn after reading"
- desc: "burn after reading"
- ext: "burn after reading"
- defaultTips:
- openTips: "burn after reading was opened"
- closeTips: "burn after reading was closed"
-
- ###################workMoments################
- workMomentsNotification:
- conversation:
- reliabilityLevel: 2
- unreadCount: true
- offlinePush:
- switch: true
- title: "burn after reading"
- desc: "burn after reading"
- ext: "burn after reading"
- defaultTips:
- openTips: "burn after reading was opened"
- closeTips: "burn after reading was closed"
-
-
-#---------------demo configuration---------------------#
-#The following configuration items are applied to openIM Demo configuration
-#是否启动demo,如果自身没有账号体系,设置为true
-demoswitch: true
-demo:
- listenIP: 0.0.0.0
- #demo对外服务端口,默认即可,需要开放此端口或做nginx转发
- openImDemoPort: [ 10004 ]
- alismsverify: #阿里云短信配置,在阿里云申请成功后修改以下四项,enable为true则必须修改,阿里云为默认短信验证方式
- accessKeyId:
- accessKeySecret:
- signName:
- verificationCodeTemplateCode:
- enable: false
- tencentsms: #腾讯云短信配置,在腾讯云申请成功后,修改以下选项,enable为true则必须修改
- appID:
- region:
- secretID:
- secretKey:
- signName:
- verificationCodeTemplateCode:
- enable: true
- superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
- needInvitationCode: false
- # second
- codeTTL: 60
- useSuperCode: true
- mail: #仅支持qq邮箱,具体操作参考 https://service.mail.qq.com/cgi-bin/help?subtype=1&id=28&no=1001256 必须修改
- title:
- senderMail:
- senderAuthorizationCode:
- smtpAddr:
- smtpPort: #需开放此端口 出口方向
- testDepartMentID: 001
- imAPIURL: http://127.0.0.1:10002
- onboardProcess: false # 是否开启注册流程
- joinDepartmentIDList: [] # 用户注册进来默认加的部门ID列表 不填就随机
- joinDepartmentGroups: false # 注册是否加部门群
- oaNotification: false # 注册是否发送OA通知
-
-workMoment:
- onlyFriendCanSee: false
-
-
rtc:
signalTimeout: 35
@@ -784,9 +338,6 @@ prometheus:
groupPrometheusPort: [ 20150 ]
authPrometheusPort: [ 20160 ]
pushPrometheusPort: [ 20170 ]
- adminCmsPrometheusPort: [ 20200 ]
- officePrometheusPort: [ 20210 ]
conversationPrometheusPort: [ 20230 ]
- cachePrometheusPort: [ 20240 ]
realTimeCommPrometheusPort: [ 21300 ]
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # 端口数量和 script/path_info.cfg msg_transfer_service_num保持一致
diff --git a/config/notification.yaml b/config/notification.yaml
new file mode 100644
index 000000000..fdbdff06e
--- /dev/null
+++ b/config/notification.yaml
@@ -0,0 +1,359 @@
+
+notification:
+ groupCreated:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: true
+ title: "create group title" # xx create the group
+ desc: "create group desc"
+ ext: "create group ext"
+ defaultTips:
+ tips: "create the group" # xx create the group
+
+ groupInfoSet:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupInfoSet title"
+ desc: "groupInfoSet desc"
+ ext: "groupInfoSet ext"
+ defaultTips:
+ tips: "modified the group profile" # group info changed by xx
+
+ joinGroupApplication:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: false
+ title: "joinGroupApplication title"
+ desc: "joinGroupApplication desc"
+ ext: "joinGroupApplication ext"
+ defaultTips:
+ tips: "apply to join the group" # group info changed by xx
+
+ memberQuit:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "memberQuit title"
+ desc: "memberQuit desc"
+ ext: "memberQuit ext"
+ defaultTips:
+ tips: "quit group msg" # group info changed by xx
+
+ groupApplicationAccepted:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupApplicationAccepted title"
+ desc: "groupApplicationAccepted desc"
+ ext: "groupApplicationAccepted ext"
+ defaultTips:
+ tips: "was allowed to join the group" # group info changed by xx
+
+ groupApplicationRejected:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: false
+ title: " title"
+ desc: " desc"
+ ext: " ext"
+ defaultTips:
+ tips: "was rejected into the group" # group info changed by xx
+
+ groupOwnerTransferred:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupOwnerTransferred title"
+ desc: "groupOwnerTransferred desc"
+ ext: "groupOwnerTransferred ext"
+ defaultTips:
+ tips: "become a new group owner" # group info changed by xx
+
+ memberKicked:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "memberKicked title"
+ desc: "memberKicked desc"
+ ext: "memberKicked ext"
+ defaultTips:
+ tips: "was kicked out of the group" # group info changed by xx
+
+ memberInvited:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "memberInvited title"
+ desc: "memberInvited desc"
+ ext: "memberInvited ext"
+ defaultTips:
+ tips: "was invited into the group" # group info changed by xx
+
+ memberEnter:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "memberEnter title"
+ desc: "memberEnter desc"
+ ext: "memberEnter ext"
+ defaultTips:
+ tips: "entered the group" # group info changed by xx
+
+ groupDismissed:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupDismissed title"
+ desc: "groupDismissed desc"
+ ext: "groupDismissed ext"
+ defaultTips:
+ tips: "group dismissed"
+
+
+ groupMuted:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupMuted title"
+ desc: "groupMuted desc"
+ ext: "groupMuted ext"
+ defaultTips:
+ tips: "group Muted"
+
+ groupCancelMuted:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupCancelMuted title"
+ desc: "groupCancelMuted desc"
+ ext: "groupCancelMuted ext"
+ defaultTips:
+ tips: "group Cancel Muted"
+
+
+ groupMemberMuted:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupMemberMuted title"
+ desc: "groupMemberMuted desc"
+ ext: "groupMemberMuted ext"
+ defaultTips:
+ tips: "group Member Muted"
+
+ groupMemberCancelMuted:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: false
+ title: "groupMemberCancelMuted title"
+ desc: "groupMemberCancelMuted desc"
+ ext: "groupMemberCancelMuted ext"
+ defaultTips:
+ tips: "group Member Cancel Muted"
+
+ groupMemberInfoSet:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: false
+ title: "groupMemberInfoSet title"
+ desc: "groupMemberInfoSet desc"
+ ext: "groupMemberInfoSet ext"
+ defaultTips:
+ tips: "group member info set"
+
+
+
+ #############################friend#################################
+
+ friendApplicationAdded:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Somebody applies to add you as a friend"
+ desc: "Somebody applies to add you as a friend"
+ ext: "Somebody applies to add you as a friend"
+ defaultTips:
+ tips: "I applies to add you as a friend" #
+
+ friendApplicationApproved:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Someone applies to add your friend application"
+ desc: "Someone applies to add your friend application"
+ ext: "Someone applies to add your friend application"
+ defaultTips:
+ tips: "I applies to add your friend application" #
+
+
+ friendApplicationRejected:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Someone rejected your friend application"
+ desc: "Someone rejected your friend application"
+ ext: "Someone rejected your friend application"
+ defaultTips:
+ tips: "I rejected your friend application" #
+
+
+
+
+
+ friendAdded:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: true
+ title: "We have become friends"
+ desc: "We have become friends"
+ ext: "We have become friends"
+ defaultTips:
+ tips: "We have become friends" #
+
+
+
+ friendDeleted:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "deleted a friend"
+ desc: "deleted a friend"
+ ext: "deleted a friend"
+ defaultTips:
+ tips: "deleted a friend" #
+
+
+ friendRemarkSet:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Your friend's profile has been changed"
+ desc: "Your friend's profile has been changed"
+ ext: "Your friend's profile has been changed"
+ defaultTips:
+ tips: "Your friend's profile has been changed" #
+
+
+
+ blackAdded:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "blocked a user"
+ desc: "blocked a user"
+ ext: "blocked a user"
+ defaultTips:
+ tips: "blocked a user" #
+
+
+ blackDeleted:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Remove a blocked user"
+ desc: "Remove a blocked user"
+ ext: "Remove a blocked user"
+ defaultTips:
+ tips: "Remove a blocked user"
+
+ friendInfoUpdated:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "friend info updated"
+ desc: "friend info updated"
+ ext: "friend info updated"
+ defaultTips:
+ tips: "friend info updated"
+
+
+ #####################user#########################
+ userInfoUpdated:
+ conversation:
+ reliabilityLevel: 2
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "Remove a blocked user"
+ desc: "Remove a blocked user"
+ ext: "Remove a blocked user"
+ defaultTips:
+ tips: "remove a blocked user"
+
+ #####################conversation#########################
+ conversationOptUpdate:
+ conversation:
+ reliabilityLevel: 1
+ unreadCount: false
+ offlinePush:
+ switch: true
+ title: "conversation opt update"
+ desc: "conversation opt update"
+ ext: "conversation opt update"
+ defaultTips:
+ tips: "conversation opt update"
+
+ conversationSetPrivate:
+ conversation:
+ reliabilityLevel: 3
+ unreadCount: true
+ offlinePush:
+ switch: true
+ title: "burn after reading"
+ desc: "burn after reading"
+ ext: "burn after reading"
+ defaultTips:
+ openTips: "burn after reading was opened"
+ closeTips: "burn after reading was closed"
+
diff --git a/config/open-im-ng-example.conf b/config/open-im-ng-example.conf
index 12e15a4f1..a817f7357 100644
--- a/config/open-im-ng-example.conf
+++ b/config/open-im-ng-example.conf
@@ -7,9 +7,6 @@ upstream im_api{
upstream im_jssdk_gateway{
server 127.0.0.1:10003; #IM jssdk服务器地址 根据部署情况可指定多台
}
-upstream im_demo{
- server 127.0.0.1:10004; #IM demo登录注册服务器地址 根据部署情况可指定多台
- }
upstream storage {
server 127.0.0.1:10005; #MinIO服务器地址 暂时支持1台
}
@@ -83,14 +80,6 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_jssdk_gateway/;
}
- location ^~/demo/ { # 10004 demo
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- proxy_set_header X-real-ip $remote_addr;
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_pass http://im_demo/;
- }
location ^~/admin/ { #10006 admin
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
diff --git a/deployk8s/admincms/admin_cms.Dockerfile b/deployk8s/admincms/admin_cms.Dockerfile
deleted file mode 100644
index a7b33da70..000000000
--- a/deployk8s/admincms/admin_cms.Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM ubuntu
-
-# 设置固定的项目路径
-ENV WORKDIR /Open-IM-Server
-ENV CMDDIR $WORKDIR/cmd
-ENV CONFIG_NAME $WORKDIR/config/config.yaml
-
-
-# 将可执行文件复制到目标目录
-ADD ./open_im_admin_cms $WORKDIR/cmd/main
-
-# 创建用于挂载的几个目录,添加可执行权限
-RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
- chmod +x $WORKDIR/cmd/main
-
-VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config", "/Open-IM-Server/script"]
-
-
-WORKDIR $CMDDIR
-CMD ./main
diff --git a/deployk8s/admincms/deployment.yaml b/deployk8s/admincms/deployment.yaml
deleted file mode 100644
index ea02fd80c..000000000
--- a/deployk8s/admincms/deployment.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: admin-cms-deployment
-spec:
- selector:
- matchLabels:
- app: admin-cms # 选择这个指定标签执行
- replicas: 1 # 运行pod数量
- template:
- metadata:
- labels:
- app: admin-cms # 标签
- spec:
- containers:
- - name: admin-cms
- image: openim/admin_cms:v2.3.4
- # imagePullPolicy: Always #每次启动都重新拉取镜像
- ports:
- - containerPort: 10200
- volumeMounts:
- - name: config
- mountPath: /Open-IM-Server/config
- readOnly: true
- - name: usualConfig
- mountPath: /Open-IM-Server/config
- readOnly: true
- env:
- - name: CONFIG_NAME
- value: "/Open-IM-Server"
- - name: USUAL_CONFIG_NAME
- value: "/Open-IM-Server"
- volumes:
- - name: config
- configMap:
- name: openim-config
- - name: usualConfig
- configMap:
- name: openim-usualConfig
- strategy: #更新策略
- type: RollingUpdate # 滚动更新
-
diff --git a/deployk8s/cmsapi/cms_api.Dockerfile b/deployk8s/cmsapi/cms_api.Dockerfile
deleted file mode 100644
index 78eda6ecf..000000000
--- a/deployk8s/cmsapi/cms_api.Dockerfile
+++ /dev/null
@@ -1,18 +0,0 @@
-FROM ubuntu
-
-# 设置固定的项目路径
-ENV WORKDIR /Open-IM-Server
-ENV CMDDIR $WORKDIR/cmd
-ENV CONFIG_NAME $WORKDIR/config/config.yaml
-
-# 将可执行文件复制到目标目录
-ADD ./open_im_cms_api $WORKDIR/cmd/main
-
-# 创建用于挂载的几个目录,添加可执行权限
-RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
- chmod +x $WORKDIR/cmd/main
-
-VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
-
-WORKDIR $CMDDIR
-CMD ./main
\ No newline at end of file
diff --git a/deployk8s/cmsapi/deployment.yaml b/deployk8s/cmsapi/deployment.yaml
deleted file mode 100644
index b55c0b4f7..000000000
--- a/deployk8s/cmsapi/deployment.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: cms-api-deployment
-spec:
- selector:
- matchLabels:
- app: cms-api # 选择这个指定标签执行
- replicas: 1 # 运行pod数量
- template:
- metadata:
- labels:
- app: cms-api # 标签
- spec:
- containers:
- - name: cms-api
- image: openim/cms_api:v2.3.4
- imagePullPolicy: Always
- ports:
- - containerPort: 10006
- volumeMounts:
- - name: config
- mountPath: /Open-IM-Server/config
- readOnly: true
- - name: usualConfig
- mountPath: /Open-IM-Server/config
- readOnly: true
- env:
- - name: CONFIG_NAME
- value: "/Open-IM-Server"
- - name: USUAL_CONFIG_NAME
- value: "/Open-IM-Server"
- volumes:
- - name: config
- configMap:
- name: openim-config
- - name: usualConfig
- configMap:
- name: openim-usualConfig
- strategy: #更新策略
- type: RollingUpdate # 滚动更新
----
-apiVersion: v1
-kind: Service
-metadata:
- name: cms-api
-spec:
- ports:
- - name: cms-api-port
- protocol: TCP
- port: 10006
- targetPort: 10006
- selector:
- app: cms-api
- type: NodePort
\ No newline at end of file
diff --git a/deployk8s/ingress.yaml b/deployk8s/ingress.yaml
index 88212c2a2..fd01aec0e 100644
--- a/deployk8s/ingress.yaml
+++ b/deployk8s/ingress.yaml
@@ -1,28 +1,6 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
-metadata:
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
- nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
- nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
- name: sdk-server-ingress
-spec:
- rules:
- - host: sdk-server.openim.xxx.com
- http:
- paths:
- - backend:
- service:
- name: sdk-server
- port:
- number: 10003
- path: /
- pathType: Prefix
----
-apiVersion: networking.k8s.io/v1
-kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
@@ -67,53 +45,3 @@ spec:
number: 10002
path: /
pathType: Prefix
----
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/Access-Control-Allow-Origin: '*'
- nginx.ingress.kubernetes.io/cors-allow-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,x-auth-token,Pagination
- nginx.ingress.kubernetes.io/cors-allow-methods: 'PUT, GET, POST, OPTIONS'
- nginx.ingress.kubernetes.io/cors-allow-origin: '*'
- nginx.ingress.kubernetes.io/enable-cors: 'true'
- nginx.ingress.kubernetes.io/service-weight: ''
- name: demo-ingress
-spec:
- rules:
- - host: demo.openim.xxx.com
- http:
- paths:
- - backend:
- service:
- name: demo
- port:
- number: 10004
- path: /
- pathType: Prefix
----
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/Access-Control-Allow-Origin: '*'
- nginx.ingress.kubernetes.io/cors-allow-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,x-auth-token,Pagination
- nginx.ingress.kubernetes.io/cors-allow-methods: 'PUT, GET, POST, OPTIONS'
- nginx.ingress.kubernetes.io/cors-allow-origin: '*'
- nginx.ingress.kubernetes.io/enable-cors: 'true'
- nginx.ingress.kubernetes.io/service-weight: ''
- name: cms-api-ingress
-spec:
- rules:
- - host: cms-api.openim.xxx.com
- http:
- paths:
- - backend:
- service:
- name: cms-api
- port:
- number: 10006
- path: /
- pathType: Prefix
\ No newline at end of file
diff --git a/deployk8s/k8s_openim_deploy.md b/deployk8s/k8s_openim_deploy.md
index 114a43c0b..f637f8272 100644
--- a/deployk8s/k8s_openim_deploy.md
+++ b/deployk8s/k8s_openim_deploy.md
@@ -9,8 +9,7 @@
6. 将rpcRegisterIP修改为空, 此地址为每个rpc注册到ETCD的地址, 置空每个rpc将会将pod地址注册到ETCD, 才能正确rpc请求(重要)
7. 如果使用minio作为对象存储, 还需要修改minio的地址
8. 其他如果使用离线推送,需要修改push离线推送配置
-9. 修改demo中的imAPIURL字段为openIM api的ingress或者service地址, 需要让demo的pod能正确请求到(重要)
-10. 其他非必须配置修改, 如短信,推送等
+9. 其他非必须配置修改, 如短信,推送等
### 2. 项目根目录创建im configMap到k8s openim namespace
1. 为open-IM项目创建单独命名空间
@@ -75,8 +74,6 @@ kubectl 启动所有deployment, services, ingress
telnet msg-gateway.openim.xxx.com {{your_ingress_port}}
telnet sdk-server.openim.xxx.com {{your_ingress_port}}
telnet api.openim.xxx.com {{your_ingress_port}}
- telnet cms-api.openim.xxx.com {{your_ingress_port}}
- telnet demo.openim.xxx.com {{your_ingress_port}}
```
#### openIM k8s更新
diff --git a/deployk8s/kubectl_stop_all.sh b/deployk8s/kubectl_stop_all.sh
index b433ee3cb..5afa3cfde 100644
--- a/deployk8s/kubectl_stop_all.sh
+++ b/deployk8s/kubectl_stop_all.sh
@@ -3,23 +3,16 @@
service=(
#api service file
api
- cms-api
#rpc service file
user
friend
group
auth
- admin-cms
- office
- organization
conversation
- cache
msg-gateway
msg-transfer
msg
push
- sdk-server
- demo
)
for i in ${service[*]}
@@ -28,9 +21,6 @@ do
done
kubectl -n openim delete service api
-kubectl -n openim delete service cms-api
-kubectl -n openim delete service sdk-server
kubectl -n openim delete service msg-gateway
-kubectl -n openim delete service demo
echo done
\ No newline at end of file
diff --git a/deployk8s/office/deployment.yaml b/deployk8s/office/deployment.yaml
deleted file mode 100644
index e95b46a76..000000000
--- a/deployk8s/office/deployment.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: office-deployment
-spec:
- selector:
- matchLabels:
- app: office # 选择这个指定标签执行
- replicas: 1 # 运行pod数量
- template:
- metadata:
- labels:
- app: office # 标签
- spec:
- containers:
- - name: office
- image: openim/office:v2.3.4
- # imagePullPolicy: Always
- ports:
- - containerPort: 10210
- volumeMounts:
- - name: config
- mountPath: /Open-IM-Server/config
- readOnly: true
- - name: usualConfig
- mountPath: /Open-IM-Server/config
- readOnly: true
- env:
- - name: CONFIG_NAME
- value: "/Open-IM-Server"
- - name: USUAL_CONFIG_NAME
- value: "/Open-IM-Server"
- volumes:
- - name: config
- configMap:
- name: openim-config
- - name: usualConfig
- configMap:
- name: openim-usualConfig
- strategy: #更新策略
- type: RollingUpdate # 滚动更新
\ No newline at end of file
diff --git a/deployk8s/office/office.Dockerfile b/deployk8s/office/office.Dockerfile
deleted file mode 100644
index 8144deaa1..000000000
--- a/deployk8s/office/office.Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM ubuntu
-
-# 设置固定的项目路径
-ENV WORKDIR /Open-IM-Server
-ENV CMDDIR $WORKDIR/cmd
-ENV CONFIG_NAME $WORKDIR/config/config.yaml
-
-
-# 将可执行文件复制到目标目录
-ADD ./open_im_office $WORKDIR/cmd/main
-
-# 创建用于挂载的几个目录,添加可执行权限
-RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
- chmod +x $WORKDIR/cmd/main
-
-VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
-
-
-WORKDIR $CMDDIR
-CMD ./main
\ No newline at end of file
diff --git a/deployk8s/path_info.cfg b/deployk8s/path_info.cfg
index a5a0c0431..cc7bf195e 100644
--- a/deployk8s/path_info.cfg
+++ b/deployk8s/path_info.cfg
@@ -2,18 +2,14 @@
service=(
#api service file
api
- cmsapi
#rpc service file
user
friend
group
auth
- admincms
- office
conversation
msggateway
msgtransfer
msg
push
- sdkserver
)
\ No newline at end of file
diff --git a/deployk8s/sdkserver/deployment.yaml b/deployk8s/sdkserver/deployment.yaml
deleted file mode 100644
index 1bc147f24..000000000
--- a/deployk8s/sdkserver/deployment.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: sdk-server-deployment
-spec:
- selector:
- matchLabels:
- app: sdk-server # 选择这个指定标签执行
- replicas: 1 # 运行pod数量
- template:
- metadata:
- labels:
- app: sdk-server # 标签
- spec:
- containers:
- - name: sdk-server
- image: openim/sdk_server:v2.3.4
- # imagePullPolicy: Always
- ports:
- - containerPort: 10003
- volumeMounts:
- - name: config
- mountPath: /Open-IM-Server/config
- readOnly: true
- - name: local-db
- mountPath: /db/sdk
- env:
- - name: CONFIG_NAME
- value: "/Open-IM-Server"
- command: ["/Open-IM-Server/main"]
- args: ["-openIM_ws_address", "ws_addr", "-sdkws_port", "10003", "-openIM_api_address", "api_address", "-openIM_log_level", "6"]
- volumes:
- - name: config
- configMap:
- name: openim-config
- - name: local-db
- hostPath:
- path: /db/sdk
- strategy: #更新策略
- type: RollingUpdate # 滚动更新
----
-apiVersion: v1
-kind: Service
-metadata:
- name: sdk-server
-spec:
- ports:
- - name: sdk-server-port
- protocol: TCP
- port: 10003
- targetPort: 10003
- selector:
- app: sdk-server
- type: NodePort
-
-
\ No newline at end of file
diff --git a/deployk8s/sdkserver/sdk_server.Dockerfile b/deployk8s/sdkserver/sdk_server.Dockerfile
deleted file mode 100644
index 9a6eaf8fe..000000000
--- a/deployk8s/sdkserver/sdk_server.Dockerfile
+++ /dev/null
@@ -1,18 +0,0 @@
-FROM ubuntu
-
-# 设置固定的项目路径
-ENV WORKDIR /Open-IM-Server
-ENV CMDDIR $WORKDIR/cmd
-ENV CONFIG_NAME $WORKDIR/config/config.yaml
-
-# 将可执行文件复制到目标目录
-ADD ./open_im_sdk_server $WORKDIR/main
-
-# 创建用于挂载的几个目录,添加可执行权限
-RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/db && \
- chmod +x $WORKDIR/main
-
-VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script","/Open-IM-Server/db/sdk"]
-
-WORKDIR $CMDDIR
-CMD ./main
\ No newline at end of file
diff --git a/docker-compose_cfg/prometheus-compose.yml b/docker-compose_cfg/prometheus-compose.yml
index cf2c01bf4..55a439644 100644
--- a/docker-compose_cfg/prometheus-compose.yml
+++ b/docker-compose_cfg/prometheus-compose.yml
@@ -17,11 +17,6 @@ scrape_configs:
labels:
group: 'api'
- - targets: ['localhost:10006']
- labels:
- group: 'cms-api'
-
-
- targets: ['localhost:20110']
labels:
group: 'user'
@@ -52,27 +47,13 @@ scrape_configs:
- targets: ['localhost:20120']
labels:
- group: 'friend'
+ group: 'friend'
- - targets: ['localhost:20200']
- labels:
- group: 'admin-cms'
-
- - targets: ['localhost:20120']
- labels:
- group: 'office'
-
- - targets: ['localhost:20220']
- labels:
- group: 'organization'
- targets: ['localhost:20230']
labels:
group: 'conversation'
-
- - targets: ['localhost:20240']
- labels:
- group: 'cache'
+
- targets: ['localhost:21400', 'localhost:21401', 'localhost:21402', 'localhost:21403']
labels:
diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go
index f04ea1793..bfb43cf23 100644
--- a/internal/api/auth/auth.go
+++ b/internal/api/auth/auth.go
@@ -7,7 +7,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify"
rpc "Open_IM/pkg/proto/auth"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"net/http"
@@ -43,7 +43,7 @@ func UserRegister(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg})
return
}
- req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
+ req := &rpc.UserRegisterReq{UserInfo: &sdkws.UserInfo{}}
utils.CopyStructFields(req.UserInfo, ¶ms)
//copier.Copy(req.UserInfo, ¶ms)
req.OperationID = params.OperationID
diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go
index d033472ab..14306cdc2 100644
--- a/internal/api/friend/friend.go
+++ b/internal/api/friend/friend.go
@@ -8,7 +8,7 @@ package friend
// "Open_IM/pkg/common/tokenverify"
// "Open_IM/pkg/getcdv3"
// rpc "Open_IM/pkg/proto/friend"
-// open_im_sdk "Open_IM/pkg/proto/sdkws"
+// sdkws "Open_IM/pkg/proto/sdkws"
// "Open_IM/pkg/utils"
// "context"
// "github.com/gin-gonic/gin"
@@ -296,7 +296,7 @@ package friend
//// @Param token header string true "im token"
//// @Param req body api.GetBlackListReq true "fromUserID要获取黑名单的用户"
//// @Produce json
-//// @Success 0 {object} api.GetBlackListResp{data=[]open_im_sdk.PublicUserInfo}
+//// @Success 0 {object} api.GetBlackListResp{data=[]sdkws.PublicUserInfo}
//// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger500Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /friend/get_black_list [post]
@@ -339,7 +339,7 @@ package friend
//
// resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
// for _, v := range RpcResp.BlackUserInfoList {
-// black := open_im_sdk.PublicUserInfo{}
+// black := sdkws.PublicUserInfo{}
// utils.CopyStructFields(&black, v)
// resp.BlackUserInfoList = append(resp.BlackUserInfoList, &black)
// }
@@ -519,7 +519,7 @@ package friend
//// @Param token header string true "im token"
//// @Param req body api.GetFriendListReq true "fromUserID为要获取好友列表的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetFriendListResp{data=[]open_im_sdk.FriendInfo}
+//// @Success 0 {object} api.GetFriendListResp{data=[]sdkws.FriendInfo}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /friend/get_friend_list [post]
@@ -575,7 +575,7 @@ package friend
//// @Param token header string true "im token"
//// @Param req body api.GetFriendApplyListReq true "fromUserID为要获取申请列表的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetFriendApplyListResp{data=[]open_im_sdk.FriendRequest}
+//// @Success 0 {object} api.GetFriendApplyListResp{data=[]sdkws.FriendRequest}
//// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /friend/get_friend_apply_list [post]
@@ -631,7 +631,7 @@ package friend
//// @Param token header string true "im token"
//// @Param req body api.GetSelfApplyListReq true "fromUserID为自己的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetSelfApplyListResp{data=[]open_im_sdk.FriendRequest}
+//// @Success 0 {object} api.GetSelfApplyListResp{data=[]sdkws.FriendRequest}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /friend/get_self_friend_apply_list [post]
diff --git a/internal/api/group/group.go b/internal/api/group/group.go
index 014fa94b9..2682374e8 100644
--- a/internal/api/group/group.go
+++ b/internal/api/group/group.go
@@ -99,7 +99,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.GetGroupMembersInfoReq true "groupID为要获取的群ID
memberList为要获取群成员的群ID列表"
//// @Produce json
-//// @Success 0 {object} api.GetGroupMembersInfoResp{data=[]open_im_sdk.GroupMemberFullInfo}
+//// @Success 0 {object} api.GetGroupMembersInfoResp{data=[]sdkws.GroupMemberFullInfo}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/get_group_members_info [post]
@@ -200,7 +200,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.GetGroupAllMemberReq true "GroupID为要获取群成员的群ID"
//// @Produce json
-//// @Success 0 {object} api.GetGroupAllMemberResp{data=[]open_im_sdk.GroupMemberFullInfo}
+//// @Success 0 {object} api.GetGroupAllMemberResp{data=[]sdkws.GroupMemberFullInfo}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/get_group_all_member_list [post]
@@ -256,7 +256,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.GetJoinedGroupListReq true "fromUserID为要获取的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetJoinedGroupListResp{data=[]open_im_sdk.GroupInfo}
+//// @Success 0 {object} api.GetJoinedGroupListResp{data=[]sdkws.GroupInfo}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/get_joined_group_list [post]
@@ -379,7 +379,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.CreateGroupReq true "groupType这里填0代表普通群
groupName为群名称
introduction为群介绍
notification为群公共
ownerUserID为群主ID
ex为群扩展字段
memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员"
//// @Produce json
-//// @Success 0 {object} api.CreateGroupResp{data=open_im_sdk.GroupInfo}
+//// @Success 0 {object} api.CreateGroupResp{data=sdkws.GroupInfo}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/create_group [post]
@@ -397,7 +397,7 @@ package group
//// c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg})
//// return
//// }
-//// req := &rpc.CreateGroupReq{GroupInfo: &open_im_sdk.GroupInfo{}}
+//// req := &rpc.CreateGroupReq{GroupInfo: &sdkws.GroupInfo{}}
//// utils.CopyStructFields(req.GroupInfo, ¶ms)
////
//// for _, v := range params.MemberList {
@@ -456,7 +456,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.GetGroupApplicationListReq true "fromUserID为要获取的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]open_im_sdk.GroupRequest}
+//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]sdkws.GroupRequest}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/get_recv_group_applicationList [post]
@@ -509,7 +509,7 @@ package group
//// @Param token header string true "im token"
//// @Param req body api.GetUserReqGroupApplicationListReq true "userID为要获取的用户ID"
//// @Produce json
-//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]open_im_sdk.GroupRequest}
+//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]sdkws.GroupRequest}
//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
//// @Router /group/get_user_req_group_applicationList [post]
@@ -572,7 +572,7 @@ package group
// c.JSON(http.StatusOK, resp)
//}
//
-////func transferGroupInfo(input []*open_im_sdk.GroupInfo) []*api.GroupInfoAlias {
+////func transferGroupInfo(input []*sdkws.GroupInfo) []*api.GroupInfoAlias {
//// var result []*api.GroupInfoAlias
//// for _, v := range input {
//// t := &api.GroupInfoAlias{}
@@ -766,7 +766,7 @@ package group
//// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
//// return
//// }
-//// req := &rpc.SetGroupInfoReq{GroupInfoForSet: &open_im_sdk.GroupInfoForSet{}}
+//// req := &rpc.SetGroupInfoReq{GroupInfoForSet: &sdkws.GroupInfoForSet{}}
//// utils.CopyStructFields(req.GroupInfoForSet, ¶ms)
//// req.OperationID = params.OperationID
//// argsHandle(¶ms, req)
diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go
index 64089becc..3df2d0c5c 100644
--- a/internal/api/manage/management_chat.go
+++ b/internal/api/manage/management_chat.go
@@ -14,7 +14,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify"
pbChat "Open_IM/pkg/proto/msg"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"net/http"
@@ -76,7 +76,7 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
pbData := pbChat.SendMsgReq{
OperationID: params.OperationID,
- MsgData: &open_im_sdk.MsgData{
+ MsgData: &sdkws.MsgData{
SendID: params.SendID,
GroupID: params.GroupID,
ClientMsgID: utils.GetMsgID(params.SendID),
@@ -95,7 +95,7 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
},
}
if params.ContentType == constant.OANotification {
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.JsonDetail = utils.StructToJsonString(params.Content)
pbData.MsgData.Content, err = proto.Marshal(&tips)
if err != nil {
@@ -231,7 +231,7 @@ func ManagementSendMsg(c *gin.Context) {
}
log.Info(params.OperationID, "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String())
- resp := api.ManagementSendMsgResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, ResultList: open_im_sdk.UserSendMsgResp{ServerMsgID: RpcResp.ServerMsgID, ClientMsgID: RpcResp.ClientMsgID, SendTime: RpcResp.SendTime}}
+ resp := api.ManagementSendMsgResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, ResultList: sdkws.UserSendMsgResp{ServerMsgID: RpcResp.ServerMsgID, ClientMsgID: RpcResp.ClientMsgID, SendTime: RpcResp.SendTime}}
log.Info(params.OperationID, "ManagementSendMsg return", resp)
c.JSON(http.StatusOK, resp)
}
diff --git a/internal/api/msg/pull_msg.go b/internal/api/msg/pull_msg.go
index d82ee6ebf..5bd2c175f 100644
--- a/internal/api/msg/pull_msg.go
+++ b/internal/api/msg/pull_msg.go
@@ -6,7 +6,7 @@ import (
"Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
"Open_IM/pkg/proto/msg"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"github.com/gin-gonic/gin"
@@ -46,7 +46,7 @@ func PullMsgBySeqList(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
return
}
- pbData := open_im_sdk.PullMessageBySeqListReq{}
+ pbData := sdkws.PullMessageBySeqListReq{}
pbData.UserID = params.SendID
pbData.OperationID = params.OperationID
pbData.SeqList = params.SeqList
diff --git a/internal/api/msg/send_msg.go b/internal/api/msg/send_msg.go
index 1f38de3bb..36f7e2d1d 100644
--- a/internal/api/msg/send_msg.go
+++ b/internal/api/msg/send_msg.go
@@ -4,7 +4,7 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
pbChat "Open_IM/pkg/proto/msg"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"context"
"Open_IM/pkg/getcdv3"
@@ -20,17 +20,17 @@ type paramsUserSendMsg struct {
SenderFaceURL string `json:"senderFaceUrl"`
OperationID string `json:"operationID" binding:"required"`
Data struct {
- SessionType int32 `json:"sessionType" binding:"required"`
- MsgFrom int32 `json:"msgFrom" binding:"required"`
- ContentType int32 `json:"contentType" binding:"required"`
- RecvID string `json:"recvID" `
- GroupID string `json:"groupID" `
- ForceList []string `json:"forceList"`
- Content []byte `json:"content" binding:"required"`
- Options map[string]bool `json:"options" `
- ClientMsgID string `json:"clientMsgID" binding:"required"`
- CreateTime int64 `json:"createTime" binding:"required"`
- OffLineInfo *open_im_sdk.OfflinePushInfo `json:"offlineInfo" `
+ SessionType int32 `json:"sessionType" binding:"required"`
+ MsgFrom int32 `json:"msgFrom" binding:"required"`
+ ContentType int32 `json:"contentType" binding:"required"`
+ RecvID string `json:"recvID" `
+ GroupID string `json:"groupID" `
+ ForceList []string `json:"forceList"`
+ Content []byte `json:"content" binding:"required"`
+ Options map[string]bool `json:"options" `
+ ClientMsgID string `json:"clientMsgID" binding:"required"`
+ CreateTime int64 `json:"createTime" binding:"required"`
+ OffLineInfo *sdkws.OfflinePushInfo `json:"offlineInfo" `
}
}
@@ -38,7 +38,7 @@ func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.SendMsgR
pbData := pbChat.SendMsgReq{
Token: token,
OperationID: params.OperationID,
- MsgData: &open_im_sdk.MsgData{
+ MsgData: &sdkws.MsgData{
SendID: params.SendID,
RecvID: params.Data.RecvID,
GroupID: params.Data.GroupID,
diff --git a/internal/api/office/tag.go b/internal/api/office/tag.go
deleted file mode 100644
index f9d2d2683..000000000
--- a/internal/api/office/tag.go
+++ /dev/null
@@ -1,450 +0,0 @@
-package office
-
-import (
- api "Open_IM/pkg/api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/common/tokenverify"
- "Open_IM/pkg/getcdv3"
- pbOffice "Open_IM/pkg/proto/office"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "github.com/gin-gonic/gin"
- "google.golang.org/grpc"
- "net/http"
- "strings"
-)
-
-// @Summary 获取用户标签信息
-// @Description 用户获取自己的所有的标签
-// @Tags 标签
-// @ID GetUserTags
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetUserTagsReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetUserTagsResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_user_tags [post]
-func GetUserTags(c *gin.Context) {
- var (
- req api.GetUserTagsReq
- resp api.GetUserTagsResp
- reqPb pbOffice.GetUserTagsReq
- respPb *pbOffice.GetUserTagsResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- reqPb.OperationID = req.OperationID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.GetUserTags(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserTags rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- if respPb.Tags != nil {
- resp.Data.Tags = respPb.Tags
- } else {
- resp.Data.Tags = []*pbOffice.Tag{}
- }
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 创建标签
-// @Description 创建标签
-// @Tags 标签
-// @ID CreateTag
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.CreateTagReq true "请求"
-// @Produce json
-// @Success 0 {object} api.CreateTagResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/create_tag [post]
-func CreateTag(c *gin.Context) {
- var (
- req api.CreateTagReq
- resp api.CreateTagResp
- reqPb pbOffice.CreateTagReq
- respPb *pbOffice.CreateTagResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.CreateTag(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateTag rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 删除标签
-// @Description 根据标签ID创建标签
-// @Tags 标签
-// @ID DeleteTag
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.DeleteTagReq true "请求"
-// @Produce json
-// @Success 0 {object} api.DeleteTagResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/delete_tag [post]
-func DeleteTag(c *gin.Context) {
- var (
- req api.DeleteTagReq
- resp api.DeleteTagResp
- reqPb pbOffice.DeleteTagReq
- respPb *pbOffice.DeleteTagResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.DeleteTag(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateTag rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 修改标签
-// @Description 根据标签ID修改标签用户列表, 名称
-// @Tags 标签
-// @ID SetTag
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.SetTagReq true "请求"
-// @Produce json
-// @Success 0 {object} api.SetTagResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/set_tag [post]
-func SetTag(c *gin.Context) {
- var (
- req api.SetTagReq
- resp api.SetTagResp
- reqPb pbOffice.SetTagReq
- respPb *pbOffice.SetTagResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.SetTag(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateTag rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 发送标签消息
-// @Description 对标签用户发送消息
-// @Tags 标签
-// @ID SendMsg2Tag
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.SendMsg2TagReq true "请求"
-// @Produce json
-// @Success 0 {object} api.SendMsg2TagResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/send_msg_to_tag [post]
-func SendMsg2Tag(c *gin.Context) {
- var (
- req api.SendMsg2TagReq
- resp api.SendMsg2TagResp
- reqPb pbOffice.SendMsg2TagReq
- respPb *pbOffice.SendMsg2TagResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.SendID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.SendMsg2Tag(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateTag rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 获取发送历史记录
-// @Description 分页获取发送历史记录
-// @Tags 标签
-// @ID GetTagSendLogs
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetTagSendLogsReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetTagSendLogsResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_send_tag_log [post]
-func GetTagSendLogs(c *gin.Context) {
- var (
- req api.GetTagSendLogsReq
- resp api.GetTagSendLogsResp
- reqPb pbOffice.GetTagSendLogsReq
- respPb *pbOffice.GetTagSendLogsResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- reqPb.OperationID = req.OperationID
- reqPb.Pagination = &pbCommon.RequestPagination{
- PageNumber: req.PageNumber,
- ShowNumber: req.ShowNumber,
- }
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- maxSizeOption := grpc.MaxCallRecvMsgSize(1024 * 1024 * 20)
- respPb, err := client.GetTagSendLogs(context.Background(), &reqPb, maxSizeOption)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetTagSendLogs failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetTagSendLogs rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- if respPb.TagSendLogs != nil {
- resp.Data.Logs = respPb.TagSendLogs
- } else {
- resp.Data.Logs = []*pbOffice.TagSendLog{}
- }
- resp.Data.ShowNumber = respPb.Pagination.ShowNumber
- resp.Data.CurrentPage = respPb.Pagination.CurrentPage
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 获取该用户的标签信息
-// @Description 通过标签id获取该用户的标签信息
-// @Tags 标签
-// @ID GetUserTagByID
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetUserTagByIDReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetUserTagByIDResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_user_tag_by_id [post]
-func GetUserTagByID(c *gin.Context) {
- var (
- req api.GetUserTagByIDReq
- resp api.GetUserTagByIDResp
- reqPb pbOffice.GetUserTagByIDReq
- respPb *pbOffice.GetUserTagByIDResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.UserID = userID
- reqPb.OperationID = req.OperationID
- reqPb.TagID = req.TagID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.GetUserTagByID(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTagByID failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateTag rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp.CommResp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- resp.Data.Tag = respPb.Tag
- c.JSON(http.StatusOK, resp)
-}
diff --git a/internal/api/office/work_moments.go b/internal/api/office/work_moments.go
deleted file mode 100644
index 4c02af9e0..000000000
--- a/internal/api/office/work_moments.go
+++ /dev/null
@@ -1,670 +0,0 @@
-package office
-
-import (
- api "Open_IM/pkg/api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/common/tokenverify"
- pbOffice "Open_IM/pkg/proto/office"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "github.com/gin-gonic/gin"
- "net/http"
- "strings"
-)
-
-// @Summary 创建一条工作圈
-// @Description 用户创建一条工作圈
-// @Tags 工作圈
-// @ID CreateOneWorkMoment
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.CreateOneWorkMomentReq true "请求 atUserList likeUserList permissionGroupList permissionUserList 字段中userName可以不填"
-// @Produce json
-// @Success 0 {object} api.CreateOneWorkMomentResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/create_one_work_moment [post]
-func CreateOneWorkMoment(c *gin.Context) {
- var (
- req api.CreateOneWorkMomentReq
- resp api.CreateOneWorkMomentResp
- reqPb pbOffice.CreateOneWorkMomentReq
- respPb *pbOffice.CreateOneWorkMomentResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- reqPb.WorkMoment.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.CreateOneWorkMoment(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CreateOneWorkMoment rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateOneWorkMoment rpc server failed" + err.Error()})
- return
- }
- resp.CommResp = api.CommResp{
- ErrCode: respPb.CommonResp.ErrCode,
- ErrMsg: respPb.CommonResp.ErrMsg,
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 删除一条工作圈
-// @Description 根据用户工作圈ID删除一条工作圈
-// @Tags 工作圈
-// @ID DeleteOneWorkMoment
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.DeleteOneWorkMomentReq true "请求"
-// @Produce json
-// @Success 0 {object} api.DeleteOneWorkMomentResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/delete_one_work_moment [post]
-func DeleteOneWorkMoment(c *gin.Context) {
- var (
- req api.DeleteOneWorkMomentReq
- resp api.DeleteOneWorkMomentResp
- reqPb pbOffice.DeleteOneWorkMomentReq
- respPb *pbOffice.DeleteOneWorkMomentResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.DeleteOneWorkMoment(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteOneWorkMoment rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "DeleteOneWorkMoment rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 点赞一条工作圈
-// @Description 工作圈ID点赞一条工作圈
-// @Tags 工作圈
-// @ID LikeOneWorkMoment
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.LikeOneWorkMomentReq true "请求"
-// @Produce json
-// @Success 0 {object} api.LikeOneWorkMomentResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/like_one_work_moment [post]
-func LikeOneWorkMoment(c *gin.Context) {
- var (
- req api.LikeOneWorkMomentReq
- resp api.LikeOneWorkMomentResp
- reqPb pbOffice.LikeOneWorkMomentReq
- respPb *pbOffice.LikeOneWorkMomentResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.LikeOneWorkMoment(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "LikeOneWorkMoment rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 评论一条工作圈
-// @Description 评论一条工作圈
-// @Tags 工作圈
-// @ID CommentOneWorkMoment
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.CommentOneWorkMomentReq true "请求"
-// @Produce json
-// @Success 0 {object} api.CommentOneWorkMomentResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/comment_one_work_moment [post]
-func CommentOneWorkMoment(c *gin.Context) {
- var (
- req api.CommentOneWorkMomentReq
- resp api.CommentOneWorkMomentResp
- reqPb pbOffice.CommentOneWorkMomentReq
- respPb *pbOffice.CommentOneWorkMomentResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.CommentOneWorkMoment(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CommentOneWorkMoment rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CommentOneWorkMoment rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 删除一条评论
-// @Description 删除一条评论
-// @Tags 工作圈
-// @ID DeleteComment
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.DeleteCommentReq true "请求"
-// @Produce json
-// @Success 0 {object} api.DeleteCommentResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/delete_comment [post]
-func DeleteComment(c *gin.Context) {
- var (
- req api.DeleteCommentReq
- resp api.DeleteCommentResp
- reqPb pbOffice.DeleteCommentReq
- respPb *pbOffice.DeleteCommentResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), err.Error())
- }
-
- var ok bool
- var errInfo string
- ok, reqPb.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.DeleteComment(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteComment rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "DeleteComment rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 通过ID获取工作圈
-// @Description 通过ID获取工作圈
-// @Tags 工作圈
-// @ID GetWorkMomentByID
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetWorkMomentByIDReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetWorkMomentByIDResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_work_moment_by_id [post]
-func GetWorkMomentByID(c *gin.Context) {
- var (
- req api.GetWorkMomentByIDReq
- resp api.GetWorkMomentByIDResp
- reqPb pbOffice.GetWorkMomentByIDReq
- respPb *pbOffice.GetWorkMomentByIDResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.OperationID = req.OperationID
- reqPb.OpUserID = userID
- reqPb.WorkMomentID = req.WorkMomentID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.GetWorkMomentByID(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- resp.Data.WorkMoment = &api.WorkMoment{LikeUserList: []*api.WorkMomentUser{}, Comments: []*api.Comment{},
- AtUserList: []*api.WorkMomentUser{}, PermissionUserList: []*api.WorkMomentUser{}}
- if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 查询用户工作圈
-// @Description 查询用户工作圈
-// @Tags 工作圈
-// @ID GetUserWorkMoments
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetUserWorkMomentsReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetUserWorkMomentsResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_user_work_moments [post]
-func GetUserWorkMoments(c *gin.Context) {
- var (
- req api.GetUserWorkMomentsReq
- resp api.GetUserWorkMomentsResp
- reqPb pbOffice.GetUserWorkMomentsReq
- respPb *pbOffice.GetUserWorkMomentsResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var opUserID string
- ok, opUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.OperationID = req.OperationID
- reqPb.Pagination = &pbCommon.RequestPagination{
- PageNumber: req.PageNumber,
- ShowNumber: req.ShowNumber,
- }
- reqPb.OpUserID = opUserID
- reqPb.UserID = req.UserID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
- return
- }
- resp.Data.WorkMoments = []*api.WorkMoment{}
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- for _, v := range respPb.WorkMoments {
- workMoment := api.WorkMoment{
- WorkMomentID: v.WorkMomentID,
- UserID: v.UserID,
- Content: v.Content,
- FaceURL: v.FaceURL,
- UserName: v.UserName,
- CreateTime: v.CreateTime,
- Comments: make([]*api.Comment, len(v.Comments)),
- LikeUserList: make([]*api.WorkMomentUser, len(v.LikeUserList)),
- AtUserList: make([]*api.WorkMomentUser, len(v.AtUserList)),
- PermissionUserList: make([]*api.WorkMomentUser, len(v.PermissionUserList)),
- Permission: v.Permission,
- }
- for i, comment := range v.Comments {
- workMoment.Comments[i] = &api.Comment{
- UserID: comment.UserID,
- UserName: comment.UserName,
- ReplyUserID: comment.ReplyUserID,
- ReplyUserName: comment.ReplyUserName,
- ContentID: comment.ContentID,
- Content: comment.Content,
- CreateTime: comment.CreateTime,
- }
- }
- for i, likeUser := range v.LikeUserList {
- workMoment.LikeUserList[i] = &api.WorkMomentUser{
- UserID: likeUser.UserID,
- UserName: likeUser.UserName,
- }
- }
- for i, atUser := range v.AtUserList {
- workMoment.AtUserList[i] = &api.WorkMomentUser{
- UserID: atUser.UserID,
- UserName: atUser.UserName,
- }
- }
- for i, permissionUser := range v.PermissionUserList {
- workMoment.PermissionUserList[i] = &api.WorkMomentUser{
- UserID: permissionUser.UserID,
- UserName: permissionUser.UserName,
- }
- }
- resp.Data.WorkMoments = append(resp.Data.WorkMoments, &workMoment)
- }
- resp.Data.ShowNumber = respPb.Pagination.ShowNumber
- resp.Data.CurrentPage = respPb.Pagination.CurrentPage
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-// @Summary 查询自己大工作圈页面
-// @Description 查询用户工作圈页面
-// @Tags 工作圈
-// @ID GetUserFriendWorkMoments
-// @Accept json
-// @Param token header string true "im token"
-// @Param req body api.GetUserFriendWorkMomentsReq true "请求"
-// @Produce json
-// @Success 0 {object} api.GetUserFriendWorkMomentsResp
-// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
-// @Router /office/get_user_friend_work_moments [post]
-func GetUserFriendWorkMoments(c *gin.Context) {
- var (
- req api.GetUserFriendWorkMomentsReq
- resp api.GetUserFriendWorkMomentsResp
- reqPb pbOffice.GetUserFriendWorkMomentsReq
- respPb *pbOffice.GetUserFriendWorkMomentsResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- reqPb.OperationID = req.OperationID
- reqPb.Pagination = &pbCommon.RequestPagination{
- PageNumber: req.PageNumber,
- ShowNumber: req.ShowNumber,
- }
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.GetUserFriendWorkMoments(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserFriendWorkMoments rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- //if err := utils.CopyStructFields(&resp.Map.WorkMoments, respPb.WorkMoments); err != nil {
- // log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- //}
- resp.Data.WorkMoments = []*api.WorkMoment{}
- for _, v := range respPb.WorkMoments {
- workMoment := api.WorkMoment{
- WorkMomentID: v.WorkMomentID,
- UserID: v.UserID,
- Content: v.Content,
- FaceURL: v.FaceURL,
- UserName: v.UserName,
- CreateTime: v.CreateTime,
- Comments: make([]*api.Comment, len(v.Comments)),
- LikeUserList: make([]*api.WorkMomentUser, len(v.LikeUserList)),
- AtUserList: make([]*api.WorkMomentUser, len(v.AtUserList)),
- PermissionUserList: make([]*api.WorkMomentUser, len(v.PermissionUserList)),
- Permission: v.Permission,
- }
- for i, comment := range v.Comments {
- workMoment.Comments[i] = &api.Comment{
- UserID: comment.UserID,
- UserName: comment.UserName,
- ReplyUserID: comment.ReplyUserID,
- ReplyUserName: comment.ReplyUserName,
- ContentID: comment.ContentID,
- Content: comment.Content,
- CreateTime: comment.CreateTime,
- }
- }
- for i, likeUser := range v.LikeUserList {
- workMoment.LikeUserList[i] = &api.WorkMomentUser{
- UserID: likeUser.UserID,
- UserName: likeUser.UserName,
- }
- }
- for i, atUser := range v.AtUserList {
- workMoment.AtUserList[i] = &api.WorkMomentUser{
- UserID: atUser.UserID,
- UserName: atUser.UserName,
- }
- }
- for i, permissionUser := range v.PermissionUserList {
- workMoment.PermissionUserList[i] = &api.WorkMomentUser{
- UserID: permissionUser.UserID,
- UserName: permissionUser.UserName,
- }
- }
- resp.Data.WorkMoments = append(resp.Data.WorkMoments, &workMoment)
- }
- resp.Data.ShowNumber = respPb.Pagination.ShowNumber
- resp.Data.CurrentPage = respPb.Pagination.CurrentPage
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
-
-func SetUserWorkMomentsLevel(c *gin.Context) {
- var (
- req api.SetUserWorkMomentsLevelReq
- resp api.SetUserWorkMomentsLevelResp
- reqPb pbOffice.SetUserWorkMomentsLevelReq
- respPb *pbOffice.SetUserWorkMomentsLevelResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
-
- var ok bool
- var errInfo string
- var userID string
- ok, userID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
- if !ok {
- errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- if err := utils.CopyStructFields(&reqPb, req); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- reqPb.UserID = userID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbOffice.NewOfficeServiceClient(etcdConn)
- respPb, err := client.SetUserWorkMomentsLevel(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetUserWorkMomentsLevel rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "SetUserWorkMomentsLevel rpc server failed" + err.Error()})
- return
- }
- if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, resp)
-}
diff --git a/internal/api/user/user.go b/internal/api/user/user.go
index 8e22ae4c6..3927acbaa 100644
--- a/internal/api/user/user.go
+++ b/internal/api/user/user.go
@@ -9,7 +9,7 @@ import (
"Open_IM/pkg/common/tokenverify"
cacheRpc "Open_IM/pkg/proto/cache"
pbRelay "Open_IM/pkg/proto/relay"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
rpc "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
"context"
@@ -52,10 +52,10 @@ func GetUsersInfoFromCache(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"})
return
}
- var publicUserInfoList []*open_im_sdk.PublicUserInfo
+ var publicUserInfoList []*sdkws.PublicUserInfo
for _, v := range RpcResp.UserInfoList {
publicUserInfoList = append(publicUserInfoList,
- &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
+ &sdkws.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
}
resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList}
resp.Data = jsonData.JsonDataList(resp.UserInfoList)
@@ -155,7 +155,7 @@ func GetBlackIDListFromCache(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetUsersInfoReq true "请求体"
// @Produce json
-// @Success 0 {object} api.GetUsersInfoResp{Map=[]open_im_sdk.PublicUserInfo}
+// @Success 0 {object} api.GetUsersInfoResp{Map=[]sdkws.PublicUserInfo}
// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/get_users_info [post]
@@ -195,10 +195,10 @@ func GetUsersPublicInfo(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"})
return
}
- var publicUserInfoList []*open_im_sdk.PublicUserInfo
+ var publicUserInfoList []*sdkws.PublicUserInfo
for _, v := range RpcResp.UserInfoList {
publicUserInfoList = append(publicUserInfoList,
- &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
+ &sdkws.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
}
resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList}
@@ -226,7 +226,7 @@ func UpdateUserInfo(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
- req := &rpc.UpdateUserInfoReq{UserInfo: &open_im_sdk.UserInfo{}}
+ req := &rpc.UpdateUserInfoReq{UserInfo: &sdkws.UserInfo{}}
utils.CopyStructFields(req.UserInfo, ¶ms)
req.OperationID = params.OperationID
var ok bool
@@ -317,7 +317,7 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetSelfUserInfoReq true "请求体"
// @Produce json
-// @Success 0 {object} api.GetSelfUserInfoResp{data=open_im_sdk.UserInfo}
+// @Success 0 {object} api.GetSelfUserInfoResp{data=sdkws.UserInfo}
// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/get_self_user_info [post]
@@ -482,7 +482,7 @@ func GetUsers(c *gin.Context) {
reqPb.UserID = req.UserID
reqPb.UserName = req.UserName
reqPb.Content = req.Content
- reqPb.Pagination = &open_im_sdk.RequestPagination{ShowNumber: req.ShowNumber, PageNumber: req.PageNumber}
+ reqPb.Pagination = &sdkws.RequestPagination{ShowNumber: req.ShowNumber, PageNumber: req.PageNumber}
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
diff --git a/internal/cmsapi/admin/admin.go b/internal/cmsapi/admin/admin.go
deleted file mode 100644
index 5eadf975d..000000000
--- a/internal/cmsapi/admin/admin.go
+++ /dev/null
@@ -1,128 +0,0 @@
-package admin
-
-import (
- apiStruct "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- pbAdmin "Open_IM/pkg/proto/admin_cms"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
-
- "github.com/minio/minio-go/v7"
- "github.com/minio/minio-go/v7/pkg/credentials"
-
- url2 "net/url"
-
- "github.com/gin-gonic/gin"
-)
-
-var (
- minioClient *minio.Client
-)
-
-func init() {
- log.NewPrivateLog(constant.LogFileName)
- operationID := utils.OperationIDGenerator()
- log.NewInfo(operationID, utils.GetSelfFuncName(), "minio config: ", config.Config.Credential.Minio)
- var initUrl string
- if config.Config.Credential.Minio.EndpointInnerEnable {
- initUrl = config.Config.Credential.Minio.EndpointInner
- } else {
- initUrl = config.Config.Credential.Minio.Endpoint
- }
- log.NewInfo(operationID, utils.GetSelfFuncName(), "use initUrl: ", initUrl)
- minioUrl, err := url2.Parse(initUrl)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "parse failed, please check config/config.yaml", err.Error())
- return
- }
- opts := &minio.Options{
- Creds: credentials.NewStaticV4(config.Config.Credential.Minio.AccessKeyID, config.Config.Credential.Minio.SecretAccessKey, ""),
- }
- if minioUrl.Scheme == "http" {
- opts.Secure = false
- } else if minioUrl.Scheme == "https" {
- opts.Secure = true
- }
- log.NewInfo(operationID, utils.GetSelfFuncName(), "Parse ok ", config.Config.Credential.Minio)
- minioClient, err = minio.New(minioUrl.Host, opts)
- log.NewInfo(operationID, utils.GetSelfFuncName(), "new ok ", config.Config.Credential.Minio)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "init minio client failed", err.Error())
- return
- }
-}
-
-func GetUserToken(c *gin.Context) {
- var (
- req apiStruct.GetUserTokenRequest
- resp apiStruct.GetUserTokenResponse
- reqPb pbAdmin.GetUserTokenReq
- respPb *pbAdmin.GetUserTokenResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = req.OperationID
- reqPb.UserID = req.UserID
- reqPb.PlatformID = req.PlatFormID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbAdmin.NewAdminCMSClient(etcdConn)
- respPb, err := client.GetUserToken(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- resp.Token = respPb.Token
- resp.ExpTime = respPb.ExpTime
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-// register
-func AdminLogin(c *gin.Context) {
- var (
- req apiStruct.AdminLoginRequest
- resp apiStruct.AdminLoginResponse
- reqPb pbAdmin.AdminLoginReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.Secret = req.Secret
- reqPb.AdminID = req.AdminName
- reqPb.OperationID = utils.OperationIDGenerator()
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbAdmin.NewAdminCMSClient(etcdConn)
- respPb, err := client.AdminLogin(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- resp.FaceURL = respPb.FaceURL
- resp.UserName = respPb.UserName
- resp.Token = respPb.Token
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/cmsapi/friend/friend.go b/internal/cmsapi/friend/friend.go
deleted file mode 100644
index a301b3e01..000000000
--- a/internal/cmsapi/friend/friend.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package friend
-
-import (
- "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- pbAdmin "Open_IM/pkg/proto/admin_cms"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
-
- "github.com/gin-gonic/gin"
-)
-
-func GetUserFriends(c *gin.Context) {
- var (
- req cms_struct.GetFriendsReq
- resp cms_struct.GetFriendsResp
- reqPb pbAdmin.GetUserFriendsReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.Pagination = &pbCommon.RequestPagination{}
- utils.CopyStructFields(&reqPb.Pagination, req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- reqPb.OperationID = req.OperationID
- reqPb.UserID = req.UserID
- reqPb.FriendUserName = req.FriendUserName
- reqPb.FriendUserID = req.FriendUserID
-
- client := pbAdmin.NewAdminCMSClient(etcdConn)
- respPb, err := client.GetUserFriends(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetUserInfo failed ", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- for _, v := range respPb.FriendInfoList {
- friend := &cms_struct.FriendInfo{}
- utils.CopyStructFields(friend, v)
- friend.Nickname = v.FriendUser.Nickname
- friend.UserID = v.FriendUser.UserID
- resp.FriendInfoList = append(resp.FriendInfoList, friend)
- }
- resp.FriendNums = respPb.FriendNums
- resp.CurrentPage = int(respPb.Pagination.CurrentPage)
- resp.ShowNumber = int(respPb.Pagination.ShowNumber)
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/cmsapi/group/group.go b/internal/cmsapi/group/group.go
deleted file mode 100644
index ff923c415..000000000
--- a/internal/cmsapi/group/group.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package group
-
-import (
- "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- common "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
-
- pbGroup "Open_IM/pkg/proto/group"
-
- "github.com/gin-gonic/gin"
-)
-
-func GetGroups(c *gin.Context) {
- var (
- req cms_struct.GetGroupsRequest
- resp cms_struct.GetGroupsResponse
- reqPb pbGroup.GetGroupsReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.Pagination = &common.RequestPagination{}
- utils.CopyStructFields(&reqPb.Pagination, req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- reqPb.GroupID = req.GroupID
- reqPb.GroupName = req.GroupName
- client := pbGroup.NewGroupClient(etcdConn)
- respPb, err := client.GetGroups(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetUserInfo failed ", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- for _, v := range respPb.CMSGroups {
- groupResp := cms_struct.GroupResponse{}
- utils.CopyStructFields(&groupResp, v.GroupInfo)
- groupResp.GroupOwnerName = v.GroupOwnerUserName
- groupResp.GroupOwnerID = v.GroupOwnerUserID
- resp.Groups = append(resp.Groups, groupResp)
- }
- resp.GroupNums = int(respPb.GroupNum)
- resp.CurrentPage = int(respPb.Pagination.CurrentPage)
- resp.ShowNumber = int(respPb.Pagination.ShowNumber)
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-func GetGroupMembers(c *gin.Context) {
- var (
- req cms_struct.GetGroupMembersRequest
- reqPb pbGroup.GetGroupMembersCMSReq
- resp cms_struct.GetGroupMembersResponse
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.Pagination = &common.RequestPagination{
- PageNumber: int32(req.PageNumber),
- ShowNumber: int32(req.ShowNumber),
- }
- reqPb.GroupID = req.GroupID
- reqPb.UserName = req.UserName
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbGroup.NewGroupClient(etcdConn)
- respPb, err := client.GetGroupMembersCMS(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetGroupMembersCMS failed:", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- resp.ResponsePagination = cms_struct.ResponsePagination{
- CurrentPage: int(respPb.Pagination.CurrentPage),
- ShowNumber: int(respPb.Pagination.ShowNumber),
- }
- resp.MemberNums = int(respPb.MemberNums)
- for _, groupMember := range respPb.Members {
- memberResp := cms_struct.GroupMemberResponse{}
- utils.CopyStructFields(&memberResp, groupMember)
- resp.GroupMembers = append(resp.GroupMembers, memberResp)
- }
- log.NewInfo("", utils.GetSelfFuncName(), "req: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/cmsapi/message_cms/message.go b/internal/cmsapi/message_cms/message.go
deleted file mode 100644
index 01b7d0916..000000000
--- a/internal/cmsapi/message_cms/message.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package messageCMS
-
-import (
- "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- pbAdminCMS "Open_IM/pkg/proto/admin_cms"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
-
- "github.com/gin-gonic/gin"
-)
-
-func GetChatLogs(c *gin.Context) {
- var (
- req cms_struct.GetChatLogsReq
- resp cms_struct.GetChatLogsResp
- reqPb pbAdminCMS.GetChatLogsReq
- )
- if err := c.Bind(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.Pagination = &pbCommon.RequestPagination{
- PageNumber: int32(req.PageNumber),
- ShowNumber: int32(req.ShowNumber),
- }
- utils.CopyStructFields(&reqPb, &req)
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbAdminCMS.NewAdminCMSClient(etcdConn)
- respPb, err := client.GetChatLogs(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetChatLogs rpc failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- for _, v := range respPb.ChatLogs {
- chatLog := cms_struct.ChatLog{}
- utils.CopyStructFields(&chatLog, v)
- resp.ChatLogs = append(resp.ChatLogs, &chatLog)
- }
- resp.ShowNumber = int(respPb.Pagination.ShowNumber)
- resp.CurrentPage = int(respPb.Pagination.CurrentPage)
- resp.ChatLogsNum = int(respPb.ChatLogsNum)
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/cmsapi/router.go b/internal/cmsapi/router.go
deleted file mode 100644
index 0c19f4b5d..000000000
--- a/internal/cmsapi/router.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package cmsapi
-
-import (
- "Open_IM/internal/cms_api/admin"
- "Open_IM/internal/cms_api/friend"
- "Open_IM/internal/cms_api/group"
- messageCMS "Open_IM/internal/cms_api/message_cms"
- "Open_IM/internal/cms_api/middleware"
- "Open_IM/internal/cms_api/statistics"
- "Open_IM/internal/cms_api/user"
- "Open_IM/pkg/common/config"
-
- promePkg "Open_IM/pkg/common/prometheus"
-
- "github.com/gin-gonic/gin"
-)
-
-func NewGinRouter() *gin.Engine {
- gin.SetMode(gin.ReleaseMode)
- baseRouter := gin.New()
- baseRouter.Use(gin.Recovery())
- baseRouter.Use(middleware.CorsHandler())
- if config.Config.Prometheus.Enable {
- baseRouter.GET("/metrics", promePkg.PrometheusHandler())
- }
- router := baseRouter.Group("/cms")
- adminRouterGroup := router.Group("/admin")
- {
- adminRouterGroup.POST("/login", admin.AdminLogin)
- adminRouterGroup.Use(middleware.JWTAuth())
- adminRouterGroup.POST("/get_user_token", admin.GetUserToken)
- }
- r2 := router.Group("")
- r2.Use(middleware.JWTAuth())
- statisticsRouterGroup := r2.Group("/statistics")
- {
- statisticsRouterGroup.POST("/get_messages_statistics", statistics.GetMessagesStatistics)
- statisticsRouterGroup.POST("/get_user_statistics", statistics.GetUserStatistics)
- statisticsRouterGroup.POST("/get_group_statistics", statistics.GetGroupStatistics)
- statisticsRouterGroup.POST("/get_active_user", statistics.GetActiveUser)
- statisticsRouterGroup.POST("/get_active_group", statistics.GetActiveGroup)
- }
- groupRouterGroup := r2.Group("/group")
- {
- groupRouterGroup.POST("/get_groups", group.GetGroups)
- groupRouterGroup.POST("/get_group_members", group.GetGroupMembers)
- }
- userRouterGroup := r2.Group("/user")
- {
- userRouterGroup.POST("/get_user_id_by_email_phone", user.GetUserIDByEmailAndPhoneNumber)
- }
- messageCMSRouterGroup := r2.Group("/message")
- {
- messageCMSRouterGroup.POST("/get_chat_logs", messageCMS.GetChatLogs)
- }
- friendCMSRouterGroup := r2.Group("/friend")
- {
- friendCMSRouterGroup.POST("/get_friends", friend.GetUserFriends)
- }
-
- return baseRouter
-}
diff --git a/internal/cmsapi/statistics/statistics.go b/internal/cmsapi/statistics/statistics.go
deleted file mode 100644
index feecf9d36..000000000
--- a/internal/cmsapi/statistics/statistics.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package statistics
-
-import (
- "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- admin "Open_IM/pkg/proto/admin_cms"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
- "time"
-
- "github.com/gin-gonic/gin"
-)
-
-func GetMessagesStatistics(c *gin.Context) {
- var (
- req cms_struct.GetMessageStatisticsRequest
- resp cms_struct.GetMessageStatisticsResponse
- reqPb admin.GetMessageStatisticsReq
- )
- reqPb.StatisticsReq = &admin.StatisticsReq{}
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := admin.NewAdminCMSClient(etcdConn)
- ctx, cancel := context.WithTimeout(context.TODO(), time.Second*100)
- defer cancel()
- respPb, err := client.GetMessageStatistics(ctx, &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetMessageStatistics failed", err.Error())
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
-
- resp.GroupMessageNum = int(respPb.GroupMessageNum)
- resp.PrivateMessageNum = int(respPb.PrivateMessageNum)
- for _, v := range respPb.PrivateMessageNumList {
- resp.PrivateMessageNumList = append(resp.PrivateMessageNumList, struct {
- Date string "json:\"date\""
- MessageNum int "json:\"messageNum\""
- }{
- Date: v.Date,
- MessageNum: int(v.Num),
- })
- }
- for _, v := range respPb.GroupMessageNumList {
- resp.GroupMessageNumList = append(resp.GroupMessageNumList, struct {
- Date string "json:\"date\""
- MessageNum int "json:\"messageNum\""
- }{
- Date: v.Date,
- MessageNum: int(v.Num),
- })
- }
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-func GetUserStatistics(c *gin.Context) {
- var (
- req cms_struct.GetUserStatisticsRequest
- resp cms_struct.GetUserStatisticsResponse
- reqPb admin.GetUserStatisticsReq
- )
- reqPb.StatisticsReq = &admin.StatisticsReq{}
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := admin.NewAdminCMSClient(etcdConn)
- ctx, cancel := context.WithTimeout(context.TODO(), time.Second*100)
- defer cancel()
- respPb, err := client.GetUserStatistics(ctx, &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetUserStatistics failed", err.Error(), reqPb.String())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- resp.ActiveUserNum = int(respPb.ActiveUserNum)
- resp.IncreaseUserNum = int(respPb.IncreaseUserNum)
- resp.TotalUserNum = int(respPb.TotalUserNum)
- for _, v := range respPb.ActiveUserNumList {
- resp.ActiveUserNumList = append(resp.ActiveUserNumList, struct {
- Date string "json:\"date\""
- ActiveUserNum int "json:\"activeUserNum\""
- }{
- Date: v.Date,
- ActiveUserNum: int(v.Num),
- })
- }
- for _, v := range respPb.IncreaseUserNumList {
- resp.IncreaseUserNumList = append(resp.IncreaseUserNumList, struct {
- Date string "json:\"date\""
- IncreaseUserNum int "json:\"increaseUserNum\""
- }{
- Date: v.Date,
- IncreaseUserNum: int(v.Num),
- })
- }
- for _, v := range respPb.TotalUserNumList {
- resp.TotalUserNumList = append(resp.TotalUserNumList, struct {
- Date string "json:\"date\""
- TotalUserNum int "json:\"totalUserNum\""
- }{
- Date: v.Date,
- TotalUserNum: int(v.Num),
- })
- }
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-func GetGroupStatistics(c *gin.Context) {
- var (
- req cms_struct.GetGroupStatisticsRequest
- resp cms_struct.GetGroupStatisticsResponse
- reqPb admin.GetGroupStatisticsReq
- )
- reqPb.StatisticsReq = &admin.StatisticsReq{}
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := admin.NewAdminCMSClient(etcdConn)
- ctx, cancel := context.WithTimeout(context.TODO(), time.Second*100)
- defer cancel()
- respPb, err := client.GetGroupStatistics(ctx, &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetGroupStatistics failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- // utils.CopyStructFields(&resp, respPb)
- resp.IncreaseGroupNum = int(respPb.GetIncreaseGroupNum())
- resp.TotalGroupNum = int(respPb.GetTotalGroupNum())
- for _, v := range respPb.IncreaseGroupNumList {
- resp.IncreaseGroupNumList = append(resp.IncreaseGroupNumList,
- struct {
- Date string "json:\"date\""
- IncreaseGroupNum int "json:\"increaseGroupNum\""
- }{
- Date: v.Date,
- IncreaseGroupNum: int(v.Num),
- })
- }
- for _, v := range respPb.TotalGroupNumList {
- resp.TotalGroupNumList = append(resp.TotalGroupNumList,
- struct {
- Date string "json:\"date\""
- TotalGroupNum int "json:\"totalGroupNum\""
- }{
- Date: v.Date,
- TotalGroupNum: int(v.Num),
- })
-
- }
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-func GetActiveUser(c *gin.Context) {
- var (
- req cms_struct.GetActiveUserRequest
- resp cms_struct.GetActiveUserResponse
- reqPb admin.GetActiveUserReq
- )
- reqPb.StatisticsReq = &admin.StatisticsReq{}
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- utils.CopyStructFields(&reqPb.StatisticsReq, req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := admin.NewAdminCMSClient(etcdConn)
- ctx, cancel := context.WithTimeout(context.TODO(), time.Second*100)
- defer cancel()
- respPb, err := client.GetActiveUser(ctx, &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetActiveUser failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- utils.CopyStructFields(&resp.ActiveUserList, respPb.Users)
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
-
-func GetActiveGroup(c *gin.Context) {
- var (
- req cms_struct.GetActiveGroupRequest
- resp cms_struct.GetActiveGroupResponse
- reqPb admin.GetActiveGroupReq
- )
- reqPb.StatisticsReq = &admin.StatisticsReq{}
- if err := c.BindJSON(&req); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- utils.CopyStructFields(&reqPb.StatisticsReq, req)
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := admin.NewAdminCMSClient(etcdConn)
- ctx, cancel := context.WithTimeout(context.TODO(), time.Second*100)
- defer cancel()
- respPb, err := client.GetActiveGroup(ctx, &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetActiveGroup failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- for _, group := range respPb.Groups {
- resp.ActiveGroupList = append(resp.ActiveGroupList, struct {
- GroupName string "json:\"groupName\""
- GroupId string "json:\"groupID\""
- MessageNum int "json:\"messageNum\""
- }{
- GroupName: group.GroupName,
- GroupId: group.GroupId,
- MessageNum: int(group.MessageNum),
- })
- }
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/cmsapi/user/user.go b/internal/cmsapi/user/user.go
deleted file mode 100644
index ea9976b01..000000000
--- a/internal/cmsapi/user/user.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package user
-
-import (
- "Open_IM/pkg/cms_api_struct"
- "Open_IM/pkg/cms_struct"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- pbAdminCms "Open_IM/pkg/proto/admin_cms"
- common "Open_IM/pkg/proto/sdkws"
- pb "Open_IM/pkg/proto/user"
- "Open_IM/pkg/utils"
- "context"
- "net/http"
- "strings"
-
- "github.com/gin-gonic/gin"
-)
-
-func GetUserIDByEmailAndPhoneNumber(c *gin.Context) {
- var (
- req cmsstruct.GetUserIDByEmailAndPhoneNumberRequest
- resp cmsstruct.GetUserIDByEmailAndPhoneNumberResponse
- reqPb pbAdminCms.GetUserIDByEmailAndPhoneNumberReq
- respPb *pbAdminCms.GetUserIDByEmailAndPhoneNumberResp
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
- return
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.OperationID = req.OperationID
- reqPb.Email = req.Email
- reqPb.PhoneNumber = req.PhoneNumber
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbAdminCms.NewAdminCMSClient(etcdConn)
- respPb, err := client.GetUserIDByEmailAndPhoneNumber(context.Background(), &reqPb)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()})
- return
- }
- resp.UserIDList = respPb.UserIDList
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", resp)
- c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
-}
diff --git a/internal/common/check/user.go b/internal/common/check/user.go
index 66f75198f..af5954c91 100644
--- a/internal/common/check/user.go
+++ b/internal/common/check/user.go
@@ -6,6 +6,32 @@ import (
"errors"
)
-func GetUsersInfo(ctx context.Context, args ...interface{}) ([]*sdkws.UserInfo, error) {
- return nil, errors.New("TODO:GetUserInfo")
+//func GetUsersInfo(ctx context.Context, args ...interface{}) ([]*sdkws.UserInfo, error) {
+// return nil, errors.New("TODO:GetUserInfo")
+//}
+
+func NewUserCheck() *UserCheck {
+ return &UserCheck{}
+}
+
+type UserCheck struct{}
+
+func (u *UserCheck) GetUsersInfos(ctx context.Context, userIDs []string, complete bool) ([]*sdkws.UserInfo, error) {
+ return nil, errors.New("todo")
+}
+
+func (u *UserCheck) GetUsersInfoMap(ctx context.Context, userIDs []string, complete bool) (map[string]*sdkws.UserInfo, error) {
+ return nil, errors.New("todo")
+}
+
+func (u *UserCheck) GetPublicUserInfo(ctx context.Context, userID string) (*sdkws.PublicUserInfo, error) {
+ return nil, errors.New("todo")
+}
+
+func (u *UserCheck) GetPublicUserInfos(ctx context.Context, userIDs []string, complete bool) ([]*sdkws.PublicUserInfo, error) {
+ return nil, errors.New("todo")
+}
+
+func (u *UserCheck) GetPublicUserInfoMap(ctx context.Context, userIDs []string, complete bool) (map[string]*sdkws.PublicUserInfo, error) {
+ return nil, errors.New("todo")
}
diff --git a/internal/common/notification/conversation_notification.go b/internal/common/notification/conversation_notification.go
index 4d0a615ad..88d56f10a 100644
--- a/internal/common/notification/conversation_notification.go
+++ b/internal/common/notification/conversation_notification.go
@@ -1,18 +1,17 @@
-package notification
+package msg
import (
- "Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
)
-func SetConversationNotification(operationID, sendID, recvID string, contentType int, m proto.Message, tips open_im_sdk.TipsComm) {
+func SetConversationNotification(operationID, sendID, recvID string, contentType int, m proto.Message, tips sdkws.TipsComm) {
log.NewInfo(operationID, "args: ", sendID, recvID, contentType, m.String(), tips.String())
var err error
tips.Detail, err = proto.Marshal(m)
@@ -26,7 +25,7 @@ func SetConversationNotification(operationID, sendID, recvID string, contentType
EmitDefaults: false,
}
tips.JsonDetail, _ = marshaler.MarshalToString(m)
- var n msg.NotificationMsg
+ var n NotificationMsg
n.SendID = sendID
n.RecvID = recvID
n.ContentType = int32(contentType)
@@ -38,18 +37,18 @@ func SetConversationNotification(operationID, sendID, recvID string, contentType
log.Error(operationID, utils.GetSelfFuncName(), "Marshal failed ", err.Error(), tips.String())
return
}
- msg.Notification(&n)
+ Notification(&n)
}
// SetPrivate调用
-func ConversationSetPrivateNotification(operationID, sendID, recvID string, isPrivateChat bool) {
+func ConversationSetPrivateNotification(ctx context.Context, sendID, recvID string, isPrivateChat bool) {
log.NewInfo(operationID, utils.GetSelfFuncName())
- conversationSetPrivateTips := &open_im_sdk.ConversationSetPrivateTips{
+ conversationSetPrivateTips := &sdkws.ConversationSetPrivateTips{
RecvID: recvID,
SendID: sendID,
IsPrivate: isPrivateChat,
}
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
var tipsMsg string
if isPrivateChat == true {
tipsMsg = config.Config.Notification.ConversationSetPrivate.DefaultTips.OpenTips
@@ -63,23 +62,23 @@ func ConversationSetPrivateNotification(operationID, sendID, recvID string, isPr
// 会话改变
func ConversationChangeNotification(ctx context.Context, userID string) {
log.NewInfo(operationID, utils.GetSelfFuncName())
- ConversationChangedTips := &open_im_sdk.ConversationUpdateTips{
+ ConversationChangedTips := &sdkws.ConversationUpdateTips{
UserID: userID,
}
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.DefaultTips = config.Config.Notification.ConversationOptUpdate.DefaultTips.Tips
SetConversationNotification(operationID, userID, userID, constant.ConversationOptChangeNotification, ConversationChangedTips, tips)
}
-// 会话未读数同步
-func ConversationUnreadChangeNotification(operationID, userID, conversationID string, updateUnreadCountTime int64) {
+//会话未读数同步
+func ConversationUnreadChangeNotification(context context.Context, userID, conversationID string, updateUnreadCountTime int64) {
log.NewInfo(operationID, utils.GetSelfFuncName())
- ConversationChangedTips := &open_im_sdk.ConversationUpdateTips{
+ ConversationChangedTips := &sdkws.ConversationUpdateTips{
UserID: userID,
ConversationIDList: []string{conversationID},
UpdateUnreadCountTime: updateUnreadCountTime,
}
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.DefaultTips = config.Config.Notification.ConversationOptUpdate.DefaultTips.Tips
SetConversationNotification(operationID, userID, userID, constant.ConversationUnreadNotification, ConversationChangedTips, tips)
}
diff --git a/internal/common/notification/extend_msg.notification.go b/internal/common/notification/extend_msg.notification.go
index 03e47f1be..5a3b78a07 100644
--- a/internal/common/notification/extend_msg.notification.go
+++ b/internal/common/notification/extend_msg.notification.go
@@ -5,7 +5,7 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/proto/msg"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
)
@@ -16,7 +16,7 @@ func ExtendMessageUpdatedNotification(operationID, sendID string, sourceID strin
m.SourceID = req.SourceID
m.OpUserID = req.OpUserID
m.SessionType = req.SessionType
- keyMap := make(map[string]*open_im_sdk.KeyValue)
+ keyMap := make(map[string]*sdkws.KeyValue)
for _, valueResp := range resp.Result {
if valueResp.ErrCode == 0 {
keyMap[valueResp.KeyValue.TypeKey] = valueResp.KeyValue
@@ -39,7 +39,7 @@ func ExtendMessageDeleteNotification(operationID, sendID string, sourceID string
m.SourceID = req.SourceID
m.OpUserID = req.OpUserID
m.SessionType = req.SessionType
- keyMap := make(map[string]*open_im_sdk.KeyValue)
+ keyMap := make(map[string]*sdkws.KeyValue)
for _, valueResp := range resp.Result {
if valueResp.ErrCode == 0 {
keyMap[valueResp.KeyValue.TypeKey] = valueResp.KeyValue
@@ -68,7 +68,7 @@ func messageReactionSender(operationID, sendID string, sourceID string, sessionT
}
pbData := msg.SendMsgReq{
OperationID: operationID,
- MsgData: &open_im_sdk.MsgData{
+ MsgData: &sdkws.MsgData{
SendID: sendID,
ClientMsgID: utils.GetMsgID(sendID),
SessionType: sessionType,
diff --git a/internal/common/notification/friend_notification.go b/internal/common/notification/friend_notification.go
index 0dd4736c4..2ade47709 100644
--- a/internal/common/notification/friend_notification.go
+++ b/internal/common/notification/friend_notification.go
@@ -8,7 +8,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/tracelog"
pbFriend "Open_IM/pkg/proto/friend"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"github.com/golang/protobuf/jsonpb"
@@ -30,7 +30,7 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error)
func friendNotification(operationID, fromUserID, toUserID string, contentType int32, m proto.Message) {
log.Info(operationID, utils.GetSelfFuncName(), "args: ", contentType)
var err error
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.Detail, err = proto.Marshal(m)
if err != nil {
log.Error(operationID, "Marshal failed ", err.Error(), m.String())
@@ -93,14 +93,14 @@ func friendNotification(operationID, fromUserID, toUserID string, contentType in
}
func FriendApplicationAddNotification(ctx context.Context, req *pbFriend.AddFriendReq) {
- FriendApplicationTips := open_im_sdk.FriendApplicationTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ FriendApplicationTips := sdkws.FriendApplicationTips{FromToUserID: &sdkws.FromToUserID{}}
FriendApplicationTips.FromToUserID.FromUserID = req.FromUserID
FriendApplicationTips.FromToUserID.ToUserID = req.ToUserID
friendNotification(tracelog.GetOperationID(ctx), req.FromUserID, req.ToUserID, constant.FriendApplicationNotification, &FriendApplicationTips)
}
func FriendApplicationAgreedNotification(ctx context.Context, req *pbFriend.RespondFriendApplyReq) {
- FriendApplicationApprovedTips := open_im_sdk.FriendApplicationApprovedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ FriendApplicationApprovedTips := sdkws.FriendApplicationApprovedTips{FromToUserID: &sdkws.FromToUserID{}}
FriendApplicationApprovedTips.FromToUserID.FromUserID = req.FromUserID
FriendApplicationApprovedTips.FromToUserID.ToUserID = req.ToUserID
FriendApplicationApprovedTips.HandleMsg = req.HandleMsg
@@ -108,7 +108,7 @@ func FriendApplicationAgreedNotification(ctx context.Context, req *pbFriend.Resp
}
func FriendApplicationRefusedNotification(ctx context.Context, req *pbFriend.RespondFriendApplyReq) {
- FriendApplicationApprovedTips := open_im_sdk.FriendApplicationApprovedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ FriendApplicationApprovedTips := sdkws.FriendApplicationApprovedTips{FromToUserID: &sdkws.FromToUserID{}}
FriendApplicationApprovedTips.FromToUserID.FromUserID = req.FromUserID
FriendApplicationApprovedTips.FromToUserID.ToUserID = req.ToUserID
FriendApplicationApprovedTips.HandleMsg = req.HandleMsg
@@ -116,7 +116,7 @@ func FriendApplicationRefusedNotification(ctx context.Context, req *pbFriend.Res
}
func FriendAddedNotification(ctx context.Context, operationID, opUserID, fromUserID, toUserID string) {
- friendAddedTips := open_im_sdk.FriendAddedTips{Friend: &open_im_sdk.FriendInfo{}, OpUser: &open_im_sdk.PublicUserInfo{}}
+ friendAddedTips := sdkws.FriendAddedTips{Friend: &sdkws.FriendInfo{}, OpUser: &sdkws.PublicUserInfo{}}
user, err := check.GetUsersInfo(context.Background(), opUserID)
if err != nil {
return
@@ -135,28 +135,28 @@ func FriendAddedNotification(ctx context.Context, operationID, opUserID, fromUse
}
func FriendDeletedNotification(ctx context.Context, req *pbFriend.DeleteFriendReq) {
- friendDeletedTips := open_im_sdk.FriendDeletedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ friendDeletedTips := sdkws.FriendDeletedTips{FromToUserID: &sdkws.FromToUserID{}}
friendDeletedTips.FromToUserID.FromUserID = req.OwnerUserID
friendDeletedTips.FromToUserID.ToUserID = req.FriendUserID
friendNotification(tracelog.GetOperationID(ctx), req.OwnerUserID, req.FriendUserID, constant.FriendDeletedNotification, &friendDeletedTips)
}
func FriendRemarkSetNotification(ctx context.Context, fromUserID, toUserID string) {
- friendInfoChangedTips := open_im_sdk.FriendInfoChangedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ friendInfoChangedTips := sdkws.FriendInfoChangedTips{FromToUserID: &sdkws.FromToUserID{}}
friendInfoChangedTips.FromToUserID.FromUserID = fromUserID
friendInfoChangedTips.FromToUserID.ToUserID = toUserID
friendNotification(tracelog.GetOperationID(ctx), fromUserID, toUserID, constant.FriendRemarkSetNotification, &friendInfoChangedTips)
}
func BlackAddedNotification(ctx context.Context, req *pbFriend.AddBlackReq) {
- blackAddedTips := open_im_sdk.BlackAddedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ blackAddedTips := sdkws.BlackAddedTips{FromToUserID: &sdkws.FromToUserID{}}
blackAddedTips.FromToUserID.FromUserID = req.OwnerUserID
blackAddedTips.FromToUserID.ToUserID = req.BlackUserID
friendNotification(tracelog.GetOperationID(ctx), req.OwnerUserID, req.BlackUserID, constant.BlackAddedNotification, &blackAddedTips)
}
func BlackDeletedNotification(ctx context.Context, req *pbFriend.RemoveBlackReq) {
- blackDeletedTips := open_im_sdk.BlackDeletedTips{FromToUserID: &open_im_sdk.FromToUserID{}}
+ blackDeletedTips := sdkws.BlackDeletedTips{FromToUserID: &sdkws.FromToUserID{}}
blackDeletedTips.FromToUserID.FromUserID = req.OwnerUserID
blackDeletedTips.FromToUserID.ToUserID = req.BlackUserID
friendNotification(tracelog.GetOperationID(ctx), req.OwnerUserID, req.BlackUserID, constant.BlackDeletedNotification, &blackDeletedTips)
@@ -164,11 +164,11 @@ func BlackDeletedNotification(ctx context.Context, req *pbFriend.RemoveBlackReq)
// send to myself
func UserInfoUpdatedNotification(ctx context.Context, opUserID string, changedUserID string) {
- selfInfoUpdatedTips := open_im_sdk.UserInfoUpdatedTips{UserID: changedUserID}
+ selfInfoUpdatedTips := sdkws.UserInfoUpdatedTips{UserID: changedUserID}
friendNotification(tracelog.GetOperationID(ctx), opUserID, changedUserID, constant.UserInfoUpdatedNotification, &selfInfoUpdatedTips)
}
func FriendInfoUpdatedNotification(ctx context.Context, changedUserID string, needNotifiedUserID string, opUserID string) {
- selfInfoUpdatedTips := open_im_sdk.UserInfoUpdatedTips{UserID: changedUserID}
+ selfInfoUpdatedTips := sdkws.UserInfoUpdatedTips{UserID: changedUserID}
friendNotification(tracelog.GetOperationID(ctx), opUserID, needNotifiedUserID, constant.FriendInfoUpdatedNotification, &selfInfoUpdatedTips)
}
diff --git a/internal/common/notification/group_notification.go b/internal/common/notification/group_notification.go
index 30cd5f5f0..c3982ed6d 100644
--- a/internal/common/notification/group_notification.go
+++ b/internal/common/notification/group_notification.go
@@ -107,7 +107,7 @@ func groupNotification(contentType int32, m proto.Message, sendID, groupID, recv
log.Info(operationID, utils.GetSelfFuncName(), "args: ", contentType, sendID, groupID, recvUserID)
var err error
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.Detail, err = proto.Marshal(m)
if err != nil {
log.Error(operationID, "Marshal failed ", err.Error(), m.String())
@@ -212,8 +212,8 @@ func groupNotification(contentType int32, m proto.Message, sendID, groupID, recv
// 创建群后调用
func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberList []string) {
- GroupCreatedTips := sdkws.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{},
- OpUser: &open_im_sdk.GroupMemberFullInfo{}, GroupOwnerUser: &open_im_sdk.GroupMemberFullInfo{}}
+ GroupCreatedTips := sdkws.GroupCreatedTips{Group: &sdkws.GroupInfo{},
+ OpUser: &sdkws.GroupMemberFullInfo{}, GroupOwnerUser: &sdkws.GroupMemberFullInfo{}}
if err := setOpUserInfo(opUserID, groupID, GroupCreatedTips.OpUser); err != nil {
log.NewError(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, GroupCreatedTips.OpUser)
return
@@ -229,7 +229,7 @@ func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberL
return
}
for _, v := range initMemberList {
- var groupMemberInfo open_im_sdk.GroupMemberFullInfo
+ var groupMemberInfo sdkws.GroupMemberFullInfo
if err := setGroupMemberInfo(groupID, v, &groupMemberInfo); err != nil {
log.Error(operationID, "setGroupMemberInfo failed ", err.Error(), groupID, v)
continue
diff --git a/internal/common/notification/msg_notification.go b/internal/common/notification/msg_notification.go
index f6e0a77f4..a846ce738 100644
--- a/internal/common/notification/msg_notification.go
+++ b/internal/common/notification/msg_notification.go
@@ -4,21 +4,21 @@ import (
"Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
)
func DeleteMessageNotification(opUserID, userID string, seqList []uint32, operationID string) {
- DeleteMessageTips := open_im_sdk.DeleteMessageTips{OpUserID: opUserID, UserID: userID, SeqList: seqList}
+ DeleteMessageTips := sdkws.DeleteMessageTips{OpUserID: opUserID, UserID: userID, SeqList: seqList}
MessageNotification(operationID, userID, userID, constant.DeleteMessageNotification, &DeleteMessageTips)
}
func MessageNotification(operationID, sendID, recvID string, contentType int32, m proto.Message) {
log.Debug(operationID, utils.GetSelfFuncName(), "args: ", m.String(), contentType)
var err error
- var tips open_im_sdk.TipsComm
+ var tips sdkws.TipsComm
tips.Detail, err = proto.Marshal(m)
if err != nil {
log.Error(operationID, "Marshal failed ", err.Error(), m.String())
diff --git a/internal/common/notification/work_moments_notification.go b/internal/common/notification/work_moments_notification.go
deleted file mode 100644
index 271fe23e6..000000000
--- a/internal/common/notification/work_moments_notification.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package notification
-
-import (
- "Open_IM/internal/rpc/msg"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/log"
- pbOffice "Open_IM/pkg/proto/office"
- sdk "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "github.com/golang/protobuf/jsonpb"
- "github.com/golang/protobuf/proto"
-)
-
-func WorkMomentSendNotification(operationID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg) {
- log.NewInfo(operationID, utils.GetSelfFuncName(), recvID, notificationMsg)
- WorkMomentNotification(operationID, recvID, recvID, notificationMsg)
-}
-
-func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message) {
- var tips sdk.TipsComm
- var err error
- marshaler := jsonpb.Marshaler{
- OrigName: true,
- EnumsAsInts: false,
- EmitDefaults: false,
- }
- tips.JsonDetail, _ = marshaler.MarshalToString(m)
- n := &msg.NotificationMsg{
- SendID: sendID,
- RecvID: recvID,
- MsgFrom: constant.UserMsgType,
- ContentType: constant.WorkMomentNotification,
- SessionType: constant.SingleChatType,
- OperationID: operationID,
- }
- n.Content, err = proto.Marshal(&tips)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "proto.Marshal failed")
- return
- }
- log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
- msg.Notification(n)
-}
diff --git a/internal/msggateway/validate.go b/internal/msggateway/validate.go
index 4f505995c..72fec3d53 100644
--- a/internal/msggateway/validate.go
+++ b/internal/msggateway/validate.go
@@ -10,7 +10,7 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
pbRtc "Open_IM/pkg/proto/rtc"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"github.com/golang/protobuf/proto"
)
@@ -60,7 +60,7 @@ type SeqListData struct {
func (ws *WServer) argsValidate(m *Req, r int32, operationID string) (isPass bool, errCode int32, errMsg string, returnData interface{}) {
switch r {
case constant.WSGetNewestSeq:
- data := open_im_sdk.GetMaxAndMinSeqReq{}
+ data := sdkws.GetMaxAndMinSeqReq{}
if err := proto.Unmarshal(m.Data, &data); err != nil {
log.Error(operationID, "Decode Map struct err", err.Error(), r)
return false, 203, err.Error(), nil
@@ -72,7 +72,7 @@ func (ws *WServer) argsValidate(m *Req, r int32, operationID string) (isPass boo
}
return true, 0, "", data
case constant.WSSendMsg:
- data := open_im_sdk.MsgData{}
+ data := sdkws.MsgData{}
if err := proto.Unmarshal(m.Data, &data); err != nil {
log.Error(operationID, "Decode Map struct err", err.Error(), r)
return false, 203, err.Error(), nil
@@ -96,7 +96,7 @@ func (ws *WServer) argsValidate(m *Req, r int32, operationID string) (isPass boo
}
return true, 0, "", &data
case constant.WSPullMsgBySeqList:
- data := open_im_sdk.PullMessageBySeqListReq{}
+ data := sdkws.PullMessageBySeqListReq{}
if err := proto.Unmarshal(m.Data, &data); err != nil {
log.Error(operationID, "Decode Map struct err", err.Error(), r)
return false, 203, err.Error(), nil
@@ -108,7 +108,7 @@ func (ws *WServer) argsValidate(m *Req, r int32, operationID string) (isPass boo
}
return true, 0, "", data
case constant.WsSetBackgroundStatus:
- data := open_im_sdk.SetAppBackgroundStatusReq{}
+ data := sdkws.SetAppBackgroundStatusReq{}
if err := proto.Unmarshal(m.Data, &data); err != nil {
log.Error(operationID, "Decode Map struct err", err.Error(), r)
return false, 203, err.Error(), nil
diff --git a/internal/rpc/admincms/admin_cms.go b/internal/rpc/admincms/admin_cms.go
deleted file mode 100644
index 00043ae73..000000000
--- a/internal/rpc/admincms/admin_cms.go
+++ /dev/null
@@ -1,547 +0,0 @@
-package admincms
-
-import (
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/db/cache"
- "Open_IM/pkg/common/db/controller"
- "Open_IM/pkg/common/db/relation"
- "Open_IM/pkg/common/log"
- promePkg "Open_IM/pkg/common/prometheus"
- "Open_IM/pkg/common/tokenverify"
- "Open_IM/pkg/common/tracelog"
- pbAdminCMS "Open_IM/pkg/proto/admin_cms"
- common "Open_IM/pkg/proto/sdkws"
-
- grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
-
- "Open_IM/pkg/utils"
- "context"
- "errors"
- "net"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "google.golang.org/grpc"
- "gorm.io/gorm"
-)
-
-type adminCMSServer struct {
- rpcPort int
- rpcRegisterName string
- etcdSchema string
- etcdAddr []string
- adminCMSInterface controller.AdminCMSInterface
- groupInterface controller.GroupInterface
- userInterface controller.UserInterface
- chatLogInterface controller.ChatLogInterface
-}
-
-func NewAdminCMSServer(port int) *adminCMSServer {
- log.NewPrivateLog(constant.LogFileName)
- admin := &adminCMSServer{
- rpcPort: port,
- rpcRegisterName: config.Config.RpcRegisterName.OpenImAdminCMSName,
- etcdSchema: config.Config.Zookeeper.Schema,
- etcdAddr: config.Config.Zookeeper.ZkAddr,
- }
- var mysql relation.Mysql
- var redis cache.RedisClient
- mysql.InitConn()
- redis.InitRedis()
- admin.userInterface = controller.NewUserController(mysql.GormConn())
- admin.groupInterface = controller.NewGroupInterface(mysql.GormConn(), redis.GetClient(), nil)
- admin.adminCMSInterface = controller.NewAdminCMSController(mysql.GormConn())
- admin.chatLogInterface = controller.NewChatLogController(mysql.GormConn())
- return admin
-}
-
-func (s *adminCMSServer) Run() {
- log.NewInfo("0", "AdminCMS rpc start ")
- listenIP := ""
- if config.Config.ListenIP == "" {
- listenIP = "0.0.0.0"
- } else {
- listenIP = config.Config.ListenIP
- }
- address := listenIP + ":" + strconv.Itoa(s.rpcPort)
- //listener network
- listener, err := net.Listen("tcp", address)
- if err != nil {
- panic("listening err:" + err.Error() + s.rpcRegisterName)
- }
- log.NewInfo("0", "listen network success, ", address, listener)
- defer listener.Close()
- var grpcOpts []grpc.ServerOption
- if config.Config.Prometheus.Enable {
- promePkg.NewGrpcRequestCounter()
- promePkg.NewGrpcRequestFailedCounter()
- promePkg.NewGrpcRequestSuccessCounter()
- grpcOpts = append(grpcOpts, []grpc.ServerOption{
- // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme),
- grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor),
- grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor),
- }...)
- }
- srv := grpc.NewServer(grpcOpts...)
- defer srv.GracefulStop()
- //Service registers with etcd
- pbAdminCMS.RegisterAdminCMSServer(srv, s)
- rpcRegisterIP := config.Config.RpcRegisterIP
- if config.Config.RpcRegisterIP == "" {
- rpcRegisterIP, err = utils.GetLocalIP()
- if err != nil {
- log.Error("", "GetLocalIP failed ", err.Error())
- }
- }
- log.NewInfo("", "rpcRegisterIP ", rpcRegisterIP)
- err = rpc.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
- if err != nil {
- log.NewError("0", "RegisterEtcd failed ", err.Error())
- panic(utils.Wrap(err, "register admin module rpc to etcd err"))
- }
- err = srv.Serve(listener)
- if err != nil {
- log.NewError("0", "Serve failed ", err.Error())
- return
- }
- log.NewInfo("0", "message cms rpc success")
-}
-
-func (s *adminCMSServer) AdminLogin(ctx context.Context, req *pbAdminCMS.AdminLoginReq) (*pbAdminCMS.AdminLoginResp, error) {
- resp := &pbAdminCMS.AdminLoginResp{}
- for i, adminID := range config.Config.Manager.AppManagerUid {
- if adminID == req.AdminID && config.Config.Manager.Secrets[i] == req.Secret {
- token, expTime, err := tokenverify.CreateToken(adminID, constant.LinuxPlatformID)
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "generate token failed", "adminID: ", adminID, err.Error())
- return nil, err
- }
- log.NewInfo(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "generate token success", "token: ", token, "expTime:", expTime)
- resp.Token = token
- break
- }
- }
- if resp.Token == "" {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "failed")
- return nil, constant.ErrInternalServer
- }
- admin, err := s.userInterface.Take(ctx, req.AdminID)
- if err != nil {
- return nil, err
- }
- resp.UserName = admin.Nickname
- resp.FaceURL = admin.FaceURL
- return resp, nil
-}
-
-func (s *adminCMSServer) GetUserToken(ctx context.Context, req *pbAdminCMS.GetUserTokenReq) (*pbAdminCMS.GetUserTokenResp, error) {
- token, expTime, err := tokenverify.CreateToken(req.UserID, int(req.PlatformID))
- if err != nil {
- return nil, err
- }
- resp := &pbAdminCMS.GetUserTokenResp{Token: token, ExpTime: expTime}
- return resp, nil
-}
-
-func (s *adminCMSServer) GetChatLogs(ctx context.Context, req *pbAdminCMS.GetChatLogsReq) (*pbAdminCMS.GetChatLogsResp, error) {
- chatLog := relation.ChatLog{
- Content: req.Content,
- ContentType: req.ContentType,
- SessionType: req.SessionType,
- RecvID: req.RecvID,
- SendID: req.SendID,
- }
- if req.SendTime != "" {
- sendTime, err := utils.TimeStringToTime(req.SendTime)
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "time string parse error", err.Error())
- return nil, err
- }
- chatLog.SendTime = sendTime
- }
- num, chatLogs, err := s.chatLogInterface.GetChatLog(&chatLog, req.Pagination.PageNumber, req.Pagination.ShowNumber, []int32{
- constant.Text,
- constant.Picture,
- constant.Voice,
- constant.Video,
- constant.File,
- constant.AtText,
- constant.Merger,
- constant.Card,
- constant.Location,
- constant.Custom,
- constant.Revoke,
- constant.Quote,
- constant.AdvancedText,
- constant.AdvancedRevoke,
- constant.CustomNotTriggerConversation,
- })
- if err != nil {
- return nil, err
- }
- resp := &pbAdminCMS.GetChatLogsResp{}
- resp.ChatLogsNum = int32(num)
- for _, chatLog := range chatLogs {
- pbChatLog := &pbAdminCMS.ChatLog{}
- utils.CopyStructFields(pbChatLog, chatLog)
- pbChatLog.SendTime = chatLog.SendTime.Unix()
- pbChatLog.CreateTime = chatLog.CreateTime.Unix()
- if chatLog.SenderNickname == "" {
- sendUser, err := s.userInterface.Take(ctx, chatLog.SendID)
- if err != nil {
- return nil, err
- }
- pbChatLog.SenderNickname = sendUser.Nickname
- }
- switch chatLog.SessionType {
- case constant.SingleChatType:
- recvUser, err := s.userInterface.Take(ctx, chatLog.RecvID)
- if err != nil {
- return nil, err
- }
- pbChatLog.SenderNickname = recvUser.Nickname
-
- case constant.GroupChatType, constant.SuperGroupChatType:
- group, err := s.groupInterface.TakeGroup(ctx, chatLog.RecvID)
- if err != nil {
- return nil, err
- }
- pbChatLog.RecvID = group.GroupID
- pbChatLog.GroupName = group.GroupName
- }
- resp.ChatLogs = append(resp.ChatLogs, pbChatLog)
- }
- return resp, nil
-}
-
-func (s *adminCMSServer) GetActiveGroup(_ context.Context, req *pbAdminCMS.GetActiveGroupReq) (*pbAdminCMS.GetActiveGroupResp, error) {
- resp := &pbAdminCMS.GetActiveGroupResp{}
- fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
- if err != nil {
- return nil, err
- }
- activeGroups, err := s.adminCMSInterface.GetActiveGroups(fromTime, toTime, 12)
- if err != nil {
- return nil, err
- }
- for _, activeGroup := range activeGroups {
- resp.Groups = append(resp.Groups,
- &pbAdminCMS.GroupResp{
- GroupName: activeGroup.Name,
- GroupID: activeGroup.ID,
- MessageNum: int32(activeGroup.MessageNum),
- })
- }
- return resp, nil
-}
-
-func (s *adminCMSServer) GetActiveUser(ctx context.Context, req *pbAdminCMS.GetActiveUserReq) (*pbAdminCMS.GetActiveUserResp, error) {
- resp := &pbAdminCMS.GetActiveUserResp{}
- fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "ParseTimeFromTo failed", err.Error())
- return nil, err
- }
- activeUsers, err := s.adminCMSInterface.GetActiveUsers(fromTime, toTime, 12)
- if err != nil {
- return nil, err
- }
- for _, activeUser := range activeUsers {
- resp.Users = append(resp.Users,
- &pbAdminCMS.UserResp{
- UserID: activeUser.ID,
- NickName: activeUser.Name,
- MessageNum: int32(activeUser.MessageNum),
- },
- )
- }
- return resp, nil
-}
-
-func ParseTimeFromTo(from, to string) (time.Time, time.Time, error) {
- var fromTime time.Time
- var toTime time.Time
- fromTime, err := utils.TimeStringToTime(from)
- if err != nil {
- return fromTime, toTime, err
- }
- toTime, err = utils.TimeStringToTime(to)
- if err != nil {
- return fromTime, toTime, err
- }
- return fromTime, toTime, nil
-}
-
-func isInOneMonth(from, to time.Time) bool {
- return from.Month() == to.Month() && from.Year() == to.Year()
-}
-
-func GetRangeDate(from, to time.Time) [][2]time.Time {
- interval := to.Sub(from)
- var times [][2]time.Time
- switch {
- // today
- case interval == 0:
- times = append(times, [2]time.Time{
- from, from.Add(time.Hour * 24),
- })
- // days
- case isInOneMonth(from, to):
- for i := 0; ; i++ {
- fromTime := from.Add(time.Hour * 24 * time.Duration(i))
- toTime := from.Add(time.Hour * 24 * time.Duration(i+1))
- if toTime.After(to.Add(time.Hour * 24)) {
- break
- }
- times = append(times, [2]time.Time{
- fromTime, toTime,
- })
- }
- // month
- case !isInOneMonth(from, to):
- if to.Sub(from) < time.Hour*24*30 {
- for i := 0; ; i++ {
- fromTime := from.Add(time.Hour * 24 * time.Duration(i))
- toTime := from.Add(time.Hour * 24 * time.Duration(i+1))
- if toTime.After(to.Add(time.Hour * 24)) {
- break
- }
- times = append(times, [2]time.Time{
- fromTime, toTime,
- })
- }
- } else {
- for i := 0; ; i++ {
- if i == 0 {
- fromTime := from
- toTime := getFirstDateOfNextNMonth(fromTime, 1)
- times = append(times, [2]time.Time{
- fromTime, toTime,
- })
- } else {
- fromTime := getFirstDateOfNextNMonth(from, i)
- toTime := getFirstDateOfNextNMonth(fromTime, 1)
- if toTime.After(to) {
- toTime = to
- times = append(times, [2]time.Time{
- fromTime, toTime,
- })
- break
- }
- times = append(times, [2]time.Time{
- fromTime, toTime,
- })
- }
-
- }
- }
- }
- return times
-}
-
-func getFirstDateOfNextNMonth(currentTime time.Time, n int) time.Time {
- lastOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, currentTime.Location()).AddDate(0, n, 0)
- return lastOfMonth
-}
-
-func (s *adminCMSServer) GetGroupStatistics(ctx context.Context, req *pbAdminCMS.GetGroupStatisticsReq) (*pbAdminCMS.GetGroupStatisticsResp, error) {
- resp := &pbAdminCMS.GetGroupStatisticsResp{}
- fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
- if err != nil {
- return nil, err
- }
- increaseGroupNum, err := s.adminCMSInterface.GetIncreaseGroupNum(fromTime, toTime.Add(time.Hour*24))
- if err != nil {
- return nil, err
- }
- totalGroupNum, err := s.adminCMSInterface.GetTotalGroupNum()
- if err != nil {
- return nil, err
- }
- resp.IncreaseGroupNum = int32(increaseGroupNum)
- resp.TotalGroupNum = int32(totalGroupNum)
- times := GetRangeDate(fromTime, toTime)
- wg := &sync.WaitGroup{}
- resp.IncreaseGroupNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- resp.TotalGroupNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- wg.Add(len(times))
- for i, v := range times {
- go func(wg *sync.WaitGroup, index int, v [2]time.Time) {
- defer wg.Done()
- num, err := s.adminCMSInterface.GetIncreaseGroupNum(v[0], v[1])
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
- }
- resp.IncreaseGroupNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- num, err = s.adminCMSInterface.GetGroupNum(v[1])
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
- }
- resp.TotalGroupNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- }(wg, i, v)
- }
- wg.Wait()
- return resp, nil
-}
-
-func (s *adminCMSServer) GetMessageStatistics(ctx context.Context, req *pbAdminCMS.GetMessageStatisticsReq) (*pbAdminCMS.GetMessageStatisticsResp, error) {
- resp := &pbAdminCMS.GetMessageStatisticsResp{}
- fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
- log.NewDebug(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "times: ", fromTime, toTime)
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "ParseTimeFromTo failed", err.Error())
- return nil, err
- }
- privateMessageNum, err := s.adminCMSInterface.GetSingleChatMessageNum(fromTime, toTime.Add(time.Hour*24))
- if err != nil {
- return nil, err
- }
- groupMessageNum, err := s.adminCMSInterface.GetGroupMessageNum(fromTime, toTime.Add(time.Hour*24))
- if err != nil {
- return nil, err
- }
- log.NewDebug(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), privateMessageNum, groupMessageNum)
- resp.PrivateMessageNum = int32(privateMessageNum)
- resp.GroupMessageNum = int32(groupMessageNum)
- times := GetRangeDate(fromTime, toTime)
- resp.GroupMessageNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- resp.PrivateMessageNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- wg := &sync.WaitGroup{}
- wg.Add(len(times))
- for i, v := range times {
- go func(wg *sync.WaitGroup, index int, v [2]time.Time) {
- defer wg.Done()
- num, err := s.adminCMSInterface.GetSingleChatMessageNum(v[0], v[1])
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
- }
- resp.PrivateMessageNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- num, err = s.adminCMSInterface.GetGroupMessageNum(v[0], v[1])
- if err != nil {
- log.NewError(tracelog.GetOperationID(ctx), utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
- }
- resp.GroupMessageNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- }(wg, i, v)
- }
- wg.Wait()
- return resp, nil
-}
-
-func (s *adminCMSServer) GetUserStatistics(_ context.Context, req *pbAdminCMS.GetUserStatisticsReq) (*pbAdminCMS.GetUserStatisticsResp, error) {
- resp := &pbAdminCMS.GetUserStatisticsResp{}
- fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "ParseTimeFromTo failed", err.Error())
- return nil, err
- }
- activeUserNum, err := s.adminCMSInterface.GetActiveUserNum(fromTime, toTime.Add(time.Hour*24))
- if err != nil {
- return nil, err
- }
- increaseUserNum, err := s.adminCMSInterface.GetIncreaseUserNum(fromTime, toTime.Add(time.Hour*24))
- if err != nil {
- return nil, err
- }
- totalUserNum, err := s.adminCMSInterface.GetTotalUserNum()
- if err != nil {
- return nil, err
- }
- resp.ActiveUserNum = int32(activeUserNum)
- resp.TotalUserNum = int32(totalUserNum)
- resp.IncreaseUserNum = int32(increaseUserNum)
- times := GetRangeDate(fromTime, toTime)
- resp.TotalUserNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- resp.ActiveUserNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- resp.IncreaseUserNumList = make([]*pbAdminCMS.DateNumList, len(times), len(times))
- wg := &sync.WaitGroup{}
- wg.Add(len(times))
- for i, v := range times {
- go func(wg *sync.WaitGroup, index int, v [2]time.Time) {
- defer wg.Done()
- num, err := s.adminCMSInterface.GetActiveUserNum(v[0], v[1])
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
- }
- resp.ActiveUserNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
-
- num, err = s.adminCMSInterface.GetTotalUserNumByDate(v[1])
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetTotalUserNumByDate", v, err.Error())
- }
- resp.TotalUserNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- num, err = s.adminCMSInterface.GetIncreaseUserNum(v[0], v[1])
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetIncreaseUserNum", v, err.Error())
- }
- resp.IncreaseUserNumList[index] = &pbAdminCMS.DateNumList{
- Date: v[0].String(),
- Num: int32(num),
- }
- }(wg, i, v)
- }
- wg.Wait()
- return resp, nil
-}
-
-func (s *adminCMSServer) GetUserFriends(ctx context.Context, req *pbAdminCMS.GetUserFriendsReq) (*pbAdminCMS.GetUserFriendsResp, error) {
- resp := &pbAdminCMS.GetUserFriendsResp{}
- var friendList []*relation.FriendUser
- var err error
- if req.FriendUserID != "" {
- friend, err := s.adminCMSInterface.GetFriendByIDCMS(req.UserID, req.FriendUserID)
- if err != nil {
- if errors.Is(err, gorm.ErrRecordNotFound) {
- return resp, nil
- }
- return nil, err
- }
- friendList = append(friendList, friend)
- resp.FriendNums = 1
- } else {
- var count int64
- friendList, count, err = s.adminCMSInterface.GetUserFriendsCMS(req.UserID, req.FriendUserName, req.Pagination.PageNumber, req.Pagination.ShowNumber)
- if err != nil {
- return nil, err
- }
- resp.FriendNums = int32(count)
- }
- for _, v := range friendList {
- friendInfo := &common.FriendInfo{}
- userInfo := &common.UserInfo{UserID: v.FriendUserID, Nickname: v.Nickname}
- utils.CopyStructFields(friendInfo, v)
- friendInfo.FriendUser = userInfo
- resp.FriendInfoList = append(resp.FriendInfoList, friendInfo)
- }
- return resp, nil
-}
-
-func (s *adminCMSServer) GetUserIDByEmailAndPhoneNumber(ctx context.Context, req *pbAdminCMS.GetUserIDByEmailAndPhoneNumberReq) (*pbAdminCMS.GetUserIDByEmailAndPhoneNumberResp, error) {
- resp := &pbAdminCMS.GetUserIDByEmailAndPhoneNumberResp{}
- userIDList, err := s.userInterface.GetUserIDsByEmailAndID(req.PhoneNumber, req.Email)
- if err != nil {
- return resp, nil
- }
- resp.UserIDList = userIDList
- return resp, nil
-}
diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go
index 51cb3b736..4cfb99cbe 100644
--- a/internal/rpc/conversation/conversaion.go
+++ b/internal/rpc/conversation/conversaion.go
@@ -2,15 +2,18 @@ package conversation
import (
"Open_IM/internal/common/check"
- chat "Open_IM/internal/common/notification"
+ chat "Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
"Open_IM/pkg/common/db/controller"
"Open_IM/pkg/common/db/relation"
- "Open_IM/pkg/common/db/table"
+ tableRelation "Open_IM/pkg/common/db/table/relation"
+ "Open_IM/pkg/common/db/unrelation"
"Open_IM/pkg/common/log"
promePkg "Open_IM/pkg/common/prometheus"
+ "Open_IM/pkg/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation"
+ pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
"context"
"github.com/dtm-labs/rockscache"
@@ -47,7 +50,7 @@ func NewConversationServer(port int) *conversationServer {
var cCache cache.ConversationCache
//mysql init
var mysql relation.Mysql
- err := mysql.InitConn().AutoMigrateModel(&table.ConversationModel{})
+ err := mysql.InitConn().AutoMigrateModel(&tableRelation.ConversationModel{})
if err != nil {
panic("db init err:" + err.Error())
}
@@ -170,7 +173,7 @@ func (c *conversationServer) GetConversations(ctx context.Context, req *pbConver
func (c *conversationServer) BatchSetConversations(ctx context.Context, req *pbConversation.BatchSetConversationsReq) (*pbConversation.BatchSetConversationsResp, error) {
resp := &pbConversation.BatchSetConversationsResp{}
- var conversations []*table.ConversationModel
+ var conversations []*tableRelation.ConversationModel
if err := utils.CopyStructFields(&conversations, req.Conversations); err != nil {
return nil, err
}
@@ -203,16 +206,16 @@ func (c *conversationServer) ModifyConversationField(ctx context.Context, req *p
return nil, err
}
}
- var conversation table.ConversationModel
+ var conversation tableRelation.ConversationModel
if err := utils.CopyStructFields(&conversation, req.Conversation); err != nil {
return nil, err
}
if req.FieldType == constant.FieldIsPrivateChat {
- err := c.ConversationInterface.SyncPeerUserPrivateConversationTx(ctx, req.Conversation)
+ err := c.ConversationInterface.SyncPeerUserPrivateConversationTx(ctx, &conversation)
if err != nil {
return nil, err
}
- chat.ConversationSetPrivateNotification(req.OperationID, req.Conversation.OwnerUserID, req.Conversation.UserID, req.Conversation.IsPrivateChat)
+ chat.ConversationSetPrivateNotification(ctx, req.Conversation.OwnerUserID, req.Conversation.UserID, req.Conversation.IsPrivateChat)
return resp, nil
}
//haveUserID, err := c.ConversationInterface.GetUserIDExistConversation(ctx, req.UserIDList, req.Conversation.ConversationID)
@@ -239,29 +242,18 @@ func (c *conversationServer) ModifyConversationField(ctx context.Context, req *p
case constant.FieldBurnDuration:
filedMap["burn_duration"] = req.Conversation.BurnDuration
}
- c.ConversationInterface.SetUsersConversationFiledTx(ctx, req.UserIDList, &conversation, filedMap)
- err = c.ConversationInterface.UpdateUsersConversationFiled(ctx, haveUserID, req.Conversation.ConversationID, filedMap)
- if err != nil {
- return nil, err
- }
- var conversations []*pbConversation.Conversation
- for _, v := range utils.DifferenceString(haveUserID, req.UserIDList) {
- temp := new(pbConversation.Conversation)
- _ = utils.CopyStructFields(temp, req.Conversation)
- temp.OwnerUserID = v
- conversations = append(conversations, temp)
- }
- err = c.ConversationInterface.CreateConversation(ctx, conversations)
+ err = c.ConversationInterface.SetUsersConversationFiledTx(ctx, req.UserIDList, &conversation, filedMap)
if err != nil {
return nil, err
}
+
if isSyncConversation {
for _, v := range req.UserIDList {
- chat.ConversationChangeNotification(req.OperationID, v)
+ chat.ConversationChangeNotification(ctx, v)
}
} else {
for _, v := range req.UserIDList {
- chat.ConversationUnreadChangeNotification(req.OperationID, v, req.Conversation.ConversationID, req.Conversation.UpdateUnreadCountTime)
+ chat.ConversationUnreadChangeNotification(ctx, v, req.Conversation.ConversationID, req.Conversation.UpdateUnreadCountTime)
}
}
return resp, nil
diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go
index e47c00bd6..0c174b8bf 100644
--- a/internal/rpc/group/callback.go
+++ b/internal/rpc/group/callback.go
@@ -1,92 +1,105 @@
package group
import (
- cbApi "Open_IM/pkg/callbackstruct"
+ "Open_IM/pkg/apistruct"
+ "Open_IM/pkg/callbackstruct"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/http"
- "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tracelog"
- pbGroup "Open_IM/pkg/proto/group"
+ "Open_IM/pkg/proto/group"
"Open_IM/pkg/utils"
"context"
"google.golang.org/protobuf/types/known/wrapperspb"
)
-func callbackBeforeCreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (err error) {
- defer func() {
- tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "req", req)
- }()
+func CallbackBeforeCreateGroup(ctx context.Context, req *group.CreateGroupReq) (err error) {
if !config.Config.Callback.CallbackBeforeCreateGroup.Enable {
return nil
}
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), req.String())
- commonCallbackReq := &cbApi.CallbackBeforeCreateGroupReq{
+ defer func() {
+ tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "req", req)
+ }()
+ operationID := tracelog.GetOperationID(ctx)
+ commonCallbackReq := &callbackstruct.CallbackBeforeCreateGroupReq{
CallbackCommand: constant.CallbackBeforeCreateGroupCommand,
- OperationID: req.OperationID,
+ OperationID: operationID,
GroupInfo: *req.GroupInfo,
- InitMemberList: req.InitMemberList,
}
- callbackResp := cbApi.CommonCallbackResp{OperationID: req.OperationID}
- resp := &cbApi.CallbackBeforeCreateGroupResp{
- CommonCallbackResp: &callbackResp,
+ commonCallbackReq.InitMemberList = append(commonCallbackReq.InitMemberList, &apistruct.GroupAddMemberInfo{
+ UserID: req.OwnerUserID,
+ RoleLevel: constant.GroupOwner,
+ })
+ for _, userID := range req.AdminUserIDs {
+ commonCallbackReq.InitMemberList = append(commonCallbackReq.InitMemberList, &apistruct.GroupAddMemberInfo{
+ UserID: userID,
+ RoleLevel: constant.GroupAdmin,
+ })
}
- //utils.CopyStructFields(req, msg.MsgData)
- defer log.NewDebug(req.OperationID, utils.GetSelfFuncName(), commonCallbackReq, *resp)
- err = http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeCreateGroupCommand, commonCallbackReq,
- resp, config.Config.Callback.CallbackBeforeCreateGroup)
- if err == nil {
- if resp.GroupID != nil {
- req.GroupInfo.GroupID = *resp.GroupID
- }
- if resp.GroupName != nil {
- req.GroupInfo.GroupName = *resp.GroupName
- }
- if resp.Notification != nil {
- req.GroupInfo.Notification = *resp.Notification
- }
- if resp.Introduction != nil {
- req.GroupInfo.Introduction = *resp.Introduction
- }
- if resp.FaceURL != nil {
- req.GroupInfo.FaceURL = *resp.FaceURL
- }
- if resp.OwnerUserID != nil {
- req.GroupInfo.OwnerUserID = *resp.OwnerUserID
- }
- if resp.Ex != nil {
- req.GroupInfo.Ex = *resp.Ex
- }
- if resp.Status != nil {
- req.GroupInfo.Status = *resp.Status
- }
- if resp.CreatorUserID != nil {
- req.GroupInfo.CreatorUserID = *resp.CreatorUserID
- }
- if resp.GroupType != nil {
- req.GroupInfo.GroupType = *resp.GroupType
- }
- if resp.NeedVerification != nil {
- req.GroupInfo.NeedVerification = *resp.NeedVerification
- }
- if resp.LookMemberInfo != nil {
- req.GroupInfo.LookMemberInfo = *resp.LookMemberInfo
- }
+ for _, userID := range req.AdminUserIDs {
+ commonCallbackReq.InitMemberList = append(commonCallbackReq.InitMemberList, &apistruct.GroupAddMemberInfo{
+ UserID: userID,
+ RoleLevel: constant.GroupOrdinaryUsers,
+ })
}
- return err
+ resp := &callbackstruct.CallbackBeforeCreateGroupResp{
+ CommonCallbackResp: &callbackstruct.CommonCallbackResp{OperationID: operationID},
+ }
+ err = http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeCreateGroupCommand, commonCallbackReq, resp, config.Config.Callback.CallbackBeforeCreateGroup)
+ if err != nil {
+ return err
+ }
+
+ if resp.GroupID != nil {
+ req.GroupInfo.GroupID = *resp.GroupID
+ }
+ if resp.GroupName != nil {
+ req.GroupInfo.GroupName = *resp.GroupName
+ }
+ if resp.Notification != nil {
+ req.GroupInfo.Notification = *resp.Notification
+ }
+ if resp.Introduction != nil {
+ req.GroupInfo.Introduction = *resp.Introduction
+ }
+ if resp.FaceURL != nil {
+ req.GroupInfo.FaceURL = *resp.FaceURL
+ }
+ if resp.OwnerUserID != nil {
+ req.GroupInfo.OwnerUserID = *resp.OwnerUserID
+ }
+ if resp.Ex != nil {
+ req.GroupInfo.Ex = *resp.Ex
+ }
+ if resp.Status != nil {
+ req.GroupInfo.Status = *resp.Status
+ }
+ if resp.CreatorUserID != nil {
+ req.GroupInfo.CreatorUserID = *resp.CreatorUserID
+ }
+ if resp.GroupType != nil {
+ req.GroupInfo.GroupType = *resp.GroupType
+ }
+ if resp.NeedVerification != nil {
+ req.GroupInfo.NeedVerification = *resp.NeedVerification
+ }
+ if resp.LookMemberInfo != nil {
+ req.GroupInfo.LookMemberInfo = *resp.LookMemberInfo
+ }
+ return nil
}
-func CallbackBeforeMemberJoinGroup(ctx context.Context, operationID string, groupMember *relation.GroupMemberModel, groupEx string) (err error) {
- defer func() {
- tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "groupMember", *groupMember, "groupEx", groupEx)
- }()
- callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
+func CallbackBeforeMemberJoinGroup(ctx context.Context, groupMember *relation.GroupMemberModel, groupEx string) (err error) {
if !config.Config.Callback.CallbackBeforeMemberJoinGroup.Enable {
return nil
}
- log.NewDebug(operationID, "args: ", *groupMember)
- callbackReq := cbApi.CallbackBeforeMemberJoinGroupReq{
+ defer func() {
+ tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "groupMember", *groupMember, "groupEx", groupEx)
+ }()
+ operationID := tracelog.GetOperationID(ctx)
+ callbackResp := callbackstruct.CommonCallbackResp{OperationID: operationID}
+ callbackReq := callbackstruct.CallbackBeforeMemberJoinGroupReq{
CallbackCommand: constant.CallbackBeforeMemberJoinGroupCommand,
OperationID: operationID,
GroupID: groupMember.GroupID,
@@ -94,42 +107,44 @@ func CallbackBeforeMemberJoinGroup(ctx context.Context, operationID string, grou
Ex: groupMember.Ex,
GroupEx: groupEx,
}
- resp := &cbApi.CallbackBeforeMemberJoinGroupResp{
+ resp := &callbackstruct.CallbackBeforeMemberJoinGroupResp{
CommonCallbackResp: &callbackResp,
}
err = http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeMemberJoinGroupCommand, callbackReq,
resp, config.Config.Callback.CallbackBeforeMemberJoinGroup)
- if err == nil {
- if resp.MuteEndTime != nil {
- groupMember.MuteEndTime = utils.UnixSecondToTime(*resp.MuteEndTime)
- }
- if resp.FaceURL != nil {
- groupMember.FaceURL = *resp.FaceURL
- }
- if resp.Ex != nil {
- groupMember.Ex = *resp.Ex
- }
- if resp.NickName != nil {
- groupMember.Nickname = *resp.NickName
- }
- if resp.RoleLevel != nil {
- groupMember.RoleLevel = *resp.RoleLevel
- }
+ if err != nil {
+ return err
}
- return err
+ if resp.MuteEndTime != nil {
+ groupMember.MuteEndTime = utils.UnixSecondToTime(*resp.MuteEndTime)
+ }
+ if resp.FaceURL != nil {
+ groupMember.FaceURL = *resp.FaceURL
+ }
+ if resp.Ex != nil {
+ groupMember.Ex = *resp.Ex
+ }
+ if resp.NickName != nil {
+ groupMember.Nickname = *resp.NickName
+ }
+ if resp.RoleLevel != nil {
+ groupMember.RoleLevel = *resp.RoleLevel
+ }
+ return nil
}
-func CallbackBeforeSetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGroupMemberInfo) (err error) {
- defer func() {
- tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "req", *req)
- }()
- callbackResp := cbApi.CommonCallbackResp{OperationID: req.OperationID}
+func CallbackBeforeSetGroupMemberInfo(ctx context.Context, req *group.SetGroupMemberInfo) (err error) {
if !config.Config.Callback.CallbackBeforeSetGroupMemberInfo.Enable {
return nil
}
- callbackReq := cbApi.CallbackBeforeSetGroupMemberInfoReq{
+ defer func() {
+ tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "req", *req)
+ }()
+ operationID := tracelog.GetOperationID(ctx)
+ callbackResp := callbackstruct.CommonCallbackResp{OperationID: operationID}
+ callbackReq := callbackstruct.CallbackBeforeSetGroupMemberInfoReq{
CallbackCommand: constant.CallbackBeforeSetGroupMemberInfoCommand,
- OperationID: req.OperationID,
+ OperationID: operationID,
GroupID: req.GroupID,
UserID: req.UserID,
}
@@ -145,24 +160,24 @@ func CallbackBeforeSetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGroup
if req.Ex != nil {
callbackReq.Ex = req.Ex.Value
}
- resp := &cbApi.CallbackBeforeSetGroupMemberInfoResp{
+ resp := &callbackstruct.CallbackBeforeSetGroupMemberInfoResp{
CommonCallbackResp: &callbackResp,
}
- err = http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeSetGroupMemberInfoCommand, callbackReq,
- resp, config.Config.Callback.CallbackBeforeSetGroupMemberInfo.CallbackTimeOut, &config.Config.Callback.CallbackBeforeSetGroupMemberInfo.CallbackFailedContinue)
- if err == nil {
- if resp.FaceURL != nil {
- req.FaceURL = &wrapperspb.StringValue{Value: *resp.FaceURL}
- }
- if resp.Nickname != nil {
- req.Nickname = &wrapperspb.StringValue{Value: *resp.Nickname}
- }
- if resp.RoleLevel != nil {
- req.RoleLevel = &wrapperspb.Int32Value{Value: *resp.RoleLevel}
- }
- if resp.Ex != nil {
- req.Ex = &wrapperspb.StringValue{Value: *resp.Ex}
- }
+ err = http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeSetGroupMemberInfoCommand, callbackReq, resp, config.Config.Callback.CallbackBeforeSetGroupMemberInfo)
+ if err != nil {
+ return err
+ }
+ if resp.FaceURL != nil {
+ req.FaceURL = &wrapperspb.StringValue{Value: *resp.FaceURL}
+ }
+ if resp.Nickname != nil {
+ req.Nickname = &wrapperspb.StringValue{Value: *resp.Nickname}
+ }
+ if resp.RoleLevel != nil {
+ req.RoleLevel = &wrapperspb.Int32Value{Value: *resp.RoleLevel}
+ }
+ if resp.Ex != nil {
+ req.Ex = &wrapperspb.StringValue{Value: *resp.Ex}
}
return err
}
diff --git a/internal/rpc/group/copy.go b/internal/rpc/group/copy.go
index 259e2999f..1d1c7879d 100644
--- a/internal/rpc/group/copy.go
+++ b/internal/rpc/group/copy.go
@@ -3,12 +3,12 @@ package group
import (
"Open_IM/pkg/common/db/table/relation"
pbGroup "Open_IM/pkg/proto/group"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"time"
)
-func DbToPbGroupInfo(m *relation.GroupModel, ownerUserID string, memberCount uint32) *open_im_sdk.GroupInfo {
- return &open_im_sdk.GroupInfo{
+func DbToPbGroupInfo(m *relation.GroupModel, ownerUserID string, memberCount uint32) *sdkws.GroupInfo {
+ return &sdkws.GroupInfo{
GroupID: m.GroupID,
GroupName: m.GroupName,
Notification: m.Notification,
@@ -48,8 +48,8 @@ func DbToPbCMSGroup(m *relation.GroupModel, ownerUserID string, ownerUserName st
}
}
-func DbToPbGroupMembersCMSResp(m *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
- return &open_im_sdk.GroupMemberFullInfo{
+func DbToPbGroupMembersCMSResp(m *relation.GroupMemberModel) *sdkws.GroupMemberFullInfo {
+ return &sdkws.GroupMemberFullInfo{
GroupID: m.GroupID,
UserID: m.UserID,
RoleLevel: m.RoleLevel,
@@ -65,8 +65,8 @@ func DbToPbGroupMembersCMSResp(m *relation.GroupMemberModel) *open_im_sdk.GroupM
}
}
-func DbToPbGroupRequest(m *relation.GroupRequestModel, user *open_im_sdk.PublicUserInfo, group *open_im_sdk.GroupInfo) *open_im_sdk.GroupRequest {
- return &open_im_sdk.GroupRequest{
+func DbToPbGroupRequest(m *relation.GroupRequestModel, user *sdkws.PublicUserInfo, group *sdkws.GroupInfo) *sdkws.GroupRequest {
+ return &sdkws.GroupRequest{
UserInfo: user,
GroupInfo: group,
HandleResult: m.HandleResult,
@@ -89,7 +89,7 @@ func DbToPbGroupAbstractInfo(groupID string, groupMemberNumber uint32, groupMemb
}
}
-func PbToDBGroupInfo(m *open_im_sdk.GroupInfo) *relation.GroupModel {
+func PbToDBGroupInfo(m *sdkws.GroupInfo) *relation.GroupModel {
return &relation.GroupModel{
GroupID: m.GroupID,
GroupName: m.GroupName,
@@ -109,7 +109,7 @@ func PbToDBGroupInfo(m *open_im_sdk.GroupInfo) *relation.GroupModel {
}
}
-func PbToDbGroupMember(m *open_im_sdk.UserInfo) *relation.GroupMemberModel {
+func PbToDbGroupMember(m *sdkws.UserInfo) *relation.GroupMemberModel {
return &relation.GroupMemberModel{
UserID: m.UserID,
Nickname: m.Nickname,
diff --git a/internal/rpc/group/db_map.go b/internal/rpc/group/db_map.go
index 0bac9e89b..ad9ea4e75 100644
--- a/internal/rpc/group/db_map.go
+++ b/internal/rpc/group/db_map.go
@@ -2,11 +2,11 @@ package group
import (
pbGroup "Open_IM/pkg/proto/group"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
"time"
)
-func UpdateGroupInfoMap(group *open_im_sdk.GroupInfoForSet) map[string]any {
+func UpdateGroupInfoMap(group *sdkws.GroupInfoForSet) map[string]any {
m := make(map[string]any)
if group.GroupName != "" {
m["group_name"] = group.GroupName
diff --git a/internal/rpc/group/g.go b/internal/rpc/group/g.go
deleted file mode 100644
index 3bbbb4afa..000000000
--- a/internal/rpc/group/g.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package group
-
-import (
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/tracelog"
- pbConversation "Open_IM/pkg/proto/conversation"
- sdkws "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "errors"
- "math/big"
- "strconv"
- "strings"
- "time"
-)
-
-func GetPublicUserInfoOne(ctx context.Context, userID string) (*sdkws.PublicUserInfo, error) {
- return nil, errors.New("todo")
-}
-
-func GetUsersInfo(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error) {
- return nil, errors.New("todo")
-}
-
-func GetUserInfoMap(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error) {
- users, err := GetUsersInfo(ctx, userIDs)
- if err != nil {
- return nil, err
- }
- return utils.SliceToMap(users, func(e *sdkws.UserInfo) string {
- return e.UserID
- }), nil
-}
-
-func GetPublicUserInfo(ctx context.Context, userIDs []string) ([]*sdkws.PublicUserInfo, error) {
- return nil, errors.New("todo")
-}
-
-func GetPublicUserInfoMap(ctx context.Context, userIDs []string) (map[string]*sdkws.PublicUserInfo, error) {
- users, err := GetPublicUserInfo(ctx, userIDs)
- if err != nil {
- return nil, err
- }
- return utils.SliceToMap(users, func(e *sdkws.PublicUserInfo) string {
- return e.UserID
- }), nil
-}
-
-func GetUsername(ctx context.Context, userIDs []string) (map[string]string, error) {
- if len(userIDs) == 0 {
- return map[string]string{}, nil
- }
- users, err := GetPublicUserInfo(ctx, userIDs)
- if err != nil {
- return nil, err
- }
- if ids := utils.Single(userIDs, utils.Slice(users, func(e *sdkws.PublicUserInfo) string {
- return e.UserID
- })); len(ids) > 0 {
- return nil, constant.ErrUserIDNotFound.Wrap(strings.Join(ids, ","))
- }
- return utils.SliceToMapAny(users, func(e *sdkws.PublicUserInfo) (string, string) {
- return e.UserID, e.Nickname
- }), nil
-}
-
-func GroupNotification(ctx context.Context, groupID string) {
- var conversationReq pbConversation.ModifyConversationFieldReq
- conversation := pbConversation.Conversation{
- OwnerUserID: tracelog.GetOpUserID(ctx),
- ConversationID: utils.GetConversationIDBySessionType(groupID, constant.GroupChatType),
- ConversationType: constant.GroupChatType,
- GroupID: groupID,
- }
- conversationReq.Conversation = &conversation
- conversationReq.OperationID = tracelog.GetOperationID(ctx)
- conversationReq.FieldType = constant.FieldGroupAtType
- conversation.GroupAtType = constant.GroupNotification
- conversationReq.UserIDList = cacheResp.UserIDList
-
- _, err = pbConversation.NewConversationClient(s.etcdConn.GetConn("", config.Config.RpcRegisterName.OpenImConversationName)).ModifyConversationField(ctx, &conversationReq)
- tracelog.SetCtxInfo(ctx, "ModifyConversationField", err, "req", &conversationReq, "resp", conversationReply)
-}
-
-func genGroupID(ctx context.Context, groupID string) string {
- if groupID != "" {
- return groupID
- }
- groupID = utils.Md5(tracelog.GetOperationID(ctx) + strconv.FormatInt(time.Now().UnixNano(), 10))
- bi := big.NewInt(0)
- bi.SetString(groupID[0:8], 16)
- groupID = bi.String()
- return groupID
-}
diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go
index ce949c4d4..397c5fc63 100644
--- a/internal/rpc/group/group.go
+++ b/internal/rpc/group/group.go
@@ -1,8 +1,9 @@
package group
import (
+ "Open_IM/internal/common/check"
"Open_IM/internal/common/network"
- "Open_IM/internal/common/notification"
+ chat "Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
@@ -17,11 +18,14 @@ import (
"Open_IM/pkg/common/tracelog"
discoveryRegistry "Open_IM/pkg/discoveryregistry"
pbGroup "Open_IM/pkg/proto/group"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils"
"context"
"fmt"
grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
+ "gorm.io/gorm"
+ "math/big"
+ "math/rand"
"net"
"strconv"
"strings"
@@ -38,6 +42,7 @@ type groupServer struct {
zkAddr []string
GroupInterface controller.GroupInterface
registerCenter discoveryRegistry.SvcDiscoveryRegistry
+ user *check.UserCheck
}
func NewGroupServer(port int) *groupServer {
@@ -72,8 +77,8 @@ func NewGroupServer(port int) *groupServer {
}
//conns, err := g.registerCenter.GetConns(config.Config.RpcRegisterName.OpenImConversationName)
-
g.GroupInterface = controller.NewGroupInterface(mysql.GormConn(), redis.GetClient(), mongo.GetClient())
+ g.user = check.NewUserCheck()
return &g
}
@@ -132,8 +137,71 @@ func (s *groupServer) CheckGroupAdmin(ctx context.Context, groupID string) error
return nil
}
+func (s *groupServer) GetUsernameMap(ctx context.Context, userIDs []string, complete bool) (map[string]string, error) {
+ if len(userIDs) == 0 {
+ return map[string]string{}, nil
+ }
+ users, err := s.user.GetPublicUserInfos(ctx, userIDs, complete)
+ if err != nil {
+ return nil, err
+ }
+ return utils.SliceToMapAny(users, func(e *open_im_sdk.PublicUserInfo) (string, string) {
+ return e.UserID, e.Nickname
+ }), nil
+}
+
+func (s *groupServer) GroupNotification(ctx context.Context, groupID string) {
+ // todo 群公告修改通知
+ //var conversationReq pbConversation.ModifyConversationFieldReq
+ //conversation := pbConversation.Conversation{
+ // OwnerUserID: tracelog.GetOpUserID(ctx),
+ // ConversationID: utils.GetConversationIDBySessionType(groupID, constant.GroupChatType),
+ // ConversationType: constant.GroupChatType,
+ // GroupID: groupID,
+ //}
+ //conversationReq.Conversation = &conversation
+ //conversationReq.FieldType = constant.FieldGroupAtType
+ //conversation.GroupAtType = constant.GroupNotification
+ //conversationReq.UserIDList = userIDs
+ //_, err := pbConversation.NewConversationClient(s.etcdConn.GetConn("", config.Config.RpcRegisterName.OpenImConversationName)).ModifyConversationField(ctx, &conversationReq)
+ //tracelog.SetCtxInfo(ctx, "ModifyConversationField", err, "req", &conversationReq, "resp", conversationReply)
+}
+
+func (s *groupServer) IsNotFound(err error) bool {
+ return utils.Unwrap(err) == gorm.ErrRecordNotFound
+}
+
+func (s *groupServer) GenGroupID(ctx context.Context, groupID *string) error {
+ if *groupID != "" {
+ _, err := s.GroupInterface.TakeGroup(ctx, *groupID)
+ if err == nil {
+ return constant.ErrGroupIDExisted.Wrap("group id existed " + *groupID)
+ } else if s.IsNotFound(err) {
+ return nil
+ } else {
+ return err
+ }
+ }
+ for i := 0; i < 10; i++ {
+ id := utils.Md5(strings.Join([]string{tracelog.GetOperationID(ctx), strconv.FormatInt(time.Now().UnixNano(), 10), strconv.Itoa(rand.Int())}, ",;,"))
+ bi := big.NewInt(0)
+ bi.SetString(id[0:8], 16)
+ id = bi.String()
+ _, err := s.GroupInterface.TakeGroup(ctx, id)
+ if err == nil {
+ continue
+ } else if s.IsNotFound(err) {
+ *groupID = id
+ return nil
+ } else {
+ return err
+ }
+ }
+ return constant.ErrData.Wrap("group id gen error")
+}
+
func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) {
- resp := &pbGroup.CreateGroupResp{GroupInfo: &open_im_sdk.GroupInfo{}}
+ resp := &pbGroup.CreateGroupResp{GroupInfo: &sdkws.GroupInfo{}}
if err := tokenverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil {
return nil, err
}
@@ -144,19 +212,18 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if utils.Duplicate(userIDs) {
return nil, constant.ErrArgs.Wrap("group member repeated")
}
- userMap, err := GetUserInfoMap(ctx, userIDs)
+ userMap, err := s.user.GetUsersInfoMap(ctx, userIDs, true)
if err != nil {
return nil, err
}
- if ids := utils.Single(userIDs, utils.Keys(userMap)); len(ids) > 0 {
- return nil, constant.ErrUserIDNotFound.Wrap(strings.Join(ids, ","))
- }
- if err := callbackBeforeCreateGroup(ctx, req); err != nil {
+ if err := CallbackBeforeCreateGroup(ctx, req); err != nil {
return nil, err
}
var groupMembers []*relationTb.GroupMemberModel
group := PbToDBGroupInfo(req.GroupInfo)
- group.GroupID = genGroupID(ctx, req.GroupInfo.GroupID)
+ if err := s.GenGroupID(ctx, &group.GroupID); err != nil {
+ return nil, err
+ }
joinGroup := func(userID string, roleLevel int32) error {
groupMember := PbToDbGroupMember(userMap[userID])
groupMember.Nickname = ""
@@ -165,7 +232,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
groupMember.OperatorUserID = tracelog.GetOpUserID(ctx)
groupMember.JoinSource = constant.JoinByInvitation
groupMember.InviterUserID = tracelog.GetOpUserID(ctx)
- if err := CallbackBeforeMemberJoinGroup(ctx, tracelog.GetOperationID(ctx), groupMember, group.Ex); err != nil {
+ if err := CallbackBeforeMemberJoinGroup(ctx, groupMember, group.Ex); err != nil {
return err
}
groupMembers = append(groupMembers, groupMember)
@@ -198,11 +265,11 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if req.GroupInfo.GroupType == constant.SuperGroup {
go func() {
for _, userID := range userIDs {
- notification.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
+ chat.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
}
}()
} else {
- notification.GroupCreatedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), group.GroupID, userIDs)
+ chat.GroupCreatedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), group.GroupID, userIDs)
}
return resp, nil
}
@@ -240,7 +307,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo
})
resp.Groups = utils.Slice(utils.Order(groupIDs, groups, func(group *relationTb.GroupModel) string {
return group.GroupID
- }), func(group *relationTb.GroupModel) *open_im_sdk.GroupInfo {
+ }), func(group *relationTb.GroupModel) *sdkws.GroupInfo {
return DbToPbGroupInfo(group, ownerMap[group.GroupID].UserID, groupMemberNum[group.GroupID])
})
return resp, nil
@@ -271,13 +338,10 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
if ids := utils.Single(req.InvitedUserIDs, utils.Keys(memberMap)); len(ids) > 0 {
return nil, constant.ErrArgs.Wrap("user in group " + strings.Join(ids, ","))
}
- userMap, err := GetUserInfoMap(ctx, req.InvitedUserIDs)
+ userMap, err := s.user.GetUsersInfoMap(ctx, req.InvitedUserIDs, true)
if err != nil {
return nil, err
}
- if ids := utils.Single(req.InvitedUserIDs, utils.Keys(userMap)); len(ids) > 0 {
- return nil, constant.ErrArgs.Wrap("user not found " + strings.Join(ids, ","))
- }
if group.NeedVerification == constant.AllNeedVerification {
if !tokenverify.IsAppManagerUid(ctx) {
opUserID := tracelog.GetOpUserID(ctx)
@@ -299,7 +363,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
return nil, err
}
for _, request := range requests {
- notification.JoinGroupApplicationNotification(ctx, &pbGroup.JoinGroupReq{
+ chat.JoinGroupApplicationNotification(ctx, &pbGroup.JoinGroupReq{
GroupID: request.GroupID,
ReqMessage: request.ReqMsg,
JoinSource: request.JoinSource,
@@ -315,7 +379,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
return nil, err
}
for _, userID := range req.InvitedUserIDs {
- notification.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
+ chat.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
}
} else {
opUserID := tracelog.GetOpUserID(ctx)
@@ -328,7 +392,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
member.OperatorUserID = opUserID
member.InviterUserID = opUserID
member.JoinSource = constant.JoinByInvitation
- if err := CallbackBeforeMemberJoinGroup(ctx, tracelog.GetOperationID(ctx), member, group.Ex); err != nil {
+ if err := CallbackBeforeMemberJoinGroup(ctx, member, group.Ex); err != nil {
return nil, err
}
groupMembers = append(groupMembers, member)
@@ -336,7 +400,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
if err := s.GroupInterface.CreateGroup(ctx, nil, groupMembers); err != nil {
return nil, err
}
- notification.MemberInvitedNotification(tracelog.GetOperationID(ctx), req.GroupID, tracelog.GetOpUserID(ctx), req.Reason, req.InvitedUserIDs)
+ chat.MemberInvitedNotification(tracelog.GetOperationID(ctx), req.GroupID, tracelog.GetOpUserID(ctx), req.Reason, req.InvitedUserIDs)
}
return resp, nil
}
@@ -354,13 +418,13 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro
if err != nil {
return nil, err
}
- nameMap, err := GetUsername(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
+ nameMap, err := s.GetUsernameMap(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
return e.UserID, e.Nickname == ""
- }))
+ }), true)
if err != nil {
return nil, err
}
- resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
+ resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *sdkws.GroupMemberFullInfo {
if e.Nickname == "" {
e.Nickname = nameMap[e.UserID]
}
@@ -376,13 +440,13 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr
return nil, err
}
resp.Total = total
- nameMap, err := GetUsername(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
+ nameMap, err := s.GetUsernameMap(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
return e.UserID, e.Nickname == ""
- }))
+ }), true)
if err != nil {
return nil, err
}
- resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
+ resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *sdkws.GroupMemberFullInfo {
if e.Nickname == "" {
e.Nickname = nameMap[e.UserID]
}
@@ -413,7 +477,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
}
go func() {
for _, userID := range req.KickedUserIDs {
- notification.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
+ chat.SuperGroupNotification(tracelog.GetOperationID(ctx), userID, userID)
}
}()
} else {
@@ -453,7 +517,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
if err := s.GroupInterface.DeleteGroupMember(ctx, group.GroupID, req.KickedUserIDs); err != nil {
return nil, err
}
- notification.MemberKickedNotification(req, req.KickedUserIDs)
+ chat.MemberKickedNotification(req, req.KickedUserIDs)
}
return resp, nil
}
@@ -470,13 +534,13 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG
if err != nil {
return nil, err
}
- nameMap, err := GetUsername(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
+ nameMap, err := s.GetUsernameMap(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
return e.UserID, e.Nickname == ""
- }))
+ }), true)
if err != nil {
return nil, err
}
- resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
+ resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *sdkws.GroupMemberFullInfo {
if e.Nickname == "" {
e.Nickname = nameMap[e.UserID]
}
@@ -505,13 +569,10 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup.
}
userIDs = utils.Distinct(userIDs)
groupIDs = utils.Distinct(groupIDs)
- userMap, err := GetPublicUserInfoMap(ctx, userIDs)
+ userMap, err := s.user.GetPublicUserInfoMap(ctx, userIDs, true)
if err != nil {
return nil, err
}
- if ids := utils.Single(utils.Keys(userMap), userIDs); len(ids) > 0 {
- return nil, constant.ErrUserIDNotFound.Wrap(strings.Join(ids, ","))
- }
groups, err := s.GroupInterface.FindGroup(ctx, utils.Distinct(groupIDs))
if err != nil {
return nil, err
@@ -533,7 +594,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup.
ownerMap := utils.SliceToMap(owners, func(e *relationTb.GroupMemberModel) string {
return e.GroupID
})
- resp.GroupRequests = utils.Slice(groupRequests, func(e *relationTb.GroupRequestModel) *open_im_sdk.GroupRequest {
+ resp.GroupRequests = utils.Slice(groupRequests, func(e *relationTb.GroupRequestModel) *sdkws.GroupRequest {
return DbToPbGroupRequest(e, userMap[e.UserID], DbToPbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNumMap[e.GroupID])))
})
return resp, nil
@@ -559,7 +620,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI
ownerMap := utils.SliceToMap(owners, func(e *relationTb.GroupMemberModel) string {
return e.GroupID
})
- resp.GroupInfos = utils.Slice(groups, func(e *relationTb.GroupModel) *open_im_sdk.GroupInfo {
+ resp.GroupInfos = utils.Slice(groups, func(e *relationTb.GroupModel) *sdkws.GroupInfo {
return DbToPbGroupInfo(e, ownerMap[e.GroupID].UserID, uint32(groupMemberNumMap[e.GroupID]))
})
return resp, nil
@@ -590,19 +651,18 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup
if groupRequest.HandleResult != 0 {
return nil, constant.ErrArgs.Wrap("group request already processed")
}
- if _, err := s.GroupInterface.TakeGroupMember(ctx, req.GroupID, req.FromUserID); err != nil {
- if !IsNotFound(err) {
- return nil, err
- }
- } else {
- return nil, constant.ErrArgs.Wrap("already in group")
+ var join bool
+ if _, err = s.GroupInterface.TakeGroupMember(ctx, req.GroupID, req.FromUserID); err == nil {
+ join = true // 已经在群里了
+ } else if !s.IsNotFound(err) {
+ return nil, err
}
- user, err := GetPublicUserInfoOne(ctx, req.FromUserID)
+ user, err := s.user.GetPublicUserInfo(ctx, req.FromUserID)
if err != nil {
return nil, err
}
var member *relationTb.GroupMemberModel
- if req.HandleResult == constant.GroupResponseAgree {
+ if (!join) && req.HandleResult == constant.GroupResponseAgree {
member = &relationTb.GroupMemberModel{
GroupID: req.GroupID,
UserID: user.UserID,
@@ -615,25 +675,27 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup
OperatorUserID: tracelog.GetOpUserID(ctx),
Ex: groupRequest.Ex,
}
- if err = CallbackBeforeMemberJoinGroup(ctx, tracelog.GetOperationID(ctx), member, group.Ex); err != nil {
+ if err = CallbackBeforeMemberJoinGroup(ctx, member, group.Ex); err != nil {
return nil, err
}
}
if err := s.GroupInterface.HandlerGroupRequest(ctx, req.GroupID, req.FromUserID, req.HandledMsg, req.HandleResult, member); err != nil {
return nil, err
}
- if req.HandleResult == constant.GroupResponseAgree {
- notification.GroupApplicationAcceptedNotification(req)
- notification.MemberEnterNotification(req)
- } else if req.HandleResult == constant.GroupResponseRefuse {
- notification.GroupApplicationRejectedNotification(req)
+ if !join {
+ if req.HandleResult == constant.GroupResponseAgree {
+ chat.GroupApplicationAcceptedNotification(req)
+ chat.MemberEnterNotification(ctx, req)
+ } else if req.HandleResult == constant.GroupResponseRefuse {
+ chat.GroupApplicationRejectedNotification(req)
+ }
}
return resp, nil
}
func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) {
resp := &pbGroup.JoinGroupResp{}
- if _, err := GetPublicUserInfoOne(ctx, tracelog.GetOpUserID(ctx)); err != nil {
+ if _, err := s.user.GetPublicUserInfo(ctx, tracelog.GetOpUserID(ctx)); err != nil {
return nil, err
}
group, err := s.GroupInterface.TakeGroup(ctx, req.GroupID)
@@ -657,13 +719,13 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
groupMember.OperatorUserID = tracelog.GetOpUserID(ctx)
groupMember.JoinSource = constant.JoinByInvitation
groupMember.InviterUserID = tracelog.GetOpUserID(ctx)
- if err := CallbackBeforeMemberJoinGroup(ctx, tracelog.GetOperationID(ctx), groupMember, group.Ex); err != nil {
+ if err := CallbackBeforeMemberJoinGroup(ctx, groupMember, group.Ex); err != nil {
return nil, err
}
if err := s.GroupInterface.CreateGroup(ctx, nil, []*relationTb.GroupMemberModel{groupMember}); err != nil {
return nil, err
}
- notification.MemberEnterDirectlyNotification(req.GroupID, tracelog.GetOpUserID(ctx), tracelog.GetOperationID(ctx))
+ chat.MemberEnterDirectlyNotification(req.GroupID, tracelog.GetOpUserID(ctx), tracelog.GetOperationID(ctx))
return resp, nil
}
groupRequest := relationTb.GroupRequestModel{
@@ -676,7 +738,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
if err := s.GroupInterface.CreateGroupRequest(ctx, []*relationTb.GroupRequestModel{&groupRequest}); err != nil {
return nil, err
}
- notification.JoinGroupApplicationNotification(ctx, req)
+ chat.JoinGroupApplicationNotification(ctx, req)
return resp, nil
}
@@ -690,13 +752,13 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
if err := s.GroupInterface.DeleteSuperGroupMember(ctx, req.GroupID, []string{tracelog.GetOpUserID(ctx)}); err != nil {
return nil, err
}
- notification.SuperGroupNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), tracelog.GetOpUserID(ctx))
+ chat.SuperGroupNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), tracelog.GetOpUserID(ctx))
} else {
_, err := s.GroupInterface.TakeGroupMember(ctx, req.GroupID, tracelog.GetOpUserID(ctx))
if err != nil {
return nil, err
}
- notification.MemberQuitNotification(req)
+ chat.MemberQuitNotification(req)
}
return resp, nil
}
@@ -730,9 +792,9 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf
if err != nil {
return nil, err
}
- notification.GroupInfoSetNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupInfoForSet.GroupID, group.GroupName, group.Notification, group.Introduction, group.FaceURL, req.GroupInfoForSet.NeedVerification)
+ chat.GroupInfoSetNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupInfoForSet.GroupID, group.GroupName, group.Notification, group.Introduction, group.FaceURL, req.GroupInfoForSet.NeedVerification)
if req.GroupInfoForSet.Notification != "" {
- GroupNotification(ctx, group.GroupID)
+ s.GroupNotification(ctx, group.GroupID)
}
return resp, nil
}
@@ -780,7 +842,7 @@ func (s *groupServer) TransferGroupOwner(ctx context.Context, req *pbGroup.Trans
if err := s.GroupInterface.TransferGroupOwner(ctx, req.GroupID, req.OldOwnerUserID, req.NewOwnerUserID, newOwner.RoleLevel); err != nil {
return nil, err
}
- notification.GroupOwnerTransferredNotification(req)
+ chat.GroupOwnerTransferredNotification(req)
return resp, nil
}
@@ -830,13 +892,13 @@ func (s *groupServer) GetGroupMembersCMS(ctx context.Context, req *pbGroup.GetGr
return nil, err
}
resp.Total = total
- nameMap, err := GetUsername(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
+ nameMap, err := s.GetUsernameMap(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
return e.UserID, e.Nickname == ""
- }))
+ }), true)
if err != nil {
return nil, err
}
- resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
+ resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *sdkws.GroupMemberFullInfo {
if e.Nickname == "" {
e.Nickname = nameMap[e.UserID]
}
@@ -847,7 +909,7 @@ func (s *groupServer) GetGroupMembersCMS(ctx context.Context, req *pbGroup.GetGr
func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGroup.GetUserReqApplicationListReq) (*pbGroup.GetUserReqApplicationListResp, error) {
resp := &pbGroup.GetUserReqApplicationListResp{}
- user, err := GetPublicUserInfoOne(ctx, req.UserID)
+ user, err := s.user.GetPublicUserInfo(ctx, req.UserID)
if err != nil {
return nil, err
}
@@ -886,7 +948,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou
if err != nil {
return nil, err
}
- resp.GroupRequests = utils.Slice(requests, func(e *relationTb.GroupRequestModel) *open_im_sdk.GroupRequest {
+ resp.GroupRequests = utils.Slice(requests, func(e *relationTb.GroupRequestModel) *sdkws.GroupRequest {
return DbToPbGroupRequest(e, user, DbToPbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNum[e.GroupID])))
})
return resp, nil
@@ -912,7 +974,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
return nil, err
}
} else {
- notification.GroupDismissedNotification(req)
+ chat.GroupDismissedNotification(req)
}
return resp, nil
}
@@ -936,7 +998,7 @@ func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGrou
if err := s.GroupInterface.UpdateGroupMember(ctx, member.GroupID, member.UserID, data); err != nil {
return nil, err
}
- notification.GroupMemberMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID, req.UserID, req.MutedSeconds)
+ chat.GroupMemberMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID, req.UserID, req.MutedSeconds)
return resp, nil
}
@@ -959,7 +1021,7 @@ func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.Ca
if err := s.GroupInterface.UpdateGroupMember(ctx, member.GroupID, member.UserID, data); err != nil {
return nil, err
}
- notification.GroupMemberCancelMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID, req.UserID)
+ chat.GroupMemberCancelMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID, req.UserID)
return resp, nil
}
@@ -971,7 +1033,7 @@ func (s *groupServer) MuteGroup(ctx context.Context, req *pbGroup.MuteGroupReq)
if err := s.GroupInterface.UpdateGroup(ctx, req.GroupID, UpdateGroupStatusMap(constant.GroupStatusMuted)); err != nil {
return nil, err
}
- notification.GroupMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID)
+ chat.GroupMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID)
return resp, nil
}
@@ -983,7 +1045,7 @@ func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMu
if err := s.GroupInterface.UpdateGroup(ctx, req.GroupID, UpdateGroupStatusMap(constant.GroupOk)); err != nil {
return nil, err
}
- notification.GroupCancelMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID)
+ chat.GroupCancelMutedNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), req.GroupID)
return resp, nil
}
@@ -1060,7 +1122,7 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr
return nil, err
}
for _, member := range req.Members {
- notification.GroupMemberInfoSetNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), member.GroupID, member.UserID)
+ chat.GroupMemberInfoSetNotification(tracelog.GetOperationID(ctx), tracelog.GetOpUserID(ctx), member.GroupID, member.UserID)
}
return resp, nil
}
@@ -1105,13 +1167,13 @@ func (s *groupServer) GetUserInGroupMembers(ctx context.Context, req *pbGroup.Ge
if err != nil {
return nil, err
}
- nameMap, err := GetUsername(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
+ nameMap, err := s.GetUsernameMap(ctx, utils.Filter(members, func(e *relationTb.GroupMemberModel) (string, bool) {
return e.UserID, e.Nickname == ""
- }))
+ }), true)
if err != nil {
return nil, err
}
- resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
+ resp.Members = utils.Slice(members, func(e *relationTb.GroupMemberModel) *sdkws.GroupMemberFullInfo {
if e.Nickname == "" {
e.Nickname = nameMap[e.UserID]
}
diff --git a/internal/rpc/group/utils.go b/internal/rpc/group/utils.go
deleted file mode 100644
index 51a774c04..000000000
--- a/internal/rpc/group/utils.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package group
-
-import (
- "Open_IM/pkg/common/tracelog"
- "gorm.io/gorm"
-)
-
-func IsNotFound(err error) bool {
- if err == nil {
- return false
- }
- return tracelog.Unwrap(err) == gorm.ErrRecordNotFound
-}
diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go
index f7bf1552c..265c1e264 100644
--- a/internal/rpc/msg/pull_message.go
+++ b/internal/rpc/msg/pull_message.go
@@ -7,15 +7,15 @@ import (
commonDB "Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
promePkg "Open_IM/pkg/common/prometheus"
)
-func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *open_im_sdk.GetMaxAndMinSeqReq) (*open_im_sdk.GetMaxAndMinSeqResp, error) {
+func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *sdkws.GetMaxAndMinSeqReq) (*sdkws.GetMaxAndMinSeqResp, error) {
log.NewInfo(in.OperationID, "rpc getMaxAndMinSeq is arriving", in.String())
- resp := new(open_im_sdk.GetMaxAndMinSeqResp)
- m := make(map[string]*open_im_sdk.MaxAndMinSeq)
+ resp := new(sdkws.GetMaxAndMinSeqResp)
+ m := make(map[string]*sdkws.MaxAndMinSeq)
var maxSeq, minSeq uint64
var err1, err2 error
maxSeq, err1 = commonDB.DB.GetUserMaxSeq(in.UserID)
@@ -35,7 +35,7 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *open_im_sdk.GetMaxAnd
resp.MaxSeq = uint32(maxSeq)
resp.MinSeq = uint32(minSeq)
for _, groupID := range in.GroupIDList {
- x := new(open_im_sdk.MaxAndMinSeq)
+ x := new(sdkws.MaxAndMinSeq)
maxSeq, _ := commonDB.DB.GetGroupMaxSeq(groupID)
minSeq, _ := commonDB.DB.GetGroupUserMinSeq(groupID, in.UserID)
x.MaxSeq = uint32(maxSeq)
@@ -46,10 +46,10 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *open_im_sdk.GetMaxAnd
return resp, nil
}
-func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) {
+func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *sdkws.PullMessageBySeqListReq) (*sdkws.PullMessageBySeqListResp, error) {
log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String())
- resp := new(open_im_sdk.PullMessageBySeqListResp)
- m := make(map[string]*open_im_sdk.MsgDataList)
+ resp := new(sdkws.PullMessageBySeqListResp)
+ m := make(map[string]*sdkws.MsgDataList)
redisMsgList, failedSeqList, err := commonDB.DB.GetMessageListBySeq(in.UserID, in.SeqList, in.OperationID)
if err != nil {
if err != go_redis.Nil {
@@ -76,7 +76,7 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.Pull
}
for k, v := range in.GroupSeqList {
- x := new(open_im_sdk.MsgDataList)
+ x := new(sdkws.MsgDataList)
redisMsgList, failedSeqList, err := commonDB.DB.GetMessageListBySeq(k, v.SeqList, in.OperationID)
if err != nil {
if err != go_redis.Nil {
@@ -108,7 +108,7 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.Pull
return resp, nil
}
-type MsgFormats []*open_im_sdk.MsgData
+type MsgFormats []*sdkws.MsgData
// Implement the sort.Interface interface to get the number of elements method
func (s MsgFormats) Len() int {
diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go
index c2571ea6f..2060e8998 100644
--- a/internal/rpc/msg/send_msg.go
+++ b/internal/rpc/msg/send_msg.go
@@ -750,7 +750,7 @@ func modifyMessageByUserMessageReceiveOptoptimization(userID, sourceID string, s
type NotificationMsg struct {
SendID string
RecvID string
- Content []byte // open_im_sdk.TipsComm
+ Content []byte // sdkws.TipsComm
MsgFrom int32
ContentType int32
SessionType int32
@@ -975,14 +975,6 @@ func Notification(n *NotificationMsg) {
reliabilityLevel = config.Config.Notification.GroupMemberInfoSet.Conversation.ReliabilityLevel
unReadCount = config.Config.Notification.GroupMemberInfoSet.Conversation.UnreadCount
- case constant.WorkMomentNotification:
- pushSwitch = config.Config.Notification.WorkMomentsNotification.OfflinePush.PushSwitch
- title = config.Config.Notification.WorkMomentsNotification.OfflinePush.Title
- desc = config.Config.Notification.WorkMomentsNotification.OfflinePush.Desc
- ex = config.Config.Notification.WorkMomentsNotification.OfflinePush.Ext
- reliabilityLevel = config.Config.Notification.WorkMomentsNotification.Conversation.ReliabilityLevel
- unReadCount = config.Config.Notification.WorkMomentsNotification.Conversation.UnreadCount
-
case constant.ConversationPrivateChatNotification:
pushSwitch = config.Config.Notification.ConversationSetPrivate.OfflinePush.PushSwitch
title = config.Config.Notification.ConversationSetPrivate.OfflinePush.Title
diff --git a/internal/rpc/msg/tag_send_msg.go b/internal/rpc/msg/tag_send_msg.go
deleted file mode 100644
index d36473f96..000000000
--- a/internal/rpc/msg/tag_send_msg.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package msg
-
-import (
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
- "Open_IM/pkg/common/log"
- "Open_IM/pkg/getcdv3"
- pbChat "Open_IM/pkg/proto/msg"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "strings"
-)
-
-func TagSendMessage(operationID string, user *im_mysql_model.User, recvID, content string, senderPlatformID int32) {
- log.NewInfo(operationID, utils.GetSelfFuncName(), "args: ", user.UserID, recvID, content)
- var req pbChat.SendMsgReq
- var msgData pbCommon.MsgData
- msgData.SendID = user.UserID
- msgData.RecvID = recvID
- msgData.ContentType = constant.Custom
- msgData.SessionType = constant.SingleChatType
- msgData.MsgFrom = constant.UserMsgType
- msgData.Content = []byte(content)
- msgData.SenderFaceURL = user.FaceURL
- msgData.SenderNickname = user.Nickname
- msgData.Options = map[string]bool{}
- msgData.Options[constant.IsSenderConversationUpdate] = false
- msgData.Options[constant.IsSenderNotificationPush] = false
- msgData.CreateTime = utils.GetCurrentTimestampByMill()
- msgData.ClientMsgID = utils.GetMsgID(user.UserID)
- msgData.SenderPlatformID = senderPlatformID
- req.MsgData = &msgData
- req.OperationID = operationID
- etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- return
- }
-
- client := pbChat.NewMsgClient(etcdConn)
- respPb, err := client.SendMsg(context.Background(), &req)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "send msg failed", err.Error())
- return
- }
- if respPb.ErrCode != 0 {
- log.NewError(operationID, utils.GetSelfFuncName(), "send tag msg failed ", respPb)
- }
-}
diff --git a/internal/rpc/office/office.go b/internal/rpc/office/office.go
deleted file mode 100644
index b4421e573..000000000
--- a/internal/rpc/office/office.go
+++ /dev/null
@@ -1,734 +0,0 @@
-package office
-
-import (
- "Open_IM/internal/common/notification"
- "Open_IM/internal/rpc/msg"
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/db"
- "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
- imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
- rocksCache "Open_IM/pkg/common/db/rocks_cache"
- "Open_IM/pkg/common/log"
- promePkg "Open_IM/pkg/common/prometheus"
- pbCache "Open_IM/pkg/proto/cache"
- pbOffice "Open_IM/pkg/proto/office"
- pbCommon "Open_IM/pkg/proto/sdkws"
- "Open_IM/pkg/utils"
- "context"
- "github.com/OpenIMSDK/getcdv3"
- "net"
- "strconv"
- "strings"
- "sync"
- "time"
- "unsafe"
-
- grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
-
- "google.golang.org/grpc"
-)
-
-type officeServer struct {
- rpcPort int
- rpcRegisterName string
- etcdSchema string
- etcdAddr []string
- ch chan tagSendStruct
-}
-
-func NewOfficeServer(port int) *officeServer {
- log.NewPrivateLog(constant.LogFileName)
- ch := make(chan tagSendStruct, 100000)
- return &officeServer{
- rpcPort: port,
- rpcRegisterName: config.Config.RpcRegisterName.OpenImOfficeName,
- etcdSchema: config.Config.Etcd.EtcdSchema,
- etcdAddr: config.Config.Etcd.EtcdAddr,
- ch: ch,
- }
-}
-
-func (s *officeServer) Run() {
- log.NewInfo("0", "officeServer rpc start ")
- listenIP := ""
- if config.Config.ListenIP == "" {
- listenIP = "0.0.0.0"
- } else {
- listenIP = config.Config.ListenIP
- }
- address := listenIP + ":" + strconv.Itoa(s.rpcPort)
- //listener network
- listener, err := net.Listen("tcp", address)
- if err != nil {
- panic("listening err:" + err.Error() + s.rpcRegisterName)
- }
- log.NewInfo("0", "listen network success, ", address, listener)
- defer listener.Close()
- //grpc server
- recvSize := 1024 * 1024 * 30
- sendSize := 1024 * 1024 * 30
- var grpcOpts = []grpc.ServerOption{
- grpc.MaxRecvMsgSize(recvSize),
- grpc.MaxSendMsgSize(sendSize),
- }
- if config.Config.Prometheus.Enable {
- promePkg.NewGrpcRequestCounter()
- promePkg.NewGrpcRequestFailedCounter()
- promePkg.NewGrpcRequestSuccessCounter()
- grpcOpts = append(grpcOpts, []grpc.ServerOption{
- // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme),
- grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor),
- grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor),
- }...)
- }
- srv := grpc.NewServer(grpcOpts...)
- defer srv.GracefulStop()
- //Service registers with etcd
- pbOffice.RegisterOfficeServiceServer(srv, s)
- rpcRegisterIP := config.Config.RpcRegisterIP
- if config.Config.RpcRegisterIP == "" {
- rpcRegisterIP, err = utils.GetLocalIP()
- if err != nil {
- log.Error("", "GetLocalIP failed ", err.Error())
- }
- }
- log.NewInfo("", "rpcRegisterIP", rpcRegisterIP)
- err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10)
- if err != nil {
- log.NewError("0", "RegisterEtcd failed ", err.Error())
- panic(utils.Wrap(err, "register office module rpc to etcd err"))
- }
- go s.sendTagMsgRoutine()
- err = srv.Serve(listener)
- if err != nil {
- log.NewError("0", "Serve failed ", err.Error())
- return
- }
- log.NewInfo("0", "message cms rpc success")
-}
-
-type tagSendStruct struct {
- operationID string
- user *imdb.User
- userID string
- content string
- senderPlatformID int32
-}
-
-func (s *officeServer) sendTagMsgRoutine() {
- log.NewInfo("", utils.GetSelfFuncName(), "start")
- for {
- select {
- case v := <-s.ch:
- msg.TagSendMessage(v.operationID, v.user, v.userID, v.content, v.senderPlatformID)
- time.Sleep(time.Millisecond * 100)
- }
- }
-}
-
-func (s *officeServer) GetUserTags(_ context.Context, req *pbOffice.GetUserTagsReq) (resp *pbOffice.GetUserTagsResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req ", req.String())
- resp = &pbOffice.GetUserTagsResp{
- CommonResp: &pbOffice.CommonResp{},
- Tags: []*pbOffice.Tag{},
- }
- tags, err := db.DB.GetUserTags(req.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "tags: ", tags)
- for _, v := range tags {
- tag := &pbOffice.Tag{
- TagID: v.TagID,
- TagName: v.TagName,
- }
- for _, userID := range v.UserList {
- UserName, err := im_mysql_model.GetUserNameByUserID(userID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
- continue
- }
- tag.UserList = append(tag.UserList, &pbOffice.TagUser{
- UserID: userID,
- UserName: UserName,
- })
- }
- resp.Tags = append(resp.Tags, tag)
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) CreateTag(_ context.Context, req *pbOffice.CreateTagReq) (resp *pbOffice.CreateTagResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "CreateTag req", req.String())
- userIDList := utils.RemoveRepeatedStringInList(req.UserIDList)
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "userIDList: ", userIDList)
- resp = &pbOffice.CreateTagResp{CommonResp: &pbOffice.CommonResp{}}
- if err := db.DB.CreateTag(req.UserID, req.TagName, userIDList); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserTags failed", err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) DeleteTag(_ context.Context, req *pbOffice.DeleteTagReq) (resp *pbOffice.DeleteTagResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.DeleteTagResp{CommonResp: &pbOffice.CommonResp{}}
- if err := db.DB.DeleteTag(req.UserID, req.TagID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteTag failed", err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) SetTag(_ context.Context, req *pbOffice.SetTagReq) (resp *pbOffice.SetTagResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.SetTagResp{CommonResp: &pbOffice.CommonResp{}}
- increaseUserIDList := utils.RemoveRepeatedStringInList(req.IncreaseUserIDList)
- reduceUserIDList := utils.RemoveRepeatedStringInList(req.ReduceUserIDList)
- if err := db.DB.SetTag(req.UserID, req.TagID, req.NewName, increaseUserIDList, reduceUserIDList); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetTag failed", increaseUserIDList, reduceUserIDList, err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagReq) (resp *pbOffice.SendMsg2TagResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.SendMsg2TagResp{CommonResp: &pbOffice.CommonResp{}}
- var tagUserIDList []string
- for _, tagID := range req.TagList {
- userIDList, err := db.DB.GetUserIDListByTagID(req.SendID, tagID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserIDListByTagID failed", err.Error())
- continue
- }
- tagUserIDList = append(tagUserIDList, userIDList...)
- }
- var groupUserIDList []string
- for _, groupID := range req.GroupList {
- etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
- log.NewError(req.OperationID, errMsg)
- resp.CommonResp.ErrCode = constant.ErrInternal.ErrCode
- resp.CommonResp.ErrMsg = errMsg
- return resp, nil
- }
-
- cacheClient := pbCache.NewCacheClient(etcdConn)
- req := pbCache.GetGroupMemberIDListFromCacheReq{
- OperationID: req.OperationID,
- GroupID: groupID,
- }
- getGroupMemberIDListFromCacheResp, err := cacheClient.GetGroupMemberIDListFromCache(context.Background(), &req)
- if err != nil {
- log.NewError(req.OperationID, "GetGroupMemberIDListFromCache rpc call failed ", err.Error(), req.String())
- resp.CommonResp.ErrCode = constant.ErrServer.ErrCode
- resp.CommonResp.ErrMsg = err.Error()
- return resp, nil
- }
- if getGroupMemberIDListFromCacheResp.CommonResp.ErrCode != 0 {
- log.NewError(req.OperationID, "GetGroupMemberIDListFromCache rpc logic call failed ", getGroupMemberIDListFromCacheResp.CommonResp.ErrCode)
- resp.CommonResp.ErrCode = getGroupMemberIDListFromCacheResp.CommonResp.ErrCode
- resp.CommonResp.ErrMsg = getGroupMemberIDListFromCacheResp.CommonResp.ErrMsg
- return resp, nil
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), getGroupMemberIDListFromCacheResp.UserIDList)
- groupUserIDList = append(groupUserIDList, getGroupMemberIDListFromCacheResp.UserIDList...)
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), groupUserIDList, req.GroupList)
- var userIDList []string
- userIDList = append(userIDList, tagUserIDList...)
- userIDList = append(userIDList, groupUserIDList...)
- userIDList = append(userIDList, req.UserList...)
- userIDList = utils.RemoveRepeatedStringInList(userIDList)
- for i, userID := range userIDList {
- if userID == req.SendID || userID == "" {
- userIDList = append(userIDList[:i], userIDList[i+1:]...)
- }
- }
- if unsafe.Sizeof(userIDList) > 1024*1024 {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "size", unsafe.Sizeof(userIDList))
- resp.CommonResp.ErrMsg = constant.ErrSendLimit.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrSendLimit.ErrCode
- return
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "total userIDList result: ", userIDList)
- user, err := imdb.GetUserByUserID(req.SendID)
- if err != nil {
- log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.SendID)
- resp.CommonResp.ErrMsg = err.Error()
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- var successUserIDList []string
- for _, userID := range userIDList {
- t := tagSendStruct{
- operationID: req.OperationID,
- user: user,
- userID: userID,
- content: req.Content,
- senderPlatformID: req.SenderPlatformID,
- }
- select {
- case s.ch <- t:
- log.NewDebug(t.operationID, utils.GetSelfFuncName(), "msg: ", t, "send success")
- successUserIDList = append(successUserIDList, userID)
- // if channel is full, return grpc req
- case <-time.After(1 * time.Second):
- log.NewError(t.operationID, utils.GetSelfFuncName(), s.ch, "channel is full")
- resp.CommonResp.ErrCode = constant.ErrSendLimit.ErrCode
- resp.CommonResp.ErrMsg = constant.ErrSendLimit.ErrMsg
- return resp, nil
- }
- }
-
- var tagSendLogs mongoDB.TagSendLog
- var wg sync.WaitGroup
- wg.Add(len(successUserIDList))
- var lock sync.Mutex
- for _, userID := range successUserIDList {
- go func(userID string) {
- defer wg.Done()
- userName, err := im_mysql_model.GetUserNameByUserID(userID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error(), userID)
- return
- }
- lock.Lock()
- tagSendLogs.UserList = append(tagSendLogs.UserList, mongoDB.TagUser{
- UserID: userID,
- UserName: userName,
- })
- lock.Unlock()
- }(userID)
- }
- wg.Wait()
- tagSendLogs.SendID = req.SendID
- tagSendLogs.Content = req.Content
- tagSendLogs.SenderPlatformID = req.SenderPlatformID
- tagSendLogs.SendTime = time.Now().Unix()
- if err := db.DB.SaveTagSendLog(&tagSendLogs); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "SaveTagSendLog failed", tagSendLogs, err.Error())
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) GetTagSendLogs(_ context.Context, req *pbOffice.GetTagSendLogsReq) (resp *pbOffice.GetTagSendLogsResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.GetTagSendLogsResp{
- CommonResp: &pbOffice.CommonResp{},
- Pagination: &pbCommon.ResponsePagination{
- CurrentPage: req.Pagination.PageNumber,
- ShowNumber: req.Pagination.ShowNumber,
- },
- TagSendLogs: []*pbOffice.TagSendLog{},
- }
- tagSendLogs, err := db.DB.GetTagSendLogs(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetTagSendLogs", err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- if err := utils.CopyStructFields(&resp.TagSendLogs, tagSendLogs); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), err.Error())
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) GetUserTagByID(_ context.Context, req *pbOffice.GetUserTagByIDReq) (resp *pbOffice.GetUserTagByIDResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.GetUserTagByIDResp{
- CommonResp: &pbOffice.CommonResp{},
- Tag: &pbOffice.Tag{},
- }
- tag, err := db.DB.GetTagByID(req.UserID, req.TagID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetTagByID failed", err.Error())
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- return resp, nil
- }
- for _, userID := range tag.UserList {
- userName, err := im_mysql_model.GetUserNameByUserID(userID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
- continue
- }
- resp.Tag.UserList = append(resp.Tag.UserList, &pbOffice.TagUser{
- UserID: userID,
- UserName: userName,
- })
- }
- resp.Tag.TagID = tag.TagID
- resp.Tag.TagName = tag.TagName
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) CreateOneWorkMoment(_ context.Context, req *pbOffice.CreateOneWorkMomentReq) (resp *pbOffice.CreateOneWorkMomentResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.CreateOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
- workMoment := mongoDB.WorkMoment{
- Comments: []*mongoDB.Comment{},
- LikeUserList: []*mongoDB.WorkMomentUser{},
- PermissionUserList: []*mongoDB.WorkMomentUser{},
- }
- createUser, err := imdb.GetUserByUserID(req.WorkMoment.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserByUserID", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- if err := utils.CopyStructFields(&workMoment, req.WorkMoment); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- workMoment.UserName = createUser.Nickname
- workMoment.FaceURL = createUser.FaceURL
- workMoment.PermissionUserIDList = s.getPermissionUserIDList(req.OperationID, req.WorkMoment.PermissionGroupList, req.WorkMoment.PermissionUserList)
- workMoment.PermissionUserList = []*mongoDB.WorkMomentUser{}
- for _, userID := range workMoment.PermissionUserIDList {
- userName, err := imdb.GetUserNameByUserID(userID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
- continue
- }
- workMoment.PermissionUserList = append(workMoment.PermissionUserList, &mongoDB.WorkMomentUser{
- UserID: userID,
- UserName: userName,
- })
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment to create", workMoment)
- err = db.DB.CreateOneWorkMoment(&workMoment)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CreateOneWorkMoment", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
-
- // send notification to at users
- for _, atUser := range req.WorkMoment.AtUserList {
- workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
- NotificationMsgType: constant.WorkMomentAtUserNotification,
- WorkMomentID: workMoment.WorkMomentID,
- WorkMomentContent: workMoment.Content,
- UserID: workMoment.UserID,
- FaceURL: createUser.FaceURL,
- UserName: createUser.Nickname,
- CreateTime: workMoment.CreateTime,
- }
- notification.WorkMomentSendNotification(req.OperationID, atUser.UserID, workMomentNotificationMsg)
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) DeleteComment(_ context.Context, req *pbOffice.DeleteCommentReq) (resp *pbOffice.DeleteCommentResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.DeleteCommentResp{CommonResp: &pbOffice.CommonResp{}}
- err = db.DB.DeleteComment(req.WorkMomentID, req.ContentID, req.OpUserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetWorkMomentByID failed", err.Error())
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-// count and distinct permission users
-func (s *officeServer) getPermissionUserIDList(operationID string, groupList []*pbOffice.PermissionGroup, userList []*pbOffice.WorkMomentUser) []string {
- var permissionUserIDList []string
- for _, group := range groupList {
- groupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(group.GroupID)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID failed", group, err.Error())
- continue
- }
- log.NewDebug(operationID, utils.GetSelfFuncName(), "groupMemberIDList: ", groupMemberIDList)
- permissionUserIDList = append(permissionUserIDList, groupMemberIDList...)
- }
- var userIDList []string
- for _, user := range userList {
- userIDList = append(userIDList, user.UserID)
- }
- permissionUserIDList = append(permissionUserIDList, userIDList...)
- permissionUserIDList = utils.RemoveRepeatedStringInList(permissionUserIDList)
- return permissionUserIDList
-}
-
-func (s *officeServer) DeleteOneWorkMoment(_ context.Context, req *pbOffice.DeleteOneWorkMomentReq) (resp *pbOffice.DeleteOneWorkMomentResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.DeleteOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
- workMoment, err := db.DB.GetWorkMomentByID(req.WorkMomentID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetWorkMomentByID failed", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment", workMoment)
- if workMoment.UserID != req.UserID {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoment.UserID != req.WorkMomentID, delete failed", workMoment, req.WorkMomentID)
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}
- return resp, nil
- }
- err = db.DB.DeleteOneWorkMoment(req.WorkMomentID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteOneWorkMoment", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func isUserCanSeeWorkMoment(userID string, workMoment mongoDB.WorkMoment) bool {
- if userID != workMoment.UserID {
- switch workMoment.Permission {
- case constant.WorkMomentPublic:
- return true
- case constant.WorkMomentPrivate:
- return false
- case constant.WorkMomentPermissionCanSee:
- return utils.IsContain(userID, workMoment.PermissionUserIDList)
- case constant.WorkMomentPermissionCantSee:
- return !utils.IsContain(userID, workMoment.PermissionUserIDList)
- }
- return false
- }
- return true
-}
-
-func (s *officeServer) LikeOneWorkMoment(_ context.Context, req *pbOffice.LikeOneWorkMomentReq) (resp *pbOffice.LikeOneWorkMomentResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.LikeOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
- user, err := imdb.GetUserByUserID(req.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- workMoment, like, err := db.DB.LikeOneWorkMoment(req.UserID, user.Nickname, req.WorkMomentID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment failed ", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
- NotificationMsgType: constant.WorkMomentLikeNotification,
- WorkMomentID: workMoment.WorkMomentID,
- WorkMomentContent: workMoment.Content,
- UserID: user.UserID,
- FaceURL: user.FaceURL,
- UserName: user.Nickname,
- CreateTime: int32(time.Now().Unix()),
- }
- // send notification
- if like && workMoment.UserID != req.UserID {
- notification.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.CommentOneWorkMomentReq) (resp *pbOffice.CommentOneWorkMomentResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.CommentOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
- commentUser, err := imdb.GetUserByUserID(req.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID commentUserName failed", req.UserID, err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- var replyUserName string
- if req.ReplyUserID != "" {
- replyUserName, err = imdb.GetUserNameByUserID(req.ReplyUserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID get replyUserName failed", req.ReplyUserID, err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- }
- comment := &mongoDB.Comment{
- UserID: req.UserID,
- UserName: commentUser.Nickname,
- ReplyUserID: req.ReplyUserID,
- ReplyUserName: replyUserName,
- Content: req.Content,
- CreateTime: int32(time.Now().Unix()),
- }
- workMoment, err := db.DB.CommentOneWorkMoment(comment, req.WorkMomentID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CommentOneWorkMoment failed", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{
- NotificationMsgType: constant.WorkMomentCommentNotification,
- WorkMomentID: workMoment.WorkMomentID,
- WorkMomentContent: workMoment.Content,
- UserID: commentUser.UserID,
- FaceURL: commentUser.FaceURL,
- UserName: commentUser.Nickname,
- ReplyUserID: comment.ReplyUserID,
- ReplyUserName: comment.ReplyUserName,
- ContentID: comment.ContentID,
- Content: comment.Content,
- CreateTime: comment.CreateTime,
- }
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "msg: ", *workMomentNotificationMsg)
- if req.UserID != workMoment.UserID {
- notification.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
- }
- if req.ReplyUserID != "" && req.ReplyUserID != workMoment.UserID && req.ReplyUserID != req.UserID {
- notification.WorkMomentSendNotification(req.OperationID, req.ReplyUserID, workMomentNotificationMsg)
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) GetWorkMomentByID(_ context.Context, req *pbOffice.GetWorkMomentByIDReq) (resp *pbOffice.GetWorkMomentByIDResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.GetWorkMomentByIDResp{
- WorkMoment: &pbOffice.WorkMoment{},
- CommonResp: &pbOffice.CommonResp{},
- }
- workMoment, err := db.DB.GetWorkMomentByID(req.WorkMomentID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetWorkMomentByID failed", err.Error())
- return resp, nil
- }
- canSee := isUserCanSeeWorkMoment(req.OpUserID, *workMoment)
- log.Debug(req.OperationID, utils.GetSelfFuncName(), canSee, req.OpUserID, *workMoment)
- if !canSee {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoments not access to user", canSee, workMoment, req.OpUserID)
- }
-
- if err := utils.CopyStructFields(resp.WorkMoment, workMoment); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
- }
- user, err := imdb.GetUserByUserID(workMoment.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserByUserID failed", err.Error())
- }
- if user != nil {
- resp.WorkMoment.FaceURL = user.FaceURL
- resp.WorkMoment.UserName = user.Nickname
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) GetUserWorkMoments(_ context.Context, req *pbOffice.GetUserWorkMomentsReq) (resp *pbOffice.GetUserWorkMomentsResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.GetUserWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
- resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
- var workMoments []mongoDB.WorkMoment
- if req.UserID == req.OpUserID {
- workMoments, err = db.DB.GetUserSelfWorkMoments(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
- } else {
- friendIDList, err := rocksCache.GetFriendIDListFromCache(req.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}
- return resp, nil
- }
- workMoments, err = db.DB.GetUserWorkMoments(req.OpUserID, req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber, friendIDList)
- }
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments failed", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- for _, v := range resp.WorkMoments {
- user, err := imdb.GetUserByUserID(v.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
- }
- if user != nil {
- v.UserName = user.Nickname
- v.FaceURL = user.FaceURL
- }
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice.GetUserFriendWorkMomentsReq) (resp *pbOffice.GetUserFriendWorkMomentsResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.GetUserFriendWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
- resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
- var friendIDList []string
- if config.Config.WorkMoment.OnlyFriendCanSee {
- friendIDList, err = rocksCache.GetFriendIDListFromCache(req.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}
- return resp, nil
- }
- }
- workMoments, err := db.DB.GetUserFriendWorkMoments(req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID, friendIDList)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
- log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
- }
- for _, v := range resp.WorkMoments {
- user, err := rocksCache.GetUserInfoFromCache(v.UserID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
- }
- if user != nil {
- v.UserName = user.Nickname
- v.FaceURL = user.FaceURL
- }
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) SetUserWorkMomentsLevel(_ context.Context, req *pbOffice.SetUserWorkMomentsLevelReq) (resp *pbOffice.SetUserWorkMomentsLevelResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.SetUserWorkMomentsLevelResp{CommonResp: &pbOffice.CommonResp{}}
- if err := db.DB.SetUserWorkMomentsLevel(req.UserID, req.Level); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetUserWorkMomentsLevel failed", err.Error())
- resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
- return resp, nil
- }
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
-
-func (s *officeServer) ChangeWorkMomentPermission(_ context.Context, req *pbOffice.ChangeWorkMomentPermissionReq) (resp *pbOffice.ChangeWorkMomentPermissionResp, err error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp = &pbOffice.ChangeWorkMomentPermissionResp{CommonResp: &pbOffice.CommonResp{}}
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
- return resp, nil
-}
diff --git a/pkg/apistruct/friend.go b/pkg/apistruct/friend.go
index 746753c4a..70f552b9b 100644
--- a/pkg/apistruct/friend.go
+++ b/pkg/apistruct/friend.go
@@ -57,7 +57,7 @@ package apistruct
//}
//type GetBlackListResp struct {
// CommResp
-// BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
+// BlackUserInfoList []*sdkws.PublicUserInfo `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
@@ -99,7 +99,7 @@ package apistruct
//}
//type GetFriendsInfoResp struct {
// CommResp
-// FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
+// FriendInfoList []*sdkws.FriendInfo `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
@@ -109,7 +109,7 @@ package apistruct
//}
//type GetFriendListResp struct {
// CommResp
-// FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
+// FriendInfoList []*sdkws.FriendInfo `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
@@ -119,7 +119,7 @@ package apistruct
//}
//type GetFriendApplyListResp struct {
// CommResp
-// FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
+// FriendRequestList []*sdkws.FriendRequest `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
@@ -129,7 +129,7 @@ package apistruct
//}
//type GetSelfApplyListResp struct {
// CommResp
-// FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
+// FriendRequestList []*sdkws.FriendRequest `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
diff --git a/pkg/apistruct/group.go b/pkg/apistruct/group.go
index cd51ea2ee..4fd422900 100644
--- a/pkg/apistruct/group.go
+++ b/pkg/apistruct/group.go
@@ -1,7 +1,7 @@
package apistruct
import (
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
)
type CommResp struct {
@@ -32,8 +32,8 @@ type GetGroupMembersInfoReq struct {
}
type GetGroupMembersInfoResp struct {
CommResp
- MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+ MemberList []*sdkws.GroupMemberFullInfo `json:"-"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type InviteUserToGroupReq struct {
@@ -53,7 +53,7 @@ type GetJoinedGroupListReq struct {
}
type GetJoinedGroupListResp struct {
CommResp
- GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
+ GroupInfoList []*sdkws.GroupInfo `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
@@ -65,9 +65,9 @@ type GetGroupMemberListReq struct {
}
type GetGroupMemberListResp struct {
CommResp
- NextSeq int32 `json:"nextSeq"`
- MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+ NextSeq int32 `json:"nextSeq"`
+ MemberList []*sdkws.GroupMemberFullInfo `json:"-"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetGroupAllMemberReq struct {
@@ -78,8 +78,8 @@ type GetGroupAllMemberReq struct {
}
type GetGroupAllMemberResp struct {
CommResp
- MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+ MemberList []*sdkws.GroupMemberFullInfo `json:"-"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
//
@@ -91,7 +91,7 @@ type GetGroupAllMemberResp struct {
//}
//type GetGroupAllMemberListBySplitResp struct {
// CommResp
-// MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
+// MemberList []*sdkws.GroupMemberFullInfo `json:"-"`
// Map []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
@@ -109,7 +109,7 @@ type CreateGroupReq struct {
}
type CreateGroupResp struct {
CommResp
- GroupInfo open_im_sdk.GroupInfo `json:"-"`
+ GroupInfo sdkws.GroupInfo `json:"-"`
Data map[string]interface{} `json:"data" swaggerignore:"true"`
}
@@ -119,8 +119,8 @@ type GetGroupApplicationListReq struct {
}
type GetGroupApplicationListResp struct {
CommResp
- GroupRequestList []*open_im_sdk.GroupRequest `json:"-"`
- Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+ GroupRequestList []*sdkws.GroupRequest `json:"-"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetUserReqGroupApplicationListReq struct {
@@ -129,7 +129,7 @@ type GetUserReqGroupApplicationListReq struct {
}
type GetUserRespGroupApplicationResp struct {
- GroupRequestList []*open_im_sdk.GroupRequest `json:"data"`
+ GroupRequestList []*sdkws.GroupRequest `json:"data"`
}
type GetGroupInfoReq struct {
@@ -138,12 +138,12 @@ type GetGroupInfoReq struct {
}
type GetGroupInfoResp struct {
CommResp
- GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
+ GroupInfoList []*sdkws.GroupInfo `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
//type GroupInfoAlias struct {
-// open_im_sdk.GroupInfo
+// sdkws.GroupInfo
// NeedVerification int32 `protobuf:"bytes,13,opt,name=needVerification" json:"needVerification,omitempty"`
//}
diff --git a/pkg/apistruct/office.go b/pkg/apistruct/office.go
deleted file mode 100644
index b4f830577..000000000
--- a/pkg/apistruct/office.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package apistruct
-
-import (
- pbOffice "Open_IM/pkg/proto/office"
-)
-
-type GetUserTagsReq struct {
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type GetUserTagsResp struct {
- CommResp
- Data struct {
- Tags []*pbOffice.Tag `json:"tags"`
- } `json:"data"`
-}
-
-type CreateTagReq struct {
- TagName string `json:"tagName" binding:"required"` // tag名称
- UserIDList []string `json:"userIDList" binding:"required"` // 用户ID列表
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type CreateTagResp struct {
- CommResp
-}
-
-type DeleteTagReq struct {
- TagID string `json:"tagID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type DeleteTagResp struct {
- CommResp
-}
-
-type SetTagReq struct {
- TagID string `json:"tagID" binding:"required"`
- NewName string `json:"newName"`
- IncreaseUserIDList []string `json:"increaseUserIDList"`
- ReduceUserIDList []string `json:"reduceUserIDList"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type SetTagResp struct {
- CommResp
-}
-
-type SendMsg2TagReq struct {
- TagList []string `json:"tagList"`
- UserList []string `json:"userList"`
- GroupList []string `json:"groupList"`
-
- SenderPlatformID int32 `json:"senderPlatformID" binding:"required"`
- Content string `json:"content" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type SendMsg2TagResp struct {
- CommResp
-}
-
-type GetTagSendLogsReq struct {
- PageNumber int32 `json:"pageNumber" binding:"required"`
- ShowNumber int32 `json:"showNumber" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type GetTagSendLogsResp struct {
- CommResp
- Data struct {
- Logs []*pbOffice.TagSendLog `json:"logs"`
- CurrentPage int32 `json:"currentPage"`
- ShowNumber int32 `json:"showNumber"`
- } `json:"data"`
-}
-
-type GetUserTagByIDReq struct {
- TagID string `json:"tagID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type GetUserTagByIDResp struct {
- CommResp
- Data struct {
- Tag *pbOffice.Tag `json:"tag"`
- } `json:"data"`
-}
diff --git a/pkg/apistruct/user.go b/pkg/apistruct/user.go
index b2c097dee..47fd58e2e 100644
--- a/pkg/apistruct/user.go
+++ b/pkg/apistruct/user.go
@@ -1,7 +1,7 @@
package apistruct
import (
- open_im_sdk "Open_IM/pkg/proto/sdkws"
+ sdkws "Open_IM/pkg/proto/sdkws"
)
type GetUsersInfoReq struct {
@@ -10,8 +10,8 @@ type GetUsersInfoReq struct {
}
type GetUsersInfoResp struct {
CommResp
- UserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
- Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+ UserInfoList []*sdkws.PublicUserInfo `json:"-"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type UpdateSelfUserInfoReq struct {
@@ -35,7 +35,7 @@ type GetSelfUserInfoReq struct {
}
type GetSelfUserInfoResp struct {
CommResp
- UserInfo *open_im_sdk.UserInfo `json:"-"`
+ UserInfo *sdkws.UserInfo `json:"-"`
Data map[string]interface{} `json:"data" swaggerignore:"true"`
}
diff --git a/pkg/apistruct/work_moments.go b/pkg/apistruct/work_moments.go
deleted file mode 100644
index acf3d4d6f..000000000
--- a/pkg/apistruct/work_moments.go
+++ /dev/null
@@ -1,138 +0,0 @@
-package apistruct
-
-import "Open_IM/pkg/proto/office"
-
-type CreateOneWorkMomentReq struct {
- office.CreateOneWorkMomentReq
-}
-
-type CreateOneWorkMomentResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
-
-type DeleteOneWorkMomentReq struct {
- WorkMomentID string `json:"workMomentID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type DeleteOneWorkMomentResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
-
-type LikeOneWorkMomentReq struct {
- WorkMomentID string `json:"workMomentID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type LikeOneWorkMomentResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
-
-type CommentOneWorkMomentReq struct {
- WorkMomentID string `json:"workMomentID" binding:"required"`
- ReplyUserID string `json:"replyUserID"`
- Content string `json:"content" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type CommentOneWorkMomentResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
-
-type DeleteCommentReq struct {
- WorkMomentID string `json:"workMomentID" binding:"required"`
- ContentID string `json:"contentID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type DeleteCommentResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
-
-type WorkMomentsUserCommonReq struct {
- PageNumber int32 `json:"pageNumber" binding:"required"`
- ShowNumber int32 `json:"showNumber" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type GetWorkMomentByIDReq struct {
- WorkMomentID string `json:"workMomentID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type WorkMoment struct {
- WorkMomentID string `json:"workMomentID"`
- UserID string `json:"userID"`
- Content string `json:"content"`
- LikeUserList []*WorkMomentUser `json:"likeUsers"`
- Comments []*Comment `json:"comments"`
- FaceURL string `json:"faceURL"`
- UserName string `json:"userName"`
- AtUserList []*WorkMomentUser `json:"atUsers"`
- PermissionUserList []*WorkMomentUser `json:"permissionUsers"`
- CreateTime int32 `json:"createTime"`
- Permission int32 `json:"permission"`
-}
-
-type WorkMomentUser struct {
- UserID string `json:"userID"`
- UserName string `json:"userName"`
-}
-
-type Comment struct {
- UserID string `json:"userID"`
- UserName string `json:"userName"`
- ReplyUserID string `json:"replyUserID"`
- ReplyUserName string `json:"replyUserName"`
- ContentID string `json:"contentID"`
- Content string `json:"content"`
- CreateTime int32 `json:"createTime"`
-}
-
-type GetWorkMomentByIDResp struct {
- CommResp
- Data struct {
- WorkMoment *WorkMoment `json:"workMoment"`
- } `json:"data"`
-}
-
-type GetUserWorkMomentsReq struct {
- WorkMomentsUserCommonReq
- UserID string `json:"userID"`
-}
-
-type GetUserWorkMomentsResp struct {
- CommResp
- Data struct {
- WorkMoments []*WorkMoment `json:"workMoments"`
- CurrentPage int32 `json:"currentPage"`
- ShowNumber int32 `json:"showNumber"`
- } `json:"data"`
-}
-
-type GetUserFriendWorkMomentsReq struct {
- WorkMomentsUserCommonReq
-}
-
-type GetUserFriendWorkMomentsResp struct {
- CommResp
- Data struct {
- WorkMoments []*WorkMoment `json:"workMoments"`
- CurrentPage int32 `json:"currentPage"`
- ShowNumber int32 `json:"showNumber"`
- } `json:"data"`
-}
-
-type SetUserWorkMomentsLevelReq struct {
- office.SetUserWorkMomentsLevelReq
-}
-
-type SetUserWorkMomentsLevelResp struct {
- CommResp
- Data struct{} `json:"data"`
-}
diff --git a/pkg/callbackstruct/group.go b/pkg/callbackstruct/group.go
index e504151c1..a84753326 100644
--- a/pkg/callbackstruct/group.go
+++ b/pkg/callbackstruct/group.go
@@ -1,7 +1,7 @@
package callbackstruct
import (
- "Open_IM/pkg/proto/group"
+ "Open_IM/pkg/apistruct"
common "Open_IM/pkg/proto/sdkws"
)
@@ -9,7 +9,7 @@ type CallbackBeforeCreateGroupReq struct {
CallbackCommand string `json:"callbackCommand"`
OperationID string `json:"operationID"`
common.GroupInfo
- InitMemberList []*group.GroupAddMemberInfo `json:"initMemberList"`
+ InitMemberList []*apistruct.GroupAddMemberInfo `json:"initMemberList"`
}
type CallbackBeforeCreateGroupResp struct {
diff --git a/pkg/cmsstruct/admin.go b/pkg/cmsstruct/admin.go
deleted file mode 100644
index 169d790fc..000000000
--- a/pkg/cmsstruct/admin.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package cmsstruct
-
-import (
- "Open_IM/pkg/api_struct"
- sdkws "Open_IM/pkg/proto/sdkws"
-)
-
-type AdminLoginRequest struct {
- AdminName string `json:"adminID" binding:"required"`
- Secret string `json:"secret" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type AdminLoginResponse struct {
- Token string `json:"token"`
- UserName string `json:"userName"`
- FaceURL string `json:"faceURL"`
-}
-
-type GetUserTokenRequest struct {
- UserID string `json:"userID" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
- PlatFormID int32 `json:"platformID" binding:"required"`
-}
-
-type GetUserTokenResponse struct {
- Token string `json:"token"`
- ExpTime int64 `json:"expTime"`
-}
-
-type AddUserRegisterAddFriendIDListRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- UserIDList []string `json:"userIDList" binding:"required"`
-}
-
-type AddUserRegisterAddFriendIDListResponse struct {
-}
-
-type ReduceUserRegisterAddFriendIDListRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- UserIDList []string `json:"userIDList" binding:"required"`
- Operation int32 `json:"operation"`
-}
-
-type ReduceUserRegisterAddFriendIDListResponse struct {
-}
-
-type GetUserRegisterAddFriendIDListRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- apistruct.RequestPagination
-}
-
-type GetUserRegisterAddFriendIDListResponse struct {
- Users []*sdkws.UserInfo `json:"users"`
- apistruct.ResponsePagination
-}
diff --git a/pkg/cmsstruct/common.go b/pkg/cmsstruct/common.go
deleted file mode 100644
index ed679c287..000000000
--- a/pkg/cmsstruct/common.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package cmsstruct
-
-type RequestPagination struct {
- PageNumber int `json:"pageNumber" binding:"required"`
- ShowNumber int `json:"showNumber" binding:"required"`
-}
-
-type ResponsePagination struct {
- CurrentPage int `json:"currentPage"`
- ShowNumber int `json:"showNumber"`
-}
diff --git a/pkg/cmsstruct/friend.go b/pkg/cmsstruct/friend.go
deleted file mode 100644
index 26017c795..000000000
--- a/pkg/cmsstruct/friend.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package cmsstruct
-
-type GetFriendsReq struct {
- OperationID string `json:"operationID"`
- UserID string `json:"userID"`
- FriendUserName string `json:"friendUserName"`
- FriendUserID string `json:"friendUserID"`
- RequestPagination
-}
-
-type FriendInfo struct {
- OwnerUserID string `json:"ownerUserID"`
- Remark string `json:"remark"`
- CreateTime uint32 `json:"createTime"`
- UserID string `json:"userID"`
- Nickname string `json:"nickName"`
- AddSource int32 `json:"addSource"`
- OperatorUserID string `json:"operatorUserID"`
-}
-
-type GetFriendsResp struct {
- ResponsePagination
- FriendInfoList []*FriendInfo `json:"friendInfoList"`
- FriendNums int32 `json:"friendNums"`
-}
diff --git a/pkg/cmsstruct/group.go b/pkg/cmsstruct/group.go
deleted file mode 100644
index 2cf90692d..000000000
--- a/pkg/cmsstruct/group.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package cmsstruct
-
-type GroupResponse struct {
- GroupOwnerName string `json:"GroupOwnerName"`
- GroupOwnerID string `json:"GroupOwnerID"`
- GroupID string `json:"groupID"`
- GroupName string `json:"groupName"`
- Notification string `json:"notification"`
- Introduction string `json:"introduction"`
- FaceURL string `json:"faceURL"`
- OwnerUserID string `json:"ownerUserID"`
- CreateTime uint32 `json:"createTime"`
- MemberCount uint32 `json:"memberCount"`
- Ex string `json:"ex"`
- Status int32 `json:"status"`
- CreatorUserID string `json:"creatorUserID"`
- GroupType int32 `json:"groupType"`
- NeedVerification int32 `json:"needVerification"`
- LookMemberInfo int32 `json:"lookMemberInfo"`
- ApplyMemberFriend int32 `json:"applyMemberFriend"`
- NotificationUpdateTime uint32 `json:"notificationUpdateTime"`
- NotificationUserID string `json:"notificationUserID"`
-}
-
-type GetGroupsRequest struct {
- RequestPagination
- OperationID string `json:"operationID" binding:"required"`
- GroupID string `json:"groupID"`
- GroupName string `json:"groupName"`
-}
-
-type GetGroupsResponse struct {
- Groups []GroupResponse `json:"groups"`
- GroupNums int `json:"groupNums"`
- ResponsePagination
-}
-
-type GetGroupMembersRequest struct {
- GroupID string `form:"groupID" binding:"required"`
- UserName string `form:"userName"`
- OperationID string `json:"operationID" binding:"required"`
- RequestPagination
-}
-
-type GroupMemberResponse struct {
- GroupID string `json:"groupID"`
- UserID string `json:"userID"`
- RoleLevel int32 `json:"roleLevel"`
- JoinTime int32 `json:"joinTime"`
- Nickname string `json:"nickname"`
- FaceURL string `json:"faceURL"`
- AppMangerLevel int32 `json:"appMangerLevel"` //if >0
- JoinSource int32 `json:"joinSource"`
- OperatorUserID string `json:"operatorUserID"`
- Ex string `json:"ex"`
- MuteEndTime uint32 `json:"muteEndTime"`
- InviterUserID string `json:"inviterUserID"`
-}
-
-type GetGroupMembersResponse struct {
- GroupMembers []GroupMemberResponse `json:"groupMembers"`
- ResponsePagination
- MemberNums int `json:"memberNums"`
-}
diff --git a/pkg/cmsstruct/message_cms.go b/pkg/cmsstruct/message_cms.go
deleted file mode 100644
index 9f1480fc8..000000000
--- a/pkg/cmsstruct/message_cms.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package cmsstruct
-
-import (
- pbCommon "Open_IM/pkg/proto/sdkws"
-)
-
-type GetChatLogsReq struct {
- SessionType int `json:"sessionType"`
- ContentType int `json:"contentType"`
- Content string `json:"content"`
- SendID string `json:"sendID"`
- RecvID string `json:"recvID"`
- GroupID string `json:"groupID"`
- SendTime string `json:"sendTime"`
- RequestPagination
- OperationID string `json:"operationID"`
-}
-
-type ChatLog struct {
- SendID string `json:"sendID,omitempty"`
- RecvID string `json:"recvID,omitempty"`
- GroupID string `json:"groupID,omitempty"`
- ClientMsgID string `json:"clientMsgID,omitempty"`
- ServerMsgID string `json:"serverMsgID,omitempty"`
- SenderPlatformID int32 `json:"senderPlatformID,omitempty"`
- SenderNickname string `json:"senderNickname,omitempty"`
- SenderFaceURL string `json:"senderFaceURL,omitempty"`
- SessionType int32 `json:"sessionType,omitempty"`
- MsgFrom int32 `json:"msgFrom,omitempty"`
- ContentType int32 `json:"contentType,omitempty"`
- Content string `json:"content,omitempty"`
- Seq uint32 `json:"seq,omitempty"`
- SendTime int64 `json:"sendTime,omitempty"`
- CreateTime int64 `json:"createTime,omitempty"`
- Status int32 `json:"status,omitempty"`
- Options map[string]bool `json:"options,omitempty"`
- OfflinePushInfo *pbCommon.OfflinePushInfo `json:"offlinePushInfo,omitempty"`
- AtUserIDList []string `json:"atUserIDList,omitempty"`
- MsgDataList []byte `json:"msgDataList,omitempty"`
- AttachedInfo string `json:"attachedInfo,omitempty"`
- Ex string `json:"ex,omitempty"`
-}
-
-type GetChatLogsResp struct {
- ChatLogs []*ChatLog `json:"chatLogs"`
- ChatLogsNum int `json:"logNums"`
- ResponsePagination
-}
diff --git a/pkg/cmsstruct/statistics.go b/pkg/cmsstruct/statistics.go
deleted file mode 100644
index 0f95039de..000000000
--- a/pkg/cmsstruct/statistics.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package cmsstruct
-
-type GetStatisticsRequest struct {
- From string `json:"from" binding:"required"`
- To string `json:"to" binding:"required"`
- OperationID string `json:"operationID" binding:"required"`
-}
-
-type GetMessageStatisticsRequest struct {
- GetStatisticsRequest
-}
-
-type GetMessageStatisticsResponse struct {
- PrivateMessageNum int `json:"privateMessageNum"`
- GroupMessageNum int `json:"groupMessageNum"`
- PrivateMessageNumList []struct {
- Date string `json:"date"`
- MessageNum int `json:"messageNum"`
- } `json:"privateMessageNumList"`
- GroupMessageNumList []struct {
- Date string `json:"date"`
- MessageNum int `json:"messageNum"`
- } `json:"groupMessageNumList"`
-}
-
-type GetUserStatisticsRequest struct {
- GetStatisticsRequest
-}
-
-type GetUserStatisticsResponse struct {
- IncreaseUserNum int `json:"increaseUserNum"`
- ActiveUserNum int `json:"activeUserNum"`
- TotalUserNum int `json:"totalUserNum"`
- IncreaseUserNumList []struct {
- Date string `json:"date"`
- IncreaseUserNum int `json:"increaseUserNum"`
- } `json:"increaseUserNumList"`
- ActiveUserNumList []struct {
- Date string `json:"date"`
- ActiveUserNum int `json:"activeUserNum"`
- } `json:"activeUserNumList"`
- TotalUserNumList []struct {
- Date string `json:"date"`
- TotalUserNum int `json:"totalUserNum"`
- } `json:"totalUserNumList"`
-}
-
-type GetGroupStatisticsRequest struct {
- GetStatisticsRequest
-}
-
-// 群聊统计
-type GetGroupStatisticsResponse struct {
- IncreaseGroupNum int `json:"increaseGroupNum"`
- TotalGroupNum int `json:"totalGroupNum"`
- IncreaseGroupNumList []struct {
- Date string `json:"date"`
- IncreaseGroupNum int `json:"increaseGroupNum"`
- } `json:"increaseGroupNumList"`
- TotalGroupNumList []struct {
- Date string `json:"date"`
- TotalGroupNum int `json:"totalGroupNum"`
- } `json:"totalGroupNumList"`
-}
-
-type GetActiveUserRequest struct {
- GetStatisticsRequest
- // RequestPagination
-}
-
-type GetActiveUserResponse struct {
- ActiveUserList []struct {
- NickName string `json:"nickName"`
- UserId string `json:"userID"`
- MessageNum int `json:"messageNum"`
- } `json:"activeUserList"`
-}
-
-type GetActiveGroupRequest struct {
- GetStatisticsRequest
- // RequestPagination
-}
-
-type GetActiveGroupResponse struct {
- ActiveGroupList []struct {
- GroupName string `json:"groupName"`
- GroupId string `json:"groupID"`
- MessageNum int `json:"messageNum"`
- } `json:"activeGroupList"`
-}
diff --git a/pkg/cmsstruct/user.go b/pkg/cmsstruct/user.go
deleted file mode 100644
index e217c830e..000000000
--- a/pkg/cmsstruct/user.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package cmsstruct
-
-type UserResponse struct {
- FaceURL string `json:"faceURL"`
- Nickname string `json:"nickName"`
- UserID string `json:"userID"`
- CreateTime string `json:"createTime,omitempty"`
- CreateIp string `json:"createIp,omitempty"`
- LastLoginTime string `json:"lastLoginTime,omitempty"`
- LastLoginIp string `json:"lastLoginIP,omitempty"`
- LoginTimes int32 `json:"loginTimes"`
- LoginLimit int32 `json:"loginLimit"`
- IsBlock bool `json:"isBlock"`
- PhoneNumber string `json:"phoneNumber"`
- Email string `json:"email"`
- Birth string `json:"birth"`
- Gender int `json:"gender"`
-}
-
-type AddUserRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- PhoneNumber string `json:"phoneNumber" binding:"required"`
- UserId string `json:"userID" binding:"required"`
- Name string `json:"name" binding:"required"`
- Email string `json:"email"`
- Birth string `json:"birth"`
- Gender string `json:"gender"`
- FaceURL string `json:"faceURL"`
-}
-
-type AddUserResponse struct {
-}
-
-type BlockUser struct {
- UserResponse
- BeginDisableTime string `json:"beginDisableTime"`
- EndDisableTime string `json:"endDisableTime"`
-}
-
-type BlockUserRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- UserID string `json:"userID" binding:"required"`
- EndDisableTime string `json:"endDisableTime" binding:"required"`
-}
-
-type BlockUserResponse struct {
-}
-
-type UnblockUserRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- UserID string `json:"userID" binding:"required"`
-}
-
-type UnBlockUserResponse struct {
-}
-
-type GetBlockUsersRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- RequestPagination
-}
-
-type GetBlockUsersResponse struct {
- BlockUsers []BlockUser `json:"blockUsers"`
- ResponsePagination
- UserNums int32 `json:"userNums"`
-}
-
-type GetUserIDByEmailAndPhoneNumberRequest struct {
- OperationID string `json:"operationID" binding:"required"`
- PhoneNumber string `json:"phoneNumber"`
- Email string `json:"email"`
-}
-
-type GetUserIDByEmailAndPhoneNumberResponse struct {
- UserIDList []string `json:"userIDList"`
-}
diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index 5995a98aa..9eda74055 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -37,10 +37,6 @@ type config struct {
GinPort []int `yaml:"openImApiPort"`
ListenIP string `yaml:"listenIP"`
}
- CmsApi struct {
- GinPort []int `yaml:"openImCmsApiPort"`
- ListenIP string `yaml:"listenIP"`
- }
Sdk struct {
WsPort []int `yaml:"openImSdkWsPort"`
DataDir []string `yaml:"dataDir"`
@@ -131,8 +127,6 @@ type config struct {
OpenImGroupPort []int `yaml:"openImGroupPort"`
OpenImAuthPort []int `yaml:"openImAuthPort"`
OpenImPushPort []int `yaml:"openImPushPort"`
- OpenImAdminCmsPort []int `yaml:"openImAdminCmsPort"`
- OpenImOfficePort []int `yaml:"openImOfficePort"`
OpenImConversationPort []int `yaml:"openImConversationPort"`
OpenImCachePort []int `yaml:"openImCachePort"`
OpenImRealTimeCommPort []int `yaml:"openImRealTimeCommPort"`
@@ -146,8 +140,6 @@ type config struct {
OpenImRelayName string `yaml:"openImRelayName"`
OpenImGroupName string `yaml:"openImGroupName"`
OpenImAuthName string `yaml:"openImAuthName"`
- OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
- OpenImOfficeName string `yaml:"openImOfficeName"`
OpenImConversationName string `yaml:"openImConversationName"`
OpenImCacheName string `yaml:"openImCacheName"`
OpenImRealTimeCommName string `yaml:"openImRealTimeCommName"`
@@ -473,16 +465,6 @@ type config struct {
CloseTips string `yaml:"closeTips"`
} `yaml:"defaultTips"`
} `yaml:"conversationSetPrivate"`
- WorkMomentsNotification struct {
- Conversation PConversation `yaml:"conversation"`
- OfflinePush POfflinePush `yaml:"offlinePush"`
- DefaultTips PDefaultTips `yaml:"defaultTips"`
- } `yaml:"workMomentsNotification"`
- JoinDepartmentNotification struct {
- Conversation PConversation `yaml:"conversation"`
- OfflinePush POfflinePush `yaml:"offlinePush"`
- DefaultTips PDefaultTips `yaml:"defaultTips"`
- } `yaml:"joinDepartmentNotification"`
Signal struct {
OfflinePush struct {
Title string `yaml:"title"`
@@ -490,9 +472,6 @@ type config struct {
} `yaml:"signal"`
}
- WorkMoment struct {
- OnlyFriendCanSee bool `yaml:"onlyFriendCanSee"`
- } `yaml:"workMoment"`
Rtc struct {
SignalTimeout string `yaml:"signalTimeout"`
} `yaml:"rtc"`
@@ -506,11 +485,7 @@ type config struct {
GroupPrometheusPort []int `yaml:"groupPrometheusPort"`
AuthPrometheusPort []int `yaml:"authPrometheusPort"`
PushPrometheusPort []int `yaml:"pushPrometheusPort"`
- AdminCmsPrometheusPort []int `yaml:"adminCmsPrometheusPort"`
- OfficePrometheusPort []int `yaml:"officePrometheusPort"`
- OrganizationPrometheusPort []int `yaml:"organizationPrometheusPort"`
ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"`
- CachePrometheusPort []int `yaml:"cachePrometheusPort"`
RealTimeCommPrometheusPort []int `yaml:"realTimeCommPrometheusPort"`
MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"`
} `yaml:"prometheus"`
diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go
index d4018a9a9..1ad38f41b 100644
--- a/pkg/common/constant/constant.go
+++ b/pkg/common/constant/constant.go
@@ -94,9 +94,6 @@ const (
ConversationPrivateChatNotification = 1701
ConversationUnreadNotification = 1702
- WorkMomentNotificationBegin = 1900
- WorkMomentNotification = 1901
-
BusinessNotificationBegin = 2000
BusinessNotification = 2001
BusinessNotificationEnd = 2099
@@ -218,17 +215,6 @@ const (
VideoType = 2
ImageType = 3
- // workMoment permission
- WorkMomentPublic = 0
- WorkMomentPrivate = 1
- WorkMomentPermissionCanSee = 2
- WorkMomentPermissionCantSee = 3
-
- // workMoment sdk notification type
- WorkMomentCommentNotification = 0
- WorkMomentLikeNotification = 1
- WorkMomentAtUserNotification = 2
-
// sendMsgStaus
MsgStatusNotExist = 0
MsgIsSending = 1
diff --git a/pkg/common/constant/errors.go b/pkg/common/constant/errors.go
index 8dc933b22..fc5984946 100644
--- a/pkg/common/constant/errors.go
+++ b/pkg/common/constant/errors.go
@@ -13,6 +13,7 @@ var (
ErrUserIDNotFound = &ErrInfo{UserIDNotFoundError, "UserIDNotFoundError", ""}
ErrGroupIDNotFound = &ErrInfo{GroupIDNotFoundError, "GroupIDNotFoundError", ""}
+ ErrGroupIDExisted = &ErrInfo{GroupIDNotFoundError, "GroupIDExisted", ""} // todo group id 已存在
ErrRecordNotFound = &ErrInfo{RecordNotFoundError, "RecordNotFoundError", ""}
diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go
index 844e9b937..53e73a7f1 100644
--- a/pkg/common/db/cache/conversation.go
+++ b/pkg/common/db/cache/conversation.go
@@ -20,21 +20,25 @@ const (
superGroupRecvMsgNotNotifyUserIDsKey = "SUPER_GROUP_RECV_MSG_NOT_NOTIFY_USER_IDS:"
conversationExpireTime = time.Second * 60 * 60 * 12
)
+type FuncDB func() (string, error)
// args fn will exec when no data in cache
type ConversationCache interface {
// get user's conversationIDs from cache
- GetUserConversationIDs(ctx context.Context, userID string, fn func(ctx context.Context, userID string) ([]string, error)) ([]string, error)
+ GetUserConversationIDs(ctx context.Context, userID string, fn FuncDB) ([]string, error)
// del user's conversationIDs from cache, call when a user add or reduce a conversation
DelUserConversationIDs(ctx context.Context, userID string) error
+ DelUsersConversationIDs(ctx context.Context,userIDList []string)error
// get one conversation from cache
- GetConversation(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID, conversationID string) (*relationTb.ConversationModel, error)) (*relationTb.ConversationModel, error)
+ GetConversation(ctx context.Context, ownerUserID, conversationID string, fn FuncDB) (*relationTb.ConversationModel, error)
// get one conversation from cache
- GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn func(ctx context.Context, ownerUserID, conversationIDs []string) ([]*relationTb.ConversationModel, error)) ([]*relationTb.ConversationModel, error)
+ GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB)([]*relationTb.ConversationModel, error)
// get one user's all conversations from cache
- GetUserAllConversations(ctx context.Context, ownerUserID string, fn func(ctx context.Context, ownerUserIDs string) ([]*relationTb.ConversationModel, error)) ([]*relationTb.ConversationModel, error)
+ GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB ) ([]*relationTb.ConversationModel, error)
// del one conversation from cache, call when one user's conversation Info changed
DelConversation(ctx context.Context, ownerUserID, conversationID string) error
+ DelUserConversations(ctx context.Context, ownerUserID string, conversationIDList []string) error
+ DelUsersConversation(ctx context.Context, ownerUserIDList []string, conversationID string) error
// get user conversation recv msg from cache
GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID, conversationID string) (opt int, err error)) (opt int, err error)
// del user recv msg opt from cache, call when user's conversation recv msg opt changed
@@ -51,6 +55,38 @@ type ConversationRedis struct {
rcClient *rockscache.Client
}
+func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, userID string, fn func(ctx context.Context, userID string) ([]string, error)) ([]string, error) {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) DelUsersConversationIDs(ctx context.Context, userIDList []string) error {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID string, conversationID string) (*relationTb.ConversationModel, error)) (*relationTb.ConversationModel, error) {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) DelUsersConversation(ctx context.Context, ownerUserIDList []string, conversationID string) error {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID string, conversationID string) (opt int, err error)) (opt int, err error) {
+ panic("implement me")
+}
+
+func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string, fn func(ctx context.Context, groupID string) (userIDs []string, err error)) (userIDs []string, err error) {
+ panic("implement me")
+}
+
func NewConversationRedis(rcClient *rockscache.Client) *ConversationRedis {
return &ConversationRedis{rcClient: rcClient}
}
diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go
index 8376a1d56..0e8322f0d 100644
--- a/pkg/common/db/cache/group.go
+++ b/pkg/common/db/cache/group.go
@@ -1,17 +1,14 @@
package cache
import (
- "Open_IM/pkg/common/db/relation"
relationTb "Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/db/unrelation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
- "encoding/json"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"math/big"
- "strconv"
"strings"
"time"
)
@@ -157,6 +154,27 @@ func (g *GroupCacheRedis) GetGroupMembersHash(ctx context.Context, groupID strin
})
}
+func (g *GroupCacheRedis) GetGroupMemberHash1(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error) {
+ // todo
+ mapGroupUserIDs, err := g.groupMember.FindJoinUserID(ctx, groupIDs)
+ if err != nil {
+ return nil, err
+ }
+ res := make(map[string]*relationTb.GroupSimpleUserID)
+ for _, groupID := range groupIDs {
+ userIDs := mapGroupUserIDs[groupID]
+ users := &relationTb.GroupSimpleUserID{}
+ if len(userIDs) > 0 {
+ utils.Sort(userIDs, true)
+ bi := big.NewInt(0)
+ bi.SetString(utils.Md5(strings.Join(userIDs, ";"))[0:8], 16)
+ users.Hash = bi.Uint64()
+ }
+ res[groupID] = users
+ }
+ return res, nil
+}
+
func (g *GroupCacheRedis) DelGroupMembersHash(ctx context.Context, groupID string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID)
@@ -178,111 +196,104 @@ func (g *GroupCacheRedis) DelGroupMemberIDs(ctx context.Context, groupID string)
return g.rcClient.TagAsDeleted(g.getGroupMemberIDsKey(groupID))
}
-// JoinedGroups
-func (g *GroupCacheRedis) GetJoinedGroupIDs(ctx context.Context, userID string) (joinedGroupIDs []string, err error) {
- getJoinedGroupIDList := func() (string, error) {
- joinedGroupList, err := relation.GetJoinedGroupIDListByUserID(userID)
- if err != nil {
- return "", err
- }
- bytes, err := json.Marshal(joinedGroupList)
- if err != nil {
- return "", utils.Wrap(err, "")
- }
- return string(bytes), nil
- }
- defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "joinedGroupIDs", joinedGroupIDs)
- }()
- joinedGroupIDListStr, err := g.rcClient.Fetch(g.getJoinedGroupsKey(userID), time.Second*30*60, getJoinedGroupIDList)
- if err != nil {
- return nil, err
- }
- err = json.Unmarshal([]byte(joinedGroupIDListStr), &joinedGroupIDs)
- return joinedGroupIDs, utils.Wrap(err, "")
-}
+//// JoinedGroups
+//func (g *GroupCacheRedis) GetJoinedGroupIDs(ctx context.Context, userID string) (joinedGroupIDs []string, err error) {
+// getJoinedGroupIDList := func() (string, error) {
+// joinedGroupList, err := relation.GetJoinedGroupIDListByUserID(userID)
+// if err != nil {
+// return "", err
+// }
+// bytes, err := json.Marshal(joinedGroupList)
+// if err != nil {
+// return "", utils.Wrap(err, "")
+// }
+// return string(bytes), nil
+// }
+// defer func() {
+// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "joinedGroupIDs", joinedGroupIDs)
+// }()
+// joinedGroupIDListStr, err := g.rcClient.Fetch(g.getJoinedGroupsKey(userID), time.Second*30*60, getJoinedGroupIDList)
+// if err != nil {
+// return nil, err
+// }
+// err = json.Unmarshal([]byte(joinedGroupIDListStr), &joinedGroupIDs)
+// return joinedGroupIDs, utils.Wrap(err, "")
+//}
-func (g *GroupCacheRedis) DelJoinedGroupIDs(ctx context.Context, userID string) (err error) {
+func (g *GroupCacheRedis) DelJoinedGroupID(ctx context.Context, userID string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID)
}()
return g.rcClient.TagAsDeleted(g.getJoinedGroupsKey(userID))
}
-// GetGroupMemberInfo
-func (g *GroupCacheRedis) GetGroupMemberInfo(ctx context.Context, groupID, userID string) (groupMember *relation.GroupMember, err error) {
- getGroupMemberInfo := func() (string, error) {
- groupMemberInfo, err := relation.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID)
- if err != nil {
- return "", err
- }
- bytes, err := json.Marshal(groupMemberInfo)
- if err != nil {
- return "", utils.Wrap(err, "")
- }
- return string(bytes), nil
- }
- defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupMember", *groupMember)
- }()
- groupMemberInfoStr, err := g.rcClient.Fetch(g.getGroupMemberInfoKey(groupID, userID), time.Second*30*60, getGroupMemberInfo)
- if err != nil {
- return nil, err
- }
- groupMember = &relation.GroupMember{}
- err = json.Unmarshal([]byte(groupMemberInfoStr), groupMember)
- return groupMember, utils.Wrap(err, "")
+//func (g *GroupCacheRedis) DelJoinedGroupIDs(ctx context.Context, userIDs []string) (err error) {
+// defer func() {
+// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID)
+// }()
+// for _, userID := range userIDs {
+// if err := g.DelJoinedGroupID(ctx, userID); err != nil {
+// return err
+// }
+// }
+// return nil
+//}
+
+func (g *GroupCacheRedis) GetGroupMemberInfo(ctx context.Context, groupID, userID string) (groupMember *relationTb.GroupMemberModel, err error) {
+ return GetCache(ctx, g.rcClient, g.getGroupMemberInfoKey(groupID, userID), g.expireTime, func(ctx context.Context) (*relationTb.GroupMemberModel, error) {
+ return g.groupMember.Take(ctx, groupID, userID)
+ })
}
-func (g *GroupCacheRedis) GetGroupMembersInfo(ctx context.Context, groupID, userIDs []string) (groupMember *relationTb.GroupMemberModel, err error) {
+//func (g *GroupCacheRedis) GetGroupMembersInfo(ctx context.Context, groupID, userIDs []string) (groupMember *relationTb.GroupMemberModel, err error) {
+//
+// return nil, err
+//}
- return nil, err
-}
-
-func (g *GroupCacheRedis) GetGroupMembersInfo(ctx context.Context, count, offset int32, groupID string) (groupMembers []*relation.GroupMember, err error) {
- defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "count", count, "offset", offset, "groupID", groupID, "groupMember", groupMembers)
- }()
- groupMemberIDList, err := g.GetGroupMemberIDs(ctx, groupID)
- if err != nil {
- return nil, err
- }
- if count < 0 || offset < 0 {
- return nil, nil
- }
- var groupMemberList []*relation.GroupMember
- var start, stop int32
- start = offset
- stop = offset + count
- l := int32(len(groupMemberIDList))
- if start > stop {
- return nil, nil
- }
- if start >= l {
- return nil, nil
- }
- if count != 0 {
- if stop >= l {
- stop = l
- }
- groupMemberIDList = groupMemberIDList[start:stop]
- } else {
- if l < 1000 {
- stop = l
- } else {
- stop = 1000
- }
- groupMemberIDList = groupMemberIDList[start:stop]
- }
- for _, userID := range groupMemberIDList {
- groupMember, err := g.GetGroupMemberInfo(ctx, groupID, userID)
- if err != nil {
- return
- }
- groupMembers = append(groupMembers, groupMember)
- }
- return groupMemberList, nil
-}
+//func (g *GroupCacheRedis) GetGroupMembersInfo(ctx context.Context, count, offset int32, groupID string) (groupMembers []*relation.GroupMember, err error) {
+// defer func() {
+// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "count", count, "offset", offset, "groupID", groupID, "groupMember", groupMembers)
+// }()
+// groupMemberIDList, err := g.GetGroupMemberIDs(ctx, groupID)
+// if err != nil {
+// return nil, err
+// }
+// if count < 0 || offset < 0 {
+// return nil, nil
+// }
+// var groupMemberList []*relation.GroupMember
+// var start, stop int32
+// start = offset
+// stop = offset + count
+// l := int32(len(groupMemberIDList))
+// if start > stop {
+// return nil, nil
+// }
+// if start >= l {
+// return nil, nil
+// }
+// if count != 0 {
+// if stop >= l {
+// stop = l
+// }
+// groupMemberIDList = groupMemberIDList[start:stop]
+// } else {
+// if l < 1000 {
+// stop = l
+// } else {
+// stop = 1000
+// }
+// groupMemberIDList = groupMemberIDList[start:stop]
+// }
+// for _, userID := range groupMemberIDList {
+// groupMember, err := g.GetGroupMemberInfo(ctx, groupID, userID)
+// if err != nil {
+// return
+// }
+// groupMembers = append(groupMembers, groupMember)
+// }
+// return groupMemberList, nil
+//}
func (g *GroupCacheRedis) DelGroupMemberInfo(ctx context.Context, groupID, userID string) (err error) {
defer func() {
@@ -292,23 +303,23 @@ func (g *GroupCacheRedis) DelGroupMemberInfo(ctx context.Context, groupID, userI
}
// groupMemberNum
-func (g *GroupCacheRedis) GetGroupMemberNum(ctx context.Context, groupID string) (num int, err error) {
- getGroupMemberNum := func() (string, error) {
- num, err := relation.GetGroupMemberNumByGroupID(groupID)
- if err != nil {
- return "", err
- }
- return strconv.Itoa(int(num)), nil
- }
- defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "num", num)
- }()
- groupMember, err := g.rcClient.Fetch(g.getGroupMemberNumKey(groupID), time.Second*30*60, getGroupMemberNum)
- if err != nil {
- return 0, err
- }
- return strconv.Atoi(groupMember)
-}
+//func (g *GroupCacheRedis) GetGroupMemberNum(ctx context.Context, groupID string) (num int, err error) {
+// getGroupMemberNum := func() (string, error) {
+// num, err := relation.GetGroupMemberNumByGroupID(groupID)
+// if err != nil {
+// return "", err
+// }
+// return strconv.Itoa(int(num)), nil
+// }
+// defer func() {
+// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "num", num)
+// }()
+// groupMember, err := g.rcClient.Fetch(g.getGroupMemberNumKey(groupID), time.Second*30*60, getGroupMemberNum)
+// if err != nil {
+// return 0, err
+// }
+// return strconv.Atoi(groupMember)
+//}
func (g *GroupCacheRedis) DelGroupMemberNum(ctx context.Context, groupID string) (err error) {
defer func() {
diff --git a/pkg/common/db/controller/admin_cms.go b/pkg/common/db/controller/admin_cms.go
deleted file mode 100644
index 2ce7f8f2c..000000000
--- a/pkg/common/db/controller/admin_cms.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package controller
-
-import (
- "Open_IM/pkg/common/db/relation"
- "gorm.io/gorm"
- "time"
-)
-
-type AdminCMSInterface interface {
- GetActiveUserNum(from, to time.Time) (num int64, err error)
- GetIncreaseUserNum(from, to time.Time) (num int64, err error)
- GetTotalUserNum() (num int64, err error)
- GetTotalUserNumByDate(to time.Time) (num int64, err error)
- GetSingleChatMessageNum(from, to time.Time) (num int64, err error)
- GetGroupMessageNum(from, to time.Time) (num int64, err error)
- GetIncreaseGroupNum(from, to time.Time) (num int64, err error)
- GetTotalGroupNum() (num int64, err error)
- GetGroupNum(to time.Time) (num int64, err error)
- GetActiveGroups(from, to time.Time, limit int) (activeGroups []*relation.ActiveGroup, err error)
- GetActiveUsers(from, to time.Time, limit int) (activeUsers []*relation.ActiveUser, err error)
-}
-
-type AdminCMSController struct {
- database AdminCMSDatabaseInterface
-}
-
-func NewAdminCMSController(db *gorm.DB) AdminCMSInterface {
- adminCMSController := &AdminCMSController{
- database: newAdminCMSDatabase(db),
- }
- return adminCMSController
-}
-
-func newAdminCMSDatabase(db *gorm.DB) AdminCMSDatabaseInterface {
- return &AdminCMSDatabase{Statistics: relation.NewStatistics(db)}
-}
-
-func (admin *AdminCMSController) GetActiveUserNum(from, to time.Time) (num int64, err error) {
- return admin.database.GetActiveUserNum(from, to)
-}
-
-func (admin *AdminCMSController) GetIncreaseUserNum(from, to time.Time) (num int64, err error) {
- return admin.database.GetIncreaseUserNum(from, to)
-}
-
-func (admin *AdminCMSController) GetTotalUserNum() (num int64, err error) {
- return admin.database.GetTotalUserNum()
-}
-
-func (admin *AdminCMSController) GetTotalUserNumByDate(to time.Time) (num int64, err error) {
- return admin.database.GetTotalUserNumByDate(to)
-}
-
-func (admin *AdminCMSController) GetSingleChatMessageNum(from, to time.Time) (num int64, err error) {
- return admin.GetSingleChatMessageNum(from, to)
-}
-
-func (admin *AdminCMSController) GetGroupMessageNum(from, to time.Time) (num int64, err error) {
- return admin.database.GetGroupMessageNum(from, to)
-}
-
-func (admin *AdminCMSController) GetIncreaseGroupNum(from, to time.Time) (num int64, err error) {
- return admin.database.GetIncreaseGroupNum(from, to)
-}
-
-func (admin *AdminCMSController) GetTotalGroupNum() (num int64, err error) {
- return admin.database.GetTotalGroupNum()
-}
-
-func (admin *AdminCMSController) GetGroupNum(to time.Time) (num int64, err error) {
- return admin.database.GetGroupNum(to)
-}
-
-func (admin *AdminCMSController) GetActiveGroups(from, to time.Time, limit int) ([]*relation.ActiveGroup, error) {
- return admin.database.GetActiveGroups(from, to, limit)
-}
-
-func (admin *AdminCMSController) GetActiveUsers(from, to time.Time, limit int) (activeUsers []*relation.ActiveUser, err error) {
- return admin.database.GetActiveUsers(from, to, limit)
-}
-
-type AdminCMSDatabaseInterface interface {
- GetActiveUserNum(from, to time.Time) (num int64, err error)
- GetIncreaseUserNum(from, to time.Time) (num int64, err error)
- GetTotalUserNum() (num int64, err error)
- GetTotalUserNumByDate(to time.Time) (num int64, err error)
- GetSingleChatMessageNum(from, to time.Time) (num int64, err error)
- GetGroupMessageNum(from, to time.Time) (num int64, err error)
- GetIncreaseGroupNum(from, to time.Time) (num int64, err error)
- GetTotalGroupNum() (num int64, err error)
- GetGroupNum(to time.Time) (num int64, err error)
- GetActiveGroups(from, to time.Time, limit int) ([]*relation.ActiveGroup, error)
- GetActiveUsers(from, to time.Time, limit int) (activeUsers []*relation.ActiveUser, err error)
-}
-
-type AdminCMSDatabase struct {
- Statistics *relation.Statistics
-}
-
-func (admin *AdminCMSDatabase) GetActiveUserNum(from, to time.Time) (num int64, err error) {
- return admin.Statistics.GetActiveUserNum(from, to)
-}
-
-func (admin *AdminCMSDatabase) GetIncreaseUserNum(from, to time.Time) (num int64, err error) {
- return admin.Statistics.GetIncreaseUserNum(from, to)
-}
-
-func (admin *AdminCMSDatabase) GetTotalUserNum() (num int64, err error) {
- return admin.Statistics.GetTotalUserNum()
-}
-
-func (admin *AdminCMSDatabase) GetTotalUserNumByDate(to time.Time) (num int64, err error) {
- return admin.Statistics.GetTotalUserNumByDate(to)
-}
-
-func (admin *AdminCMSDatabase) GetSingleChatMessageNum(from, to time.Time) (num int64, err error) {
- return admin.Statistics.GetSingleChatMessageNum(from, to)
-}
-
-func (admin *AdminCMSDatabase) GetGroupMessageNum(from, to time.Time) (num int64, err error) {
- return admin.Statistics.GetGroupMessageNum(from, to)
-}
-
-func (admin *AdminCMSDatabase) GetIncreaseGroupNum(from, to time.Time) (num int64, err error) {
- return admin.Statistics.GetIncreaseGroupNum(from, to)
-}
-
-func (admin *AdminCMSDatabase) GetTotalGroupNum() (num int64, err error) {
- return admin.Statistics.GetTotalGroupNum()
-}
-
-func (admin *AdminCMSDatabase) GetGroupNum(to time.Time) (num int64, err error) {
- return admin.Statistics.GetGroupNum(to)
-}
-
-func (admin *AdminCMSDatabase) GetActiveGroups(from, to time.Time, limit int) ([]*relation.ActiveGroup, error) {
- return admin.Statistics.GetActiveGroups(from, to, limit)
-}
-
-func (admin *AdminCMSDatabase) GetActiveUsers(from, to time.Time, limit int) (activeUsers []*relation.ActiveUser, err error) {
- return admin.Statistics.GetActiveUsers(from, to, limit)
-}
diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go
index c5fe8bc3b..093249940 100644
--- a/pkg/common/db/controller/conversation.go
+++ b/pkg/common/db/controller/conversation.go
@@ -1,32 +1,42 @@
package controller
import (
+ "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
"Open_IM/pkg/common/db/relation"
relationTb "Open_IM/pkg/common/db/table/relation"
+ "Open_IM/pkg/utils"
"context"
+ "encoding/json"
+ "gorm.io/gorm"
)
type ConversationInterface interface {
//GetUserIDExistConversation 获取拥有该会话的的用户ID列表
GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error)
//UpdateUserConversationFiled 更新用户该会话的属性信息
- UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error
+ UpdateUsersConversationFiled(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}) error
//CreateConversation 创建一批新的会话
CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error
//SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作
SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error
//FindConversations 根据会话ID获取某个用户的多个会话
- FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error)
+ FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error)
//GetUserAllConversation 获取一个用户在服务器上所有的会话
GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error)
//SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性
SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error
+ //SetUsersConversationFiledTx 设置多个用户会话关于某个字段的更新操作,如果会话不存在则创建,否则更新,内部保证事务操作
+ SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error
}
type ConversationController struct {
database ConversationDataBaseInterface
}
+func (c *ConversationController) SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error {
+ return c.database.SetUsersConversationFiledTx(ctx, userIDList, conversation, filedMap)
+}
+
func NewConversationController(database ConversationDataBaseInterface) *ConversationController {
return &ConversationController{database: database}
}
@@ -36,26 +46,26 @@ func (c *ConversationController) GetUserIDExistConversation(ctx context.Context,
}
func (c ConversationController) UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error {
- panic("implement me")
+ return c.database.UpdateUsersConversationFiled(ctx, UserIDList, conversationID, args)
}
func (c ConversationController) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error {
- panic("implement me")
+ return c.database.CreateConversation(ctx, conversations)
}
func (c ConversationController) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error {
- panic("implement me")
+ return c.database.SyncPeerUserPrivateConversationTx(ctx, conversation)
}
-func (c ConversationController) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) {
- panic("implement me")
+func (c ConversationController) FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) {
+ return c.database.FindConversations(ctx, ownerUserID, conversationIDs)
}
func (c ConversationController) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) {
- panic("implement me")
+ return c.database.GetUserAllConversation(ctx, ownerUserID)
}
func (c ConversationController) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error {
- panic("implement me")
+ return c.database.SetUserConversations(ctx, ownerUserID, conversations)
}
var _ ConversationInterface = (*ConversationController)(nil)
@@ -70,19 +80,69 @@ type ConversationDataBaseInterface interface {
//SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作
SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error
//FindConversations 根据会话ID获取某个用户的多个会话
- FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error)
+ FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error)
//GetUserAllConversation 获取一个用户在服务器上所有的会话
GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error)
//SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性
SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error
+ //SetUsersConversationFiledTx 设置多个用户会话关于某个字段的更新操作,如果会话不存在则创建,否则更新,内部保证事务操作
+ SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error
}
+
+var _ ConversationDataBaseInterface = (*ConversationDataBase)(nil)
+
type ConversationDataBase struct {
- db relation.Conversation
- cache cache.ConversationCache
+ conversationDB relation.Conversation
+ cache cache.ConversationCache
+ db *gorm.DB
+}
+
+func (c ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error {
+ return c.db.Transaction(func(tx *gorm.DB) error {
+ haveUserID, err := c.conversationDB.FindUserID(ctx, userIDList, conversation.ConversationID, tx)
+ if err != nil {
+ return err
+ }
+ if len(haveUserID) > 0 {
+ err = c.conversationDB.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap, tx)
+ if err != nil {
+ return err
+ }
+ }
+ NotUserID := utils.DifferenceString(haveUserID, userIDList)
+ var cList []*relationTb.ConversationModel
+ for _, v := range NotUserID {
+ temp := new(relationTb.ConversationModel)
+ if err := utils.CopyStructFields(temp, conversation); err != nil {
+ return err
+ }
+ temp.OwnerUserID = v
+ cList = append(cList, temp)
+ }
+ err = c.conversationDB.Create(ctx, cList)
+ if err != nil {
+ return err
+ }
+ if len(NotUserID) > 0 {
+ err = c.cache.DelUsersConversationIDs(ctx, NotUserID)
+ if err != nil {
+ return err
+ }
+ }
+ err = c.cache.DelUsersConversation(ctx, haveUserID, conversation.ConversationID)
+ if err != nil {
+ return err
+ }
+ return nil
+ })
+}
+
+func NewConversationDataBase(db relation.Conversation, cache cache.ConversationCache) *ConversationDataBase {
+ return &ConversationDataBase{conversationDB: db, cache: cache}
}
func (c ConversationDataBase) GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error) {
- panic("implement me")
+
}
func (c ConversationDataBase) UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error {
@@ -94,26 +154,155 @@ func (c ConversationDataBase) CreateConversation(ctx context.Context, conversati
}
func (c ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error {
- panic("implement me")
+ return c.db.Transaction(func(tx *gorm.DB) error {
+ userIDList := []string{conversation.OwnerUserID, conversation.UserID}
+ haveUserID, err := c.conversationDB.FindUserID(ctx, userIDList, conversation.ConversationID, tx)
+ if err != nil {
+ return err
+ }
+ filedMap := map[string]interface{}{"is_private_chat": conversation.IsPrivateChat}
+ if len(haveUserID) > 0 {
+ err = c.conversationDB.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap, tx)
+ if err != nil {
+ return err
+ }
+ }
+
+ NotUserID := utils.DifferenceString(haveUserID, userIDList)
+ var cList []*relationTb.ConversationModel
+ for _, v := range NotUserID {
+ temp := new(relationTb.ConversationModel)
+ if v == conversation.UserID {
+ temp.OwnerUserID = conversation.UserID
+ temp.ConversationID = utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType)
+ temp.ConversationType = constant.SingleChatType
+ temp.UserID = conversation.OwnerUserID
+ temp.IsPrivateChat = conversation.IsPrivateChat
+ } else {
+ if err := utils.CopyStructFields(temp, conversation); err != nil {
+ return err
+ }
+ temp.OwnerUserID = v
+ }
+ cList = append(cList, temp)
+ }
+ if len(NotUserID) > 0 {
+ err = c.conversationDB.Create(ctx, cList)
+ if err != nil {
+ return err
+ }
+ }
+ err = c.cache.DelUsersConversationIDs(ctx, NotUserID)
+ if err != nil {
+ return err
+ }
+ err = c.cache.DelUsersConversation(ctx, haveUserID, conversation.ConversationID)
+ if err != nil {
+ return err
+ }
+ return nil
+ })
}
-func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) {
- panic("implement me")
+func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) {
+ getConversation := func() (string, error) {
+ conversationList, err := c.conversationDB.Find(ctx, ownerUserID, conversationIDs)
+ if err != nil {
+ return "", utils.Wrap(err, "get failed")
+ }
+ bytes, err := json.Marshal(conversationList)
+ if err != nil {
+ return "", utils.Wrap(err, "Marshal failed")
+ }
+ return string(bytes), nil
+ }
+ return c.cache.GetConversations(ctx, ownerUserID, conversationIDs, getConversation)
+}
+
+func (c ConversationDataBase) GetConversation(ctx context.Context, ownerUserID string, conversationID string) (*relationTb.ConversationModel, error) {
+ getConversation := func() (string, error) {
+ conversationList, err := c.conversationDB.Take(ctx, ownerUserID, conversationID)
+ if err != nil {
+ return "", utils.Wrap(err, "get failed")
+ }
+ bytes, err := json.Marshal(conversationList)
+ if err != nil {
+ return "", utils.Wrap(err, "Marshal failed")
+ }
+ return string(bytes), nil
+ }
+ return c.cache.GetConversation(ctx, ownerUserID, conversationID, getConversation)
}
func (c ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) {
- panic("implement me")
+ getConversationIDList := func() (string, error) {
+ conversationIDList, err := c.conversationDB.FindUserIDAllConversationID(ctx, ownerUserID)
+ if err != nil {
+ return "", utils.Wrap(err, "getConversationIDList failed")
+ }
+ bytes, err := json.Marshal(conversationIDList)
+ if err != nil {
+ return "", utils.Wrap(err, "")
+ }
+ return string(bytes), nil
+ }
+ conversationIDList, err := c.cache.GetUserConversationIDs(ctx, ownerUserID, getConversationIDList)
+ if err != nil {
+ return nil, err
+ }
+ var conversations []*relationTb.ConversationModel
+ for _, conversationID := range conversationIDList {
+ conversation, tErr := c.GetConversation(ctx, ownerUserID, conversationID)
+ if tErr != nil {
+ return nil, utils.Wrap(tErr, "GetConversation failed")
+ }
+ conversations = append(conversations, conversation)
+ }
+ return conversations, nil
}
func (c ConversationDataBase) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error {
- panic("implement me")
-}
+ return c.db.Transaction(func(tx *gorm.DB) error {
+ var conversationIDList []string
+ for _, conversation := range conversations {
+ conversationIDList = append(conversationIDList, conversation.ConversationID)
+ }
+ haveConversations, err := c.conversationDB.Find(ctx, ownerUserID, conversationIDList, tx)
+ if err != nil {
+ return err
+ }
+ if len(haveConversations) > 0 {
+ err = c.conversationDB.Update(ctx, conversations, tx)
+ if err != nil {
+ return err
+ }
+ }
+ var haveConversationID []string
+ for _, conversation := range haveConversations {
+ haveConversationID = append(haveConversationID, conversation.ConversationID)
+ }
-func NewConversationDataBase(db relation.Conversation, cache cache.ConversationCache) *ConversationDataBase {
- return &ConversationDataBase{db: db, cache: cache}
+ NotConversationID := utils.DifferenceString(haveConversationID, conversationIDList)
+ var NotConversations []*relationTb.ConversationModel
+ for _, conversation := range conversations {
+ if !utils.IsContain(conversation.ConversationID, haveConversationID) {
+ NotConversations = append(NotConversations, conversation)
+ }
+ }
+ if len(NotConversations) > 0 {
+ err = c.conversationDB.Create(ctx, NotConversations)
+ if err != nil {
+ return err
+ }
+ }
+ err = c.cache.DelUsersConversationIDs(ctx, NotConversationID)
+ if err != nil {
+ return err
+ }
+ err = c.cache.DelUserConversations(ctx, ownerUserID, haveConversationID)
+ if err != nil {
+ return err
+ }
+ return nil
+ })
}
-
-//func NewConversationController(db *gorm.DB, rdb redis.UniversalClient) ConversationInterface {
-// groupController := &ConversationController{database: newGroupDatabase(db, rdb, mgoClient)}
-// return groupController
-//}
diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go
index ba39bb511..8a39442c8 100644
--- a/pkg/common/db/controller/group.go
+++ b/pkg/common/db/controller/group.go
@@ -15,8 +15,6 @@ import (
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/mongo"
"gorm.io/gorm"
- "math/big"
- "strings"
)
//type GroupInterface GroupDataBaseInterface
@@ -248,7 +246,7 @@ type GroupDataBase struct {
func (g *GroupDataBase) delGroupMemberCache(ctx context.Context, groupID string, userIDs []string) error {
for _, userID := range userIDs {
- if err := g.cache.DelJoinedGroupIDs(ctx, userID); err != nil {
+ if err := g.cache.DelJoinedGroupID(ctx, userID); err != nil {
return err
}
if err := g.cache.DelJoinedSuperGroupIDs(ctx, userID); err != nil {
@@ -272,21 +270,24 @@ func (g *GroupDataBase) FindGroupMemberUserID(ctx context.Context, groupID strin
}
func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error {
- if len(groups) > 0 && len(groupMembers) > 0 {
- return g.db.Transaction(func(tx *gorm.DB) error {
+ return g.db.Transaction(func(tx *gorm.DB) error {
+ if len(groups) > 0 {
if err := g.groupDB.Create(ctx, groups, tx); err != nil {
return err
}
- return g.groupMemberDB.Create(ctx, groupMembers, tx)
- })
- }
- if len(groups) > 0 {
- return g.groupDB.Create(ctx, groups)
- }
- if len(groupMembers) > 0 {
- return g.groupMemberDB.Create(ctx, groupMembers)
- }
- return nil
+ }
+ if len(groupMembers) > 0 {
+ if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
+ return err
+ }
+ //if err := g.cache.DelJoinedGroupIDs(ctx, utils.Slice(groupMembers, func(e *relationTb.GroupMemberModel) string {
+ // return e.UserID
+ //})); err != nil {
+ // return err
+ //}
+ }
+ return nil
+ })
}
func (g *GroupDataBase) TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error) {
@@ -337,12 +338,11 @@ func (g *GroupDataBase) TakeGroupMember(ctx context.Context, groupID string, use
}
func (g *GroupDataBase) TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error) {
- return g.groupMemberDB.TakeOwner(ctx, groupID)
+ return g.groupMemberDB.TakeOwner(ctx, groupID) // todo cache group owner
}
func (g *GroupDataBase) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error) {
- //g.cache.GetGroupMembersInfo()
- return g.groupMemberDB.Find(ctx, groupIDs, userIDs, roleLevels)
+ return g.groupMemberDB.Find(ctx, groupIDs, userIDs, roleLevels) // todo cache group find
}
func (g *GroupDataBase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
@@ -383,23 +383,7 @@ func (g *GroupDataBase) DeleteGroupMember(ctx context.Context, groupID string, u
}
func (g *GroupDataBase) MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error) {
- mapGroupUserIDs, err := g.groupMemberDB.FindJoinUserID(ctx, groupIDs)
- if err != nil {
- return nil, err
- }
- res := make(map[string]*relationTb.GroupSimpleUserID)
- for _, groupID := range groupIDs {
- userIDs := mapGroupUserIDs[groupID]
- users := &relationTb.GroupSimpleUserID{}
- if len(userIDs) > 0 {
- utils.Sort(userIDs, true)
- bi := big.NewInt(0)
- bi.SetString(utils.Md5(strings.Join(userIDs, ";"))[0:8], 16)
- users.Hash = bi.Uint64()
- }
- res[groupID] = users
- }
- return res, nil
+ return g.cache.GetGroupMemberHash1(ctx, groupIDs)
}
func (g *GroupDataBase) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go
index 776b86b0f..ae427442a 100644
--- a/pkg/common/db/controller/msg.go
+++ b/pkg/common/db/controller/msg.go
@@ -8,10 +8,12 @@ import (
type MsgInterface interface {
BatchInsertChat2DB(ctx context.Context, userID string, msgList []*pbMsg.MsgDataToMQ, currentMaxSeq uint64) error
BatchInsertChat2Cache(ctx context.Context, insertID string, msgList []*pbMsg.MsgDataToMQ) (error, uint64)
+
DelMsgBySeqList(ctx context.Context, userID string, seqList []uint32) (totalUnExistSeqList []uint32, err error)
- DelMsgLogic(ctx context.Context, uid string, seqList []uint32) error
+ // logic delete
+ DelMsgLogic(ctx context.Context, userID string, seqList []uint32) error
DelMsgBySeqListInOneDoc(ctx context.Context, docID string, seqList []uint32) (unExistSeqList []uint32, err error)
- ReplaceMsgToBlankByIndex(suffixID string, index int) (replaceMaxSeq uint32, err error)
+ ReplaceMsgToBlankByIndex(docID string, index int) (replaceMaxSeq uint32, err error)
}
type MsgDatabaseInterface interface {
diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go
index 22a8553b2..37ea34161 100644
--- a/pkg/common/db/controller/user.go
+++ b/pkg/common/db/controller/user.go
@@ -30,11 +30,11 @@ type UserController struct {
}
// 获取指定用户的信息 如有userID未找到 也返回错误
-func (u *UserController) FindWithError(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error) {
+func (u *UserController) FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
return u.database.FindWithError(ctx, userIDs)
}
-func (u *UserController) Find(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error) {
+func (u *UserController) Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
return u.database.Find(ctx, userIDs)
}
func (u *UserController) Create(ctx context.Context, users []*relationTb.UserModel) error {
@@ -90,7 +90,7 @@ func newUserDatabase(db *gorm.DB) *UserDatabase {
}
// 获取指定用户的信息 如有userID未找到 也返回错误
-func (u *UserDatabase) FindWithError(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error) {
+func (u *UserDatabase) FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
users, err = u.user.Find(ctx, userIDs)
if err != nil {
return
@@ -102,7 +102,7 @@ func (u *UserDatabase) FindWithError(ctx context.Context, userIDs []string) (use
}
// 获取指定用户的信息 如有userID未找到 不返回错误
-func (u *UserDatabase) Find(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error) {
+func (u *UserDatabase) Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
users, err = u.user.Find(ctx, userIDs)
return
}
@@ -123,7 +123,7 @@ func (u *UserDatabase) UpdateByMap(ctx context.Context, userID string, args map[
}
// 获取,如果没找到,不返回错误
-func (u *UserDatabase) Page(ctx context.Context, showNumber, pageNumber int32) (users []*relation2.UserModel, count int64, err error) {
+func (u *UserDatabase) Page(ctx context.Context, showNumber, pageNumber int32) (users []*relationTb.UserModel, count int64, err error) {
return u.user.Page(ctx, showNumber, pageNumber)
}
diff --git a/pkg/common/db/relation/conversation_model_g.go b/pkg/common/db/relation/conversation_model_g.go
index 37882940d..e45af0154 100644
--- a/pkg/common/db/relation/conversation_model_g.go
+++ b/pkg/common/db/relation/conversation_model_g.go
@@ -1,7 +1,7 @@
package relation
import (
- "Open_IM/pkg/common/db/table"
+ "Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
@@ -10,12 +10,15 @@ import (
type Conversation interface {
TableName() string
- Create(ctx context.Context, conversations []*table.ConversationModel) (err error)
+ Create(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error)
Delete(ctx context.Context, groupIDs []string) (err error)
- UpdateByMap(ctx context.Context, groupID string, args map[string]interface{}) (err error)
- Update(ctx context.Context, groups []*table.ConversationModel) (err error)
- Find(ctx context.Context, groupIDs []string) (groups []*table.ConversationModel, err error)
- Take(ctx context.Context, groupID string) (group *table.ConversationModel, err error)
+ UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}, tx ...any) (err error)
+ Update(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error)
+ Find(ctx context.Context, ownerUserID string, conversationIDs []string, tx ...any) (conversations []*relation.ConversationModel, err error)
+ FindUserID(ctx context.Context, userIDList []string, conversationID string, tx ...any) ([]string, error)
+ FindUserIDAllConversationID(ctx context.Context, userID string, tx ...any) ([]string, error)
+ Take(ctx context.Context, userID, conversationID string, tx ...any) (conversation *relation.ConversationModel, err error)
+ FindConversationID(ctx context.Context, userID string, conversationIDList []string, tx ...any) (existConversationID []string, err error)
}
type ConversationGorm struct {
DB *gorm.DB
@@ -29,45 +32,69 @@ func NewConversationGorm(DB *gorm.DB) Conversation {
return &ConversationGorm{DB: DB}
}
-func (c *ConversationGorm) Create(ctx context.Context, conversations []*table.ConversationModel) (err error) {
+func (c *ConversationGorm) Create(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
- return utils.Wrap(getDBConn(g.DB, tx).Create(&conversations).Error, "")
+ return utils.Wrap(getDBConn(c.DB, tx).Create(&conversations).Error, "")
}
func (c *ConversationGorm) Delete(ctx context.Context, groupIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
}()
- return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&table.ConversationModel{}).Error, "")
+ return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.ConversationModel{}).Error, "")
}
-func (c *ConversationGorm) UpdateByMap(ctx context.Context, groupID string, args map[string]interface{}) (err error) {
+func (c *ConversationGorm) UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}, tx ...any) (err error) {
defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "args", args)
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDList", userIDList, "conversationID", conversationID)
}()
- return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(g).Updates(args).Error, "")
+ return utils.Wrap(getDBConn(c.DB, tx).Model(&relation.ConversationModel{}).Where("owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Updates(args).Error, "")
}
-func (c *ConversationGorm) Update(ctx context.Context, groups []*table.ConversationModel) (err error) {
+func (c *ConversationGorm) Update(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error) {
defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
- return utils.Wrap(getDBConn(g.DB, tx).Updates(&groups).Error, "")
+ return utils.Wrap(getDBConn(c.DB, tx).Updates(&conversations).Error, "")
}
-func (c *ConversationGorm) Find(ctx context.Context, groupIDs []string) (groups []*table.ConversationModel, err error) {
+func (c *ConversationGorm) Find(ctx context.Context, ownerUserID string, conversationIDs []string, tx ...any) (conversations []*relation.ConversationModel, err error) {
+ var newConversations []relation.ConversationModel
defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groups", groups)
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "groups", conversations)
}()
- return groups, utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Find(&groups).Error, "")
+ err = utils.Wrap(getDBConn(c.DB, tx).Where("owner_user_id=? and conversation_id IN (?)", ownerUserID, conversationIDs).Find(&newConversations).Error, "")
+ for _, v := range newConversations {
+ v1 := v
+ conversations = append(conversations, &v1)
+ }
+ return conversations, err
}
-func (c *ConversationGorm) Take(ctx context.Context, groupID string) (group *table.ConversationModel, err error) {
- group = &Group{}
+func (c *ConversationGorm) Take(ctx context.Context, userID, conversationID string, tx ...any) (conversation *relation.ConversationModel, err error) {
+ cc := &relation.ConversationModel{}
defer func() {
- tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", *group)
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversation", *conversation)
}()
- return group, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Take(group).Error, "")
+ return cc, utils.Wrap(getDBConn(c.DB, tx).Where("conversation_id = ? And owner_user_id = ?", conversationID, userID).Take(cc).Error, "")
+}
+func (c *ConversationGorm) FindUserID(ctx context.Context, userIDList []string, conversationID string, tx ...any) (existUserID []string, err error) {
+ defer func() {
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userIDList, "existUserID", existUserID)
+ }()
+ return existUserID, utils.Wrap(getDBConn(c.DB, tx).Where(" owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Pluck("owner_user_id", &existUserID).Error, "")
+}
+func (c *ConversationGorm) FindConversationID(ctx context.Context, userID string, conversationIDList []string, tx ...any) (existConversationID []string, err error) {
+ defer func() {
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "existConversationIDList", existConversationID)
+ }()
+ return existConversationID, utils.Wrap(getDBConn(c.DB, tx).Where(" conversation_id IN (?) and owner_user_id=?", conversationIDList, userID).Pluck("conversation_id", &existConversationID).Error, "")
+}
+func (c *ConversationGorm) FindUserIDAllConversationID(ctx context.Context, userID string, tx ...any) (conversationIDList []string, err error) {
+ defer func() {
+ tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversationIDList", conversationIDList)
+ }()
+ return conversationIDList, utils.Wrap(getDBConn(c.DB, tx).Model(&relation.ConversationModel{}).Where("owner_user_id=?", userID).Pluck("conversation_id", &conversationIDList).Error, "")
}
diff --git a/pkg/common/db/relation/init_mysql.go b/pkg/common/db/relation/init_mysql.go
deleted file mode 100644
index 986060b0a..000000000
--- a/pkg/common/db/relation/init_mysql.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package relation
-
-import (
- "Open_IM/pkg/common/config"
- "fmt"
- "time"
-
- "gorm.io/driver/mysql"
- "gorm.io/gorm"
- "gorm.io/gorm/logger"
-)
-
-type Mysql struct {
- gormConn *gorm.DB
-}
-
-func (m *Mysql) GormConn() *gorm.DB {
- return m.gormConn
-}
-
-func (m *Mysql) SetGormConn(gormConn *gorm.DB) {
- m.gormConn = gormConn
-}
-
-func (m *Mysql) InitConn() *Mysql {
- dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
- config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], "mysql")
- var db *gorm.DB
- db, err := gorm.Open(mysql.Open(dsn), nil)
- if err != nil {
- time.Sleep(time.Duration(30) * time.Second)
- db, err = gorm.Open(mysql.Open(dsn), nil)
- if err != nil {
- panic(err.Error() + " open failed " + dsn)
- }
- }
- sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8 COLLATE utf8_general_ci;", config.Config.Mysql.DBDatabaseName)
- err = db.Exec(sql).Error
- if err != nil {
- panic(err.Error() + " Exec failed:" + sql)
- }
- dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
- config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName)
- newLogger := logger.New(
- Writer{},
- logger.Config{
- SlowThreshold: time.Duration(config.Config.Mysql.SlowThreshold) * time.Millisecond, // Slow SQL threshold
- LogLevel: logger.LogLevel(config.Config.Mysql.LogLevel), // Log level
- IgnoreRecordNotFoundError: true, // Ignore ErrRecordNotFound error for logger
- Colorful: true, // Disable color
- },
- )
- db, err = gorm.Open(mysql.Open(dsn), &gorm.Config{
- Logger: newLogger,
- })
- if err != nil {
- panic(err.Error() + " Open failed " + dsn)
- }
- sqlDB, err := db.DB()
- if err != nil {
- panic(err.Error() + " DB.DB() failed ")
- }
- sqlDB.SetConnMaxLifetime(time.Second * time.Duration(config.Config.Mysql.DBMaxLifeTime))
- sqlDB.SetMaxOpenConns(config.Config.Mysql.DBMaxOpenConns)
- sqlDB.SetMaxIdleConns(config.Config.Mysql.DBMaxIdleConns)
- if db == nil {
- panic("db is nil")
- }
- m.SetGormConn(db)
- return m
-}
-
-//models := []interface{}{&Friend{}, &FriendRequest{}, &Group{}, &GroupMember{}, &GroupRequest{},
-// &User{}, &Black{}, &ChatLog{}, &Conversation{}, &AppVersion{}}
-
-func (m *Mysql) AutoMigrateModel(model interface{}) error {
- err := m.gormConn.AutoMigrate(model)
- if err != nil {
- return err
- }
- m.gormConn.Set("gorm:table_options", "CHARSET=utf8")
- m.gormConn.Set("gorm:table_options", "collation=utf8_unicode_ci")
- _ = m.gormConn.Migrator().CreateTable(model)
- return nil
-}
-
-type Writer struct{}
-
-func (w Writer) Printf(format string, args ...interface{}) {
- fmt.Printf(format, args...)
-}
-
-func getDBConn(db *gorm.DB, tx []any) *gorm.DB {
- if len(tx) > 0 {
- if txDB, ok := tx[0].(*gorm.DB); ok {
- return txDB
- }
- }
- return db
-}
diff --git a/pkg/common/db/relation/statistics_model.go b/pkg/common/db/relation/statistics_model.go
deleted file mode 100644
index 79b60a1c8..000000000
--- a/pkg/common/db/relation/statistics_model.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package relation
-
-import (
- "Open_IM/pkg/common/constant"
- "gorm.io/gorm"
- "time"
-)
-
-type Statistics struct {
- DB *gorm.DB
-}
-
-func NewStatistics(db *gorm.DB) *Statistics {
- return &Statistics{DB: db}
-}
-
-func (s *Statistics) getUserModel() *gorm.DB {
- return s.DB.Model(&User{})
-}
-
-func (s *Statistics) getChatLogModel() *gorm.DB {
- return s.DB.Model(&ChatLog{})
-}
-
-func (s *Statistics) getGroupModel() *gorm.DB {
- return s.DB.Model(&Group{})
-}
-
-func (s *Statistics) GetActiveUserNum(from, to time.Time) (num int64, err error) {
- err = s.getChatLogModel().Select("count(distinct(send_id))").Where("send_time >= ? and send_time <= ?", from, to).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetIncreaseUserNum(from, to time.Time) (num int64, err error) {
- err = s.getUserModel().Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetTotalUserNum() (num int64, err error) {
- err = s.getUserModel().Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetTotalUserNumByDate(to time.Time) (num int64, err error) {
- err = s.getUserModel().Where("create_time <= ?", to).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetSingleChatMessageNum(from, to time.Time) (num int64, err error) {
- err = s.getChatLogModel().Where("send_time >= ? and send_time <= ? and session_type = ?", from, to, constant.SingleChatType).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetGroupMessageNum(from, to time.Time) (num int64, err error) {
- err = s.getChatLogModel().Where("send_time >= ? and send_time <= ? and session_type in (?)", from, to, []int{constant.GroupChatType, constant.SuperGroupChatType}).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetIncreaseGroupNum(from, to time.Time) (num int64, err error) {
- err = s.getGroupModel().Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetTotalGroupNum() (num int64, err error) {
- err = s.getGroupModel().Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetGroupNum(to time.Time) (num int64, err error) {
- err = s.getGroupModel().Where("create_time <= ?", to).Count(&num).Error
- return num, err
-}
-
-func (s *Statistics) GetActiveGroups(from, to time.Time, limit int) ([]*ActiveGroup, error) {
- var activeGroups []*ActiveGroup
- err := s.getChatLogModel().Select("recv_id, count(*) as message_num").Where("send_time >= ? and send_time <= ? and session_type in (?)", from, to, []int{constant.GroupChatType, constant.SuperGroupChatType}).Group("recv_id").Limit(limit).Order("message_num DESC").Find(&activeGroups).Error
- for _, activeGroup := range activeGroups {
- group := Group{
- GroupID: activeGroup.ID,
- }
- s.getGroupModel().Where("group_id= ? ", group.GroupID).Find(&group)
- activeGroup.Name = group.GroupName
- }
- return activeGroups, err
-}
-
-func (s *Statistics) GetActiveUsers(from, to time.Time, limit int) (activeUsers []*ActiveUser, err error) {
- err = s.getChatLogModel().Select("send_id, count(*) as message_num").Where("send_time >= ? and send_time <= ? and session_type in (?)", from, to, []int{constant.SingleChatType, constant.GroupChatType, constant.SuperGroupChatType}).Group("send_id").Limit(limit).Order("message_num DESC").Find(&activeUsers).Error
- for _, activeUser := range activeUsers {
- user := User{
- UserID: activeUser.ID,
- }
- err = s.getUserModel().Select("user_id, name").Find(&user).Error
- if err != nil {
- return nil, err
- }
- activeUser.Name = user.Nickname
- activeUser.ID = user.UserID
- }
- return activeUsers, err
-}
diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go
index 0fee6fc26..108e78898 100644
--- a/pkg/common/db/table/unrelation/msg.go
+++ b/pkg/common/db/table/unrelation/msg.go
@@ -49,6 +49,20 @@ func (u UserMsgDocModel) GetSeqUid(uid string, seq uint32) string {
return u.getSeqUid(uid, seq)
}
+func (u UserMsgDocModel) GetDocIDSeqsMap(uid string, seqs []uint32) map[string][]uint32 {
+ t := make(map[string][]uint32)
+ for i := 0; i < len(seqs); i++ {
+ seqUid := u.getSeqUid(uid, seqs[i])
+ if value, ok := t[seqUid]; !ok {
+ var temp []uint32
+ t[seqUid] = append(temp, seqs[i])
+ } else {
+ t[seqUid] = append(value, seqs[i])
+ }
+ }
+ return t
+}
+
func (UserMsgDocModel) getMsgIndex(seq uint32) int {
seqSuffix := seq / singleGocMsgNum
var index uint32
diff --git a/pkg/common/db/table/unrelation/tag.go b/pkg/common/db/table/unrelation/tag.go
deleted file mode 100644
index 0390f7237..000000000
--- a/pkg/common/db/table/unrelation/tag.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package unrelation
-
-import "context"
-
-const (
- CTag = "tag"
- CSendLog = "send_log"
-)
-
-type TagModel struct {
- UserID string `bson:"user_id"`
- TagID string `bson:"tag_id"`
- TagName string `bson:"tag_name"`
- UserList []string `bson:"user_list"`
-}
-
-func (TagModel) TableName() string {
- return CTag
-}
-
-type TagSendLogModel struct {
- UserList []CommonUserModel `bson:"tag_list"`
- SendID string `bson:"send_id"`
- SenderPlatformID int32 `bson:"sender_platform_id"`
- Content string `bson:"content"`
- SendTime int64 `bson:"send_time"`
-}
-
-func (TagSendLogModel) TableName() string {
- return CSendLog
-}
-
-type TagModelInterface interface {
- GetUserTags(ctx context.Context, userID string) ([]TagModel, error)
- CreateTag(ctx context.Context, userID, tagName string, userList []string) error
- GetTagByID(ctx context.Context, userID, tagID string) (TagModel, error)
- DeleteTag(ctx context.Context, userID, tagID string) error
- SetTag(ctx context.Context, userID, tagID, newName string, increaseUserIDList []string, reduceUserIDList []string) error
- GetUserIDListByTagID(ctx context.Context, userID, tagID string) ([]string, error)
- SaveTagSendLog(ctx context.Context, tagSendLog *TagSendLogModel) error
- GetTagSendLogs(ctx context.Context, userID string, showNumber, pageNumber int32) ([]TagSendLogModel, error)
-}
diff --git a/pkg/common/db/table/unrelation/work_moment.go b/pkg/common/db/table/unrelation/work_moment.go
deleted file mode 100644
index a1b3e72fd..000000000
--- a/pkg/common/db/table/unrelation/work_moment.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package unrelation
-
-import "context"
-
-const (
- CWorkMoment = "work_moment"
-)
-
-type WorkMoment struct {
- WorkMomentID string `bson:"work_moment_id"`
- UserID string `bson:"user_id"`
- UserName string `bson:"user_name"`
- FaceURL string `bson:"face_url"`
- Content string `bson:"content"`
- LikeUserList []*CommonUserModel `bson:"like_user_list"`
- AtUserList []*CommonUserModel `bson:"at_user_list"`
- PermissionUserList []*CommonUserModel `bson:"permission_user_list"`
- Comments []*CommonUserModel `bson:"comments"`
- PermissionUserIDList []string `bson:"permission_user_id_list"`
- Permission int32 `bson:"permission"`
- CreateTime int32 `bson:"create_time"`
-}
-
-type Comment struct {
- UserID string `bson:"user_id" json:"user_id"`
- UserName string `bson:"user_name" json:"user_name"`
- ReplyUserID string `bson:"reply_user_id" json:"reply_user_id"`
- ReplyUserName string `bson:"reply_user_name" json:"reply_user_name"`
- ContentID string `bson:"content_id" json:"content_id"`
- Content string `bson:"content" json:"content"`
- CreateTime int32 `bson:"create_time" json:"create_time"`
-}
-
-func (WorkMoment) TableName() string {
- return CWorkMoment
-}
-
-type WorkMomentModelInterface interface {
- CreateOneWorkMoment(ctx context.Context, workMoment *WorkMoment) error
- DeleteOneWorkMoment(ctx context.Context, workMomentID string) error
- DeleteComment(ctx context.Context, workMomentID, contentID, opUserID string) error
- GetWorkMomentByID(ctx context.Context, workMomentID string) (*WorkMoment, error)
- LikeOneWorkMoment(ctx context.Context, likeUserID, userName, workMomentID string) (*WorkMoment, bool, error)
- CommentOneWorkMoment(ctx context.Context, comment *Comment, workMomentID string) (*WorkMoment, error)
- GetUserSelfWorkMoments(ctx context.Context, userID string, showNumber, pageNumber int32) ([]*WorkMoment, error)
- GetUserWorkMoments(ctx context.Context, opUserID, userID string, showNumber, pageNumber int32, friendIDList []string) ([]*WorkMoment, error)
- GetUserFriendWorkMoments(ctx context.Context, showNumber, pageNumber int32, userID string, friendIDList []string) ([]*WorkMoment, error)
-}
diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go
index a20fb1a65..75ae8c1b5 100644
--- a/pkg/common/db/unrelation/mongo.go
+++ b/pkg/common/db/unrelation/mongo.go
@@ -61,20 +61,8 @@ func (m *Mongo) GetClient() *mongo.Client {
return m.db
}
-func (m *Mongo) CreateTagIndex() {
- if err := m.createMongoIndex(unrelation.CSendLog, false, "send_id", "-send_time"); err != nil {
- panic(err.Error() + " index create failed " + unrelation.CSendLog + " send_id, -send_time")
- }
- if err := m.createMongoIndex(unrelation.CTag, false, "user_id", "-create_time"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CTag + " user_id, -create_time")
- }
- if err := m.createMongoIndex(unrelation.CTag, true, "tag_id"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CTag + " tag_id")
- }
-}
-
func (m *Mongo) CreateMsgIndex() {
- if err := m.createMongoIndex(unrelation.CChat, false, "uid"); err != nil {
+ if err := m.createMongoIndex(unrelation, false, "uid"); err != nil {
fmt.Println(err.Error() + " index create failed " + unrelation.CChat + " uid, please create index by yourself in field uid")
}
}
@@ -88,21 +76,9 @@ func (m *Mongo) CreateSuperGroupIndex() {
}
}
-func (m *Mongo) CreateWorkMomentIndex() {
- if err := m.createMongoIndex(unrelation.CWorkMoment, true, "-create_time", "work_moment_id"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CWorkMoment + " -create_time, work_moment_id")
- }
- if err := m.createMongoIndex(unrelation.CWorkMoment, true, "work_moment_id"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CWorkMoment + " work_moment_id ")
- }
- if err := m.createMongoIndex(unrelation.CWorkMoment, false, "user_id", "-create_time"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CWorkMoment + "user_id, -create_time")
- }
-}
-
func (m *Mongo) CreateExtendMsgSetIndex() {
if err := m.createMongoIndex(unrelation.CExtendMsgSet, true, "-create_time", "work_moment_id"); err != nil {
- panic(err.Error() + "index create failed " + unrelation.CWorkMoment + " -create_time, work_moment_id")
+ panic(err.Error() + "index create failed " + unrelation.CExtendMsgSet + " -create_time, work_moment_id")
}
}
diff --git a/pkg/common/db/unrelation/mongo_model.go b/pkg/common/db/unrelation/mongo_model.go
index 4fec83b98..e0760c0c4 100644
--- a/pkg/common/db/unrelation/mongo_model.go
+++ b/pkg/common/db/unrelation/mongo_model.go
@@ -69,7 +69,7 @@ package unrelation
// return nil
//}
-//func (d *db.DataBases) ReplaceMsgByIndex(suffixUserID string, msg *open_im_sdk.MsgData, operationID string, seqIndex int) error {
+//func (d *db.DataBases) ReplaceMsgByIndex(suffixUserID string, msg *sdkws.MsgData, operationID string, seqIndex int) error {
// log.NewInfo(operationID, utils.GetSelfFuncName(), suffixUserID, *msg)
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
// c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
@@ -90,7 +90,7 @@ package unrelation
// return nil
//}
-//func (d *db.DataBases) ReplaceMsgBySeq(uid string, msg *open_im_sdk.MsgData, operationID string) error {
+//func (d *db.DataBases) ReplaceMsgBySeq(uid string, msg *sdkws.MsgData, operationID string) error {
// log.NewInfo(operationID, utils.GetSelfFuncName(), uid, *msg)
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
// c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
@@ -122,7 +122,7 @@ package unrelation
// return err
//}
//
-//func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+//func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
// log.NewInfo(operationID, utils.GetSelfFuncName(), uid, seqList)
// var hasSeqList []uint32
// singleCount := 0
@@ -153,7 +153,7 @@ package unrelation
// }
// singleCount = 0
// for i := 0; i < len(sChat.Msg); i++ {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
// log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error())
// return nil, err
@@ -217,11 +217,11 @@ package unrelation
// }
// for i, msg := range userChat.Msg {
// if i <= index {
-// msgPb := &open_im_sdk.MsgData{}
+// msgPb := &sdkws.MsgData{}
// if err = proto.Unmarshal(msg.Msg, msgPb); err != nil {
// continue
// }
-// newMsgPb := &open_im_sdk.MsgData{Seq: msgPb.Seq}
+// newMsgPb := &sdkws.MsgData{Seq: msgPb.Seq}
// bytes, err := proto.Marshal(newMsgPb)
// if err != nil {
// continue
@@ -235,7 +235,7 @@ package unrelation
// return replaceMaxSeq, err
//}
//
-//func (d *db.DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
+//func (d *db.DataBases) GetNewestMsg(ID string) (msg *sdkws.MsgData, err error) {
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
// c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
// regex := fmt.Sprintf("^%s", ID)
@@ -251,7 +251,7 @@ package unrelation
// }
// if len(userChats) > 0 {
// if len(userChats[0].Msg) > 0 {
-// msgPb := &open_im_sdk.MsgData{}
+// msgPb := &sdkws.MsgData{}
// err = proto.Unmarshal(userChats[0].Msg[len(userChats[0].Msg)-1].Msg, msgPb)
// if err != nil {
// return nil, utils.Wrap(err, "")
@@ -263,7 +263,7 @@ package unrelation
// return nil, nil
//}
//
-//func (d *db.DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
+//func (d *db.DataBases) GetOldestMsg(ID string) (msg *sdkws.MsgData, err error) {
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
// c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
// regex := fmt.Sprintf("^%s", ID)
@@ -288,7 +288,7 @@ package unrelation
// if len(oldestMsg) == 0 {
// oldestMsg = userChats[0].Msg[len(userChats[0].Msg)-1].Msg
// }
-// msgPb := &open_im_sdk.MsgData{}
+// msgPb := &sdkws.MsgData{}
// err = proto.Unmarshal(oldestMsg, msgPb)
// if err != nil {
// return nil, utils.Wrap(err, "")
@@ -298,7 +298,7 @@ package unrelation
// return nil, nil
//}
//
-//func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+//func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
// var hasSeqList []uint32
// singleCount := 0
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
@@ -325,7 +325,7 @@ package unrelation
// }
// singleCount = 0
// for i := 0; i < len(sChat.Msg); i++ {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
// log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error())
// return nil, err
@@ -349,7 +349,7 @@ package unrelation
// }
// return seqMsg, nil
//}
-//func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+//func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
// var hasSeqList []uint32
// singleCount := 0
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
@@ -376,7 +376,7 @@ package unrelation
// }
// singleCount = 0
// for i := 0; i < len(sChat.Msg); i++ {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
// log.NewError(operationID, "Unmarshal err", seqUid, value, groupID, seqList, err.Error())
// return nil, err
@@ -401,7 +401,7 @@ package unrelation
// return seqMsg, nil
//}
//
-//func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, indexList []int, unexistSeqList []uint32, err error) {
+//func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, indexList []int, unexistSeqList []uint32, err error) {
// ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
// c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
// sChat := UserChat{}
@@ -412,7 +412,7 @@ package unrelation
// singleCount := 0
// var hasSeqList []uint32
// for i := 0; i < len(sChat.Msg); i++ {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
// log.NewError(operationID, "Unmarshal err", msg.String(), err.Error())
// return nil, nil, nil, err
@@ -436,18 +436,18 @@ package unrelation
// return seqMsg, indexList, unexistSeqList, nil
//}
//
-//func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*open_im_sdk.MsgData) {
+//func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*sdkws.MsgData) {
// for _, v := range seqList {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// msg.Seq = v
// exceptionMsg = append(exceptionMsg, msg)
// }
// return exceptionMsg
//}
//
-//func genExceptionSuperGroupMessageBySeqList(seqList []uint32, groupID string) (exceptionMsg []*open_im_sdk.MsgData) {
+//func genExceptionSuperGroupMessageBySeqList(seqList []uint32, groupID string) (exceptionMsg []*sdkws.MsgData) {
// for _, v := range seqList {
-// msg := new(open_im_sdk.MsgData)
+// msg := new(sdkws.MsgData)
// msg.Seq = v
// msg.GroupID = groupID
// msg.SessionType = constant.SuperGroupChatType
@@ -598,13 +598,7 @@ package unrelation
// return utils.Md5(tagName + userID + strconv.Itoa(rand.Int()) + time.Now().String())
//}
-//func generateWorkMomentID(userID string) string {
-// return utils.Md5(userID + strconv.Itoa(rand.Int()) + time.Now().String())
-//}
-//func generateWorkMomentCommentID(workMomentID string) string {
-// return utils.Md5(workMomentID + strconv.Itoa(rand.Int()) + time.Now().String())
-//}
//func getCurrentTimestampByMill() int64 {
// return time.Now().UnixNano() / 1e6
diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go
index 677d00798..96fd280d9 100644
--- a/pkg/common/db/unrelation/msg.go
+++ b/pkg/common/db/unrelation/msg.go
@@ -121,7 +121,7 @@ func (m *MsgMongoDriver) ReplaceMsgByIndex(ctx context.Context, suffixUserID str
return nil
}
-func (d *db.DataBases) ReplaceMsgBySeq(uid string, msg *open_im_sdk.MsgData, operationID string) error {
+func (d *db.DataBases) ReplaceMsgBySeq(uid string, msg *sdkws.MsgData, operationID string) error {
log.NewInfo(operationID, utils.GetSelfFuncName(), uid, *msg)
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
@@ -153,7 +153,7 @@ func (d *db.DataBases) UpdateOneMsgList(msg *UserChat) error {
return err
}
-func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
log.NewInfo(operationID, utils.GetSelfFuncName(), uid, seqList)
var hasSeqList []uint32
singleCount := 0
@@ -184,7 +184,7 @@ func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID
}
singleCount = 0
for i := 0; i < len(sChat.Msg); i++ {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error())
return nil, err
@@ -209,10 +209,11 @@ func (d *db.DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID
return seqMsg, nil
}
-func (d *db.DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) {
+// model
+func (d *db.DataBases) GetUserMsgListByIndex(docID string, index int64) (*UserChat, error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
- regex := fmt.Sprintf("^%s", ID)
+ regex := fmt.Sprintf("^%s", docID)
findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1})
var msgs []UserChat
//primitive.Regex{Pattern: regex}
@@ -231,6 +232,7 @@ func (d *db.DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat,
}
}
+// model
func (d *db.DataBases) DelMongoMsgs(IDList []string) error {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
@@ -238,6 +240,7 @@ func (d *db.DataBases) DelMongoMsgs(IDList []string) error {
return err
}
+// model
func (d *db.DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) (replaceMaxSeq uint32, err error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
@@ -248,11 +251,11 @@ func (d *db.DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) (rep
}
for i, msg := range userChat.Msg {
if i <= index {
- msgPb := &open_im_sdk.MsgData{}
+ msgPb := &sdkws.MsgData{}
if err = proto.Unmarshal(msg.Msg, msgPb); err != nil {
continue
}
- newMsgPb := &open_im_sdk.MsgData{Seq: msgPb.Seq}
+ newMsgPb := &sdkws.MsgData{Seq: msgPb.Seq}
bytes, err := proto.Marshal(newMsgPb)
if err != nil {
continue
@@ -266,7 +269,7 @@ func (d *db.DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) (rep
return replaceMaxSeq, err
}
-func (d *db.DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
+func (d *db.DataBases) GetNewestMsg(ID string) (msg *sdkws.MsgData, err error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
regex := fmt.Sprintf("^%s", ID)
@@ -282,7 +285,7 @@ func (d *db.DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err er
}
if len(userChats) > 0 {
if len(userChats[0].Msg) > 0 {
- msgPb := &open_im_sdk.MsgData{}
+ msgPb := &sdkws.MsgData{}
err = proto.Unmarshal(userChats[0].Msg[len(userChats[0].Msg)-1].Msg, msgPb)
if err != nil {
return nil, utils.Wrap(err, "")
@@ -294,7 +297,7 @@ func (d *db.DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err er
return nil, nil
}
-func (d *db.DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
+func (d *db.DataBases) GetOldestMsg(ID string) (msg *sdkws.MsgData, err error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
regex := fmt.Sprintf("^%s", ID)
@@ -319,7 +322,7 @@ func (d *db.DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err er
if len(oldestMsg) == 0 {
oldestMsg = userChats[0].Msg[len(userChats[0].Msg)-1].Msg
}
- msgPb := &open_im_sdk.MsgData{}
+ msgPb := &sdkws.MsgData{}
err = proto.Unmarshal(oldestMsg, msgPb)
if err != nil {
return nil, utils.Wrap(err, "")
@@ -329,7 +332,7 @@ func (d *db.DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err er
return nil, nil
}
-func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
var hasSeqList []uint32
singleCount := 0
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
@@ -356,7 +359,7 @@ func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, opera
}
singleCount = 0
for i := 0; i < len(sChat.Msg); i++ {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error())
return nil, err
@@ -380,7 +383,7 @@ func (d *db.DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, opera
}
return seqMsg, nil
}
-func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
+func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, err error) {
var hasSeqList []uint32
singleCount := 0
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
@@ -407,7 +410,7 @@ func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []
}
singleCount = 0
for i := 0; i < len(sChat.Msg); i++ {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
log.NewError(operationID, "Unmarshal err", seqUid, value, groupID, seqList, err.Error())
return nil, err
@@ -432,7 +435,7 @@ func (d *db.DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []
return seqMsg, nil
}
-func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, indexList []int, unexistSeqList []uint32, err error) {
+func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, seqList []uint32, operationID string) (seqMsg []*sdkws.MsgData, indexList []int, unexistSeqList []uint32, err error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
sChat := UserChat{}
@@ -443,7 +446,7 @@ func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, s
singleCount := 0
var hasSeqList []uint32
for i := 0; i < len(sChat.Msg); i++ {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil {
log.NewError(operationID, "Unmarshal err", msg.String(), err.Error())
return nil, nil, nil, err
@@ -467,18 +470,18 @@ func (d *db.DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, s
return seqMsg, indexList, unexistSeqList, nil
}
-func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*open_im_sdk.MsgData) {
+func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*sdkws.MsgData) {
for _, v := range seqList {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
msg.Seq = v
exceptionMsg = append(exceptionMsg, msg)
}
return exceptionMsg
}
-func genExceptionSuperGroupMessageBySeqList(seqList []uint32, groupID string) (exceptionMsg []*open_im_sdk.MsgData) {
+func genExceptionSuperGroupMessageBySeqList(seqList []uint32, groupID string) (exceptionMsg []*sdkws.MsgData) {
for _, v := range seqList {
- msg := new(open_im_sdk.MsgData)
+ msg := new(sdkws.MsgData)
msg.Seq = v
msg.GroupID = groupID
msg.SessionType = constant.SuperGroupChatType
diff --git a/pkg/common/db/unrelation/tag.go b/pkg/common/db/unrelation/tag.go
deleted file mode 100644
index 6e61f4260..000000000
--- a/pkg/common/db/unrelation/tag.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package unrelation
-
-import (
- "Open_IM/pkg/common/db/table/unrelation"
- "Open_IM/pkg/utils"
- "context"
- "go.mongodb.org/mongo-driver/bson"
- "go.mongodb.org/mongo-driver/mongo"
- "go.mongodb.org/mongo-driver/mongo/options"
- "math/rand"
- "strconv"
- "time"
-)
-
-type TagMongoDriver struct {
- mgoDB *mongo.Database
- TagCollection *mongo.Collection
- TagSendLogCollection *mongo.Collection
-}
-
-func NewTagMongoDriver(mgoDB *mongo.Database) *TagMongoDriver {
- return &TagMongoDriver{mgoDB: mgoDB, TagCollection: mgoDB.Collection(unrelation.CTag), TagSendLogCollection: mgoDB.Collection(unrelation.CSendLog)}
-}
-
-func (db *TagMongoDriver) generateTagID(tagName, userID string) string {
- return utils.Md5(tagName + userID + strconv.Itoa(rand.Int()) + time.Now().String())
-}
-
-func (db *TagMongoDriver) GetUserTags(ctx context.Context, userID string) ([]unrelation.TagModel, error) {
- var tags []unrelation.TagModel
- cursor, err := db.TagCollection.Find(ctx, bson.M{"user_id": userID})
- if err != nil {
- return tags, err
- }
- if err = cursor.All(ctx, &tags); err != nil {
- return tags, err
- }
- return tags, nil
-}
-
-func (db *TagMongoDriver) CreateTag(ctx context.Context, userID, tagName string, userList []string) error {
- tagID := generateTagID(tagName, userID)
- tag := unrelation.TagModel{
- UserID: userID,
- TagID: tagID,
- TagName: tagName,
- UserList: userList,
- }
- _, err := db.TagCollection.InsertOne(ctx, tag)
- return err
-}
-
-func (db *TagMongoDriver) GetTagByID(ctx context.Context, userID, tagID string) (unrelation.TagModel, error) {
- var tag unrelation.TagModel
- err := db.TagCollection.FindOne(ctx, bson.M{"user_id": userID, "tag_id": tagID}).Decode(&tag)
- return tag, err
-}
-
-func (db *TagMongoDriver) DeleteTag(ctx context.Context, userID, tagID string) error {
- _, err := db.TagCollection.DeleteOne(ctx, bson.M{"user_id": userID, "tag_id": tagID})
- return err
-}
-
-func (db *TagMongoDriver) SetTag(ctx context.Context, userID, tagID, newName string, increaseUserIDList []string, reduceUserIDList []string) error {
- var tag unrelation.TagModel
- if err := db.TagCollection.FindOne(ctx, bson.M{"tag_id": tagID, "user_id": userID}).Decode(&tag); err != nil {
- return err
- }
- if newName != "" {
- _, err := db.TagCollection.UpdateOne(ctx, bson.M{"user_id": userID, "tag_id": tagID}, bson.M{"$set": bson.M{"tag_name": newName}})
- if err != nil {
- return err
- }
- }
- tag.UserList = append(tag.UserList, increaseUserIDList...)
- tag.UserList = utils.RemoveRepeatedStringInList(tag.UserList)
- for _, v := range reduceUserIDList {
- for i2, v2 := range tag.UserList {
- if v == v2 {
- tag.UserList[i2] = ""
- }
- }
- }
- var newUserList []string
- for _, v := range tag.UserList {
- if v != "" {
- newUserList = append(newUserList, v)
- }
- }
- _, err := db.TagCollection.UpdateOne(ctx, bson.M{"user_id": userID, "tag_id": tagID}, bson.M{"$set": bson.M{"user_list": newUserList}})
- if err != nil {
- return err
- }
- return nil
-}
-
-func (db *TagMongoDriver) GetUserIDListByTagID(ctx context.Context, userID, tagID string) ([]string, error) {
- var tag unrelation.TagModel
- err := db.TagCollection.FindOne(ctx, bson.M{"user_id": userID, "tag_id": tagID}).Decode(&tag)
- return tag.UserList, err
-}
-
-func (db *TagMongoDriver) SaveTagSendLog(ctx context.Context, tagSendLog *unrelation.TagSendLogModel) error {
- _, err := db.TagSendLogCollection.InsertOne(ctx, tagSendLog)
- return err
-}
-
-func (db *TagMongoDriver) GetTagSendLogs(ctx context.Context, userID string, showNumber, pageNumber int32) ([]unrelation.TagSendLogModel, error) {
- var tagSendLogs []unrelation.TagSendLogModel
- findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"send_time": -1})
- cursor, err := db.TagSendLogCollection.Find(ctx, bson.M{"send_id": userID}, findOpts)
- if err != nil {
- return tagSendLogs, err
- }
- err = cursor.All(ctx, &tagSendLogs)
- return tagSendLogs, err
-}
diff --git a/pkg/common/db/unrelation/work_moment.go b/pkg/common/db/unrelation/work_moment.go
deleted file mode 100644
index 788e4ea6b..000000000
--- a/pkg/common/db/unrelation/work_moment.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package unrelation
-
-import (
- "Open_IM/pkg/common/config"
- "Open_IM/pkg/common/constant"
- "Open_IM/pkg/common/db/table/unrelation"
- "Open_IM/pkg/utils"
- "context"
- "go.mongodb.org/mongo-driver/bson"
- "go.mongodb.org/mongo-driver/mongo"
- "go.mongodb.org/mongo-driver/mongo/options"
- "math/rand"
- "strconv"
- "time"
-)
-
-type WorkMomentMongoDriver struct {
- mgoDB *mongo.Database
- WorkMomentCollection *mongo.Collection
-}
-
-func NewWorkMomentMongoDriver(mgoDB *mongo.Database) *WorkMomentMongoDriver {
- return &WorkMomentMongoDriver{mgoDB: mgoDB, WorkMomentCollection: mgoDB.Collection(unrelation.CWorkMoment)}
-}
-
-func (db *WorkMomentMongoDriver) generateWorkMomentID(userID string) string {
- return utils.Md5(userID + strconv.Itoa(rand.Int()) + time.Now().String())
-}
-
-func (db *WorkMomentMongoDriver) generateWorkMomentCommentID(workMomentID string) string {
- return utils.Md5(workMomentID + strconv.Itoa(rand.Int()) + time.Now().String())
-}
-
-func (db *WorkMomentMongoDriver) CreateOneWorkMoment(ctx context.Context, workMoment *unrelation.WorkMoment) error {
- workMomentID := db.generateWorkMomentID(workMoment.UserID)
- workMoment.WorkMomentID = workMomentID
- workMoment.CreateTime = int32(time.Now().Unix())
- _, err := db.WorkMomentCollection.InsertOne(ctx, workMoment)
- return err
-}
-
-func (db *WorkMomentMongoDriver) DeleteOneWorkMoment(ctx context.Context, workMomentID string) error {
- _, err := db.WorkMomentCollection.DeleteOne(ctx, bson.M{"work_moment_id": workMomentID})
- return err
-}
-
-func (db *WorkMomentMongoDriver) DeleteComment(ctx context.Context, workMomentID, contentID, opUserID string) error {
- _, err := db.WorkMomentCollection.UpdateOne(ctx, bson.D{{"work_moment_id", workMomentID},
- {"$or", bson.A{
- bson.D{{"user_id", opUserID}},
- bson.D{{"comments", bson.M{"$elemMatch": bson.M{"user_id": opUserID}}}},
- },
- }}, bson.M{"$pull": bson.M{"comments": bson.M{"content_id": contentID}}})
- return err
-}
-
-func (db *WorkMomentMongoDriver) GetWorkMomentByID(ctx context.Context, workMomentID string) (*unrelation.WorkMoment, error) {
- workMoment := &unrelation.WorkMoment{}
- err := db.WorkMomentCollection.FindOne(ctx, bson.M{"work_moment_id": workMomentID}).Decode(workMoment)
- return workMoment, err
-}
-
-func (db *WorkMomentMongoDriver) LikeOneWorkMoment(ctx context.Context, likeUserID, userName, workMomentID string) (*unrelation.WorkMoment, bool, error) {
- workMoment, err := db.GetWorkMomentByID(ctx, workMomentID)
- if err != nil {
- return nil, false, err
- }
- var isAlreadyLike bool
- for i, user := range workMoment.LikeUserList {
- if likeUserID == user.UserID {
- isAlreadyLike = true
- workMoment.LikeUserList = append(workMoment.LikeUserList[0:i], workMoment.LikeUserList[i+1:]...)
- }
- }
- if !isAlreadyLike {
- workMoment.LikeUserList = append(workMoment.LikeUserList, &unrelation.CommonUserModel{UserID: likeUserID, UserName: userName})
- }
- _, err = db.WorkMomentCollection.UpdateOne(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$set": bson.M{"like_user_list": workMoment.LikeUserList}})
- return workMoment, !isAlreadyLike, err
-}
-
-func (db *WorkMomentMongoDriver) CommentOneWorkMoment(ctx context.Context, comment *unrelation.Comment, workMomentID string) (unrelation.WorkMoment, error) {
- comment.ContentID = generateWorkMomentCommentID(workMomentID)
- var workMoment unrelation.WorkMoment
- err := db.WorkMomentCollection.FindOneAndUpdate(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$push": bson.M{"comments": comment}}).Decode(&workMoment)
- return workMoment, err
-}
-
-func (db *WorkMomentMongoDriver) GetUserSelfWorkMoments(ctx context.Context, userID string, showNumber, pageNumber int32) ([]unrelation.WorkMoment, error) {
- var workMomentList []unrelation.WorkMoment
- findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
- result, err := db.WorkMomentCollection.Find(ctx, bson.M{"user_id": userID}, findOpts)
- if err != nil {
- return workMomentList, nil
- }
- err = result.All(ctx, &workMomentList)
- return workMomentList, err
-}
-
-func (db *WorkMomentMongoDriver) GetUserWorkMoments(ctx context.Context, opUserID, userID string, showNumber, pageNumber int32, friendIDList []string) ([]unrelation.WorkMoment, error) {
- var workMomentList []unrelation.WorkMoment
- findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
- result, err := db.WorkMomentCollection.Find(ctx, bson.D{ // 等价条件: select * from
- {"user_id", userID},
- {"$or", bson.A{
- bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{opUserID}}}}},
- bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{opUserID}}}}},
- bson.D{{"permission", constant.WorkMomentPublic}},
- }},
- }, findOpts)
- if err != nil {
- return workMomentList, nil
- }
- err = result.All(ctx, &workMomentList)
- return workMomentList, err
-}
-
-func (db *WorkMomentMongoDriver) GetUserFriendWorkMoments(ctx context.Context, showNumber, pageNumber int32, userID string, friendIDList []string) ([]unrelation.WorkMoment, error) {
- var workMomentList []unrelation.WorkMoment
- findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
- var filter bson.D
- permissionFilter := bson.D{
- {"$or", bson.A{
- bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{userID}}}}},
- bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{userID}}}}},
- bson.D{{"permission", constant.WorkMomentPublic}},
- }}}
- if config.Config.WorkMoment.OnlyFriendCanSee {
- filter = bson.D{
- {"$or", bson.A{
- bson.D{{"user_id", userID}}, //self
- bson.D{{"$and", bson.A{permissionFilter, bson.D{{"user_id", bson.D{{"$in", friendIDList}}}}}}},
- },
- },
- }
- } else {
- filter = bson.D{
- {"$or", bson.A{
- bson.D{{"user_id", userID}}, //self
- permissionFilter,
- },
- },
- }
- }
- result, err := db.WorkMomentCollection.Find(ctx, filter, findOpts)
- if err != nil {
- return workMomentList, err
- }
- err = result.All(ctx, &workMomentList)
- return workMomentList, err
-}
diff --git a/pkg/proto/admincms/admin_cms.pb.go b/pkg/proto/admincms/admin_cms.pb.go
deleted file mode 100644
index eceff09bb..000000000
--- a/pkg/proto/admincms/admin_cms.pb.go
+++ /dev/null
@@ -1,1892 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: admin_cms/admin_cms.proto
-
-package admincms // import "Open_IM/pkg/proto/admin_cms"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import sdkws "Open_IM/pkg/proto/sdkws"
-
-import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type AdminLoginReq struct {
- AdminID string `protobuf:"bytes,2,opt,name=adminID" json:"adminID,omitempty"`
- Secret string `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AdminLoginReq) Reset() { *m = AdminLoginReq{} }
-func (m *AdminLoginReq) String() string { return proto.CompactTextString(m) }
-func (*AdminLoginReq) ProtoMessage() {}
-func (*AdminLoginReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{0}
-}
-func (m *AdminLoginReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AdminLoginReq.Unmarshal(m, b)
-}
-func (m *AdminLoginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AdminLoginReq.Marshal(b, m, deterministic)
-}
-func (dst *AdminLoginReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AdminLoginReq.Merge(dst, src)
-}
-func (m *AdminLoginReq) XXX_Size() int {
- return xxx_messageInfo_AdminLoginReq.Size(m)
-}
-func (m *AdminLoginReq) XXX_DiscardUnknown() {
- xxx_messageInfo_AdminLoginReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AdminLoginReq proto.InternalMessageInfo
-
-func (m *AdminLoginReq) GetAdminID() string {
- if m != nil {
- return m.AdminID
- }
- return ""
-}
-
-func (m *AdminLoginReq) GetSecret() string {
- if m != nil {
- return m.Secret
- }
- return ""
-}
-
-type AdminLoginResp struct {
- Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName" json:"userName,omitempty"`
- FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AdminLoginResp) Reset() { *m = AdminLoginResp{} }
-func (m *AdminLoginResp) String() string { return proto.CompactTextString(m) }
-func (*AdminLoginResp) ProtoMessage() {}
-func (*AdminLoginResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{1}
-}
-func (m *AdminLoginResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AdminLoginResp.Unmarshal(m, b)
-}
-func (m *AdminLoginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AdminLoginResp.Marshal(b, m, deterministic)
-}
-func (dst *AdminLoginResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AdminLoginResp.Merge(dst, src)
-}
-func (m *AdminLoginResp) XXX_Size() int {
- return xxx_messageInfo_AdminLoginResp.Size(m)
-}
-func (m *AdminLoginResp) XXX_DiscardUnknown() {
- xxx_messageInfo_AdminLoginResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AdminLoginResp proto.InternalMessageInfo
-
-func (m *AdminLoginResp) GetToken() string {
- if m != nil {
- return m.Token
- }
- return ""
-}
-
-func (m *AdminLoginResp) GetUserName() string {
- if m != nil {
- return m.UserName
- }
- return ""
-}
-
-func (m *AdminLoginResp) GetFaceURL() string {
- if m != nil {
- return m.FaceURL
- }
- return ""
-}
-
-type GetChatLogsReq struct {
- Content string `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
- SendID string `protobuf:"bytes,2,opt,name=sendID" json:"sendID,omitempty"`
- RecvID string `protobuf:"bytes,3,opt,name=recvID" json:"recvID,omitempty"`
- SendTime string `protobuf:"bytes,4,opt,name=sendTime" json:"sendTime,omitempty"`
- SessionType int32 `protobuf:"varint,5,opt,name=sessionType" json:"sessionType,omitempty"`
- ContentType int32 `protobuf:"varint,6,opt,name=contentType" json:"contentType,omitempty"`
- Pagination *sdkws.RequestPagination `protobuf:"bytes,7,opt,name=pagination" json:"pagination,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetChatLogsReq) Reset() { *m = GetChatLogsReq{} }
-func (m *GetChatLogsReq) String() string { return proto.CompactTextString(m) }
-func (*GetChatLogsReq) ProtoMessage() {}
-func (*GetChatLogsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{2}
-}
-func (m *GetChatLogsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetChatLogsReq.Unmarshal(m, b)
-}
-func (m *GetChatLogsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetChatLogsReq.Marshal(b, m, deterministic)
-}
-func (dst *GetChatLogsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetChatLogsReq.Merge(dst, src)
-}
-func (m *GetChatLogsReq) XXX_Size() int {
- return xxx_messageInfo_GetChatLogsReq.Size(m)
-}
-func (m *GetChatLogsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetChatLogsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetChatLogsReq proto.InternalMessageInfo
-
-func (m *GetChatLogsReq) GetContent() string {
- if m != nil {
- return m.Content
- }
- return ""
-}
-
-func (m *GetChatLogsReq) GetSendID() string {
- if m != nil {
- return m.SendID
- }
- return ""
-}
-
-func (m *GetChatLogsReq) GetRecvID() string {
- if m != nil {
- return m.RecvID
- }
- return ""
-}
-
-func (m *GetChatLogsReq) GetSendTime() string {
- if m != nil {
- return m.SendTime
- }
- return ""
-}
-
-func (m *GetChatLogsReq) GetSessionType() int32 {
- if m != nil {
- return m.SessionType
- }
- return 0
-}
-
-func (m *GetChatLogsReq) GetContentType() int32 {
- if m != nil {
- return m.ContentType
- }
- return 0
-}
-
-func (m *GetChatLogsReq) GetPagination() *sdkws.RequestPagination {
- if m != nil {
- return m.Pagination
- }
- return nil
-}
-
-type ChatLog struct {
- ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID" json:"serverMsgID,omitempty"`
- ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"`
- SendID string `protobuf:"bytes,3,opt,name=sendID" json:"sendID,omitempty"`
- RecvID string `protobuf:"bytes,4,opt,name=recvID" json:"recvID,omitempty"`
- GroupID string `protobuf:"bytes,5,opt,name=groupID" json:"groupID,omitempty"`
- RecvNickname string `protobuf:"bytes,6,opt,name=recvNickname" json:"recvNickname,omitempty"`
- SenderPlatformID int32 `protobuf:"varint,7,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"`
- SenderNickname string `protobuf:"bytes,8,opt,name=senderNickname" json:"senderNickname,omitempty"`
- SenderFaceURL string `protobuf:"bytes,9,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"`
- GroupName string `protobuf:"bytes,10,opt,name=groupName" json:"groupName,omitempty"`
- SessionType int32 `protobuf:"varint,11,opt,name=sessionType" json:"sessionType,omitempty"`
- MsgFrom int32 `protobuf:"varint,12,opt,name=msgFrom" json:"msgFrom,omitempty"`
- ContentType int32 `protobuf:"varint,13,opt,name=contentType" json:"contentType,omitempty"`
- Content string `protobuf:"bytes,14,opt,name=content" json:"content,omitempty"`
- Status int32 `protobuf:"varint,15,opt,name=status" json:"status,omitempty"`
- SendTime int64 `protobuf:"varint,16,opt,name=sendTime" json:"sendTime,omitempty"`
- CreateTime int64 `protobuf:"varint,17,opt,name=createTime" json:"createTime,omitempty"`
- Ex string `protobuf:"bytes,18,opt,name=ex" json:"ex,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ChatLog) Reset() { *m = ChatLog{} }
-func (m *ChatLog) String() string { return proto.CompactTextString(m) }
-func (*ChatLog) ProtoMessage() {}
-func (*ChatLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{3}
-}
-func (m *ChatLog) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ChatLog.Unmarshal(m, b)
-}
-func (m *ChatLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ChatLog.Marshal(b, m, deterministic)
-}
-func (dst *ChatLog) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ChatLog.Merge(dst, src)
-}
-func (m *ChatLog) XXX_Size() int {
- return xxx_messageInfo_ChatLog.Size(m)
-}
-func (m *ChatLog) XXX_DiscardUnknown() {
- xxx_messageInfo_ChatLog.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ChatLog proto.InternalMessageInfo
-
-func (m *ChatLog) GetServerMsgID() string {
- if m != nil {
- return m.ServerMsgID
- }
- return ""
-}
-
-func (m *ChatLog) GetClientMsgID() string {
- if m != nil {
- return m.ClientMsgID
- }
- return ""
-}
-
-func (m *ChatLog) GetSendID() string {
- if m != nil {
- return m.SendID
- }
- return ""
-}
-
-func (m *ChatLog) GetRecvID() string {
- if m != nil {
- return m.RecvID
- }
- return ""
-}
-
-func (m *ChatLog) GetGroupID() string {
- if m != nil {
- return m.GroupID
- }
- return ""
-}
-
-func (m *ChatLog) GetRecvNickname() string {
- if m != nil {
- return m.RecvNickname
- }
- return ""
-}
-
-func (m *ChatLog) GetSenderPlatformID() int32 {
- if m != nil {
- return m.SenderPlatformID
- }
- return 0
-}
-
-func (m *ChatLog) GetSenderNickname() string {
- if m != nil {
- return m.SenderNickname
- }
- return ""
-}
-
-func (m *ChatLog) GetSenderFaceURL() string {
- if m != nil {
- return m.SenderFaceURL
- }
- return ""
-}
-
-func (m *ChatLog) GetGroupName() string {
- if m != nil {
- return m.GroupName
- }
- return ""
-}
-
-func (m *ChatLog) GetSessionType() int32 {
- if m != nil {
- return m.SessionType
- }
- return 0
-}
-
-func (m *ChatLog) GetMsgFrom() int32 {
- if m != nil {
- return m.MsgFrom
- }
- return 0
-}
-
-func (m *ChatLog) GetContentType() int32 {
- if m != nil {
- return m.ContentType
- }
- return 0
-}
-
-func (m *ChatLog) GetContent() string {
- if m != nil {
- return m.Content
- }
- return ""
-}
-
-func (m *ChatLog) GetStatus() int32 {
- if m != nil {
- return m.Status
- }
- return 0
-}
-
-func (m *ChatLog) GetSendTime() int64 {
- if m != nil {
- return m.SendTime
- }
- return 0
-}
-
-func (m *ChatLog) GetCreateTime() int64 {
- if m != nil {
- return m.CreateTime
- }
- return 0
-}
-
-func (m *ChatLog) GetEx() string {
- if m != nil {
- return m.Ex
- }
- return ""
-}
-
-type GetChatLogsResp struct {
- ChatLogs []*ChatLog `protobuf:"bytes,1,rep,name=chatLogs" json:"chatLogs,omitempty"`
- ChatLogsNum int32 `protobuf:"varint,2,opt,name=chatLogsNum" json:"chatLogsNum,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetChatLogsResp) Reset() { *m = GetChatLogsResp{} }
-func (m *GetChatLogsResp) String() string { return proto.CompactTextString(m) }
-func (*GetChatLogsResp) ProtoMessage() {}
-func (*GetChatLogsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{4}
-}
-func (m *GetChatLogsResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetChatLogsResp.Unmarshal(m, b)
-}
-func (m *GetChatLogsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetChatLogsResp.Marshal(b, m, deterministic)
-}
-func (dst *GetChatLogsResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetChatLogsResp.Merge(dst, src)
-}
-func (m *GetChatLogsResp) XXX_Size() int {
- return xxx_messageInfo_GetChatLogsResp.Size(m)
-}
-func (m *GetChatLogsResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetChatLogsResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetChatLogsResp proto.InternalMessageInfo
-
-func (m *GetChatLogsResp) GetChatLogs() []*ChatLog {
- if m != nil {
- return m.ChatLogs
- }
- return nil
-}
-
-func (m *GetChatLogsResp) GetChatLogsNum() int32 {
- if m != nil {
- return m.ChatLogsNum
- }
- return 0
-}
-
-type StatisticsReq struct {
- From string `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
- To string `protobuf:"bytes,2,opt,name=to" json:"to,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StatisticsReq) Reset() { *m = StatisticsReq{} }
-func (m *StatisticsReq) String() string { return proto.CompactTextString(m) }
-func (*StatisticsReq) ProtoMessage() {}
-func (*StatisticsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{5}
-}
-func (m *StatisticsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StatisticsReq.Unmarshal(m, b)
-}
-func (m *StatisticsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StatisticsReq.Marshal(b, m, deterministic)
-}
-func (dst *StatisticsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StatisticsReq.Merge(dst, src)
-}
-func (m *StatisticsReq) XXX_Size() int {
- return xxx_messageInfo_StatisticsReq.Size(m)
-}
-func (m *StatisticsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_StatisticsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StatisticsReq proto.InternalMessageInfo
-
-func (m *StatisticsReq) GetFrom() string {
- if m != nil {
- return m.From
- }
- return ""
-}
-
-func (m *StatisticsReq) GetTo() string {
- if m != nil {
- return m.To
- }
- return ""
-}
-
-type GetActiveUserReq struct {
- StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=statisticsReq" json:"statisticsReq,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetActiveUserReq) Reset() { *m = GetActiveUserReq{} }
-func (m *GetActiveUserReq) String() string { return proto.CompactTextString(m) }
-func (*GetActiveUserReq) ProtoMessage() {}
-func (*GetActiveUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{6}
-}
-func (m *GetActiveUserReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetActiveUserReq.Unmarshal(m, b)
-}
-func (m *GetActiveUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetActiveUserReq.Marshal(b, m, deterministic)
-}
-func (dst *GetActiveUserReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetActiveUserReq.Merge(dst, src)
-}
-func (m *GetActiveUserReq) XXX_Size() int {
- return xxx_messageInfo_GetActiveUserReq.Size(m)
-}
-func (m *GetActiveUserReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetActiveUserReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetActiveUserReq proto.InternalMessageInfo
-
-func (m *GetActiveUserReq) GetStatisticsReq() *StatisticsReq {
- if m != nil {
- return m.StatisticsReq
- }
- return nil
-}
-
-type UserResp struct {
- NickName string `protobuf:"bytes,1,opt,name=nickName" json:"nickName,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
- MessageNum int32 `protobuf:"varint,3,opt,name=messageNum" json:"messageNum,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UserResp) Reset() { *m = UserResp{} }
-func (m *UserResp) String() string { return proto.CompactTextString(m) }
-func (*UserResp) ProtoMessage() {}
-func (*UserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{7}
-}
-func (m *UserResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserResp.Unmarshal(m, b)
-}
-func (m *UserResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserResp.Marshal(b, m, deterministic)
-}
-func (dst *UserResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserResp.Merge(dst, src)
-}
-func (m *UserResp) XXX_Size() int {
- return xxx_messageInfo_UserResp.Size(m)
-}
-func (m *UserResp) XXX_DiscardUnknown() {
- xxx_messageInfo_UserResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UserResp proto.InternalMessageInfo
-
-func (m *UserResp) GetNickName() string {
- if m != nil {
- return m.NickName
- }
- return ""
-}
-
-func (m *UserResp) GetUserID() string {
- if m != nil {
- return m.UserID
- }
- return ""
-}
-
-func (m *UserResp) GetMessageNum() int32 {
- if m != nil {
- return m.MessageNum
- }
- return 0
-}
-
-type GetActiveUserResp struct {
- Users []*UserResp `protobuf:"bytes,1,rep,name=Users" json:"Users,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetActiveUserResp) Reset() { *m = GetActiveUserResp{} }
-func (m *GetActiveUserResp) String() string { return proto.CompactTextString(m) }
-func (*GetActiveUserResp) ProtoMessage() {}
-func (*GetActiveUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{8}
-}
-func (m *GetActiveUserResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetActiveUserResp.Unmarshal(m, b)
-}
-func (m *GetActiveUserResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetActiveUserResp.Marshal(b, m, deterministic)
-}
-func (dst *GetActiveUserResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetActiveUserResp.Merge(dst, src)
-}
-func (m *GetActiveUserResp) XXX_Size() int {
- return xxx_messageInfo_GetActiveUserResp.Size(m)
-}
-func (m *GetActiveUserResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetActiveUserResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetActiveUserResp proto.InternalMessageInfo
-
-func (m *GetActiveUserResp) GetUsers() []*UserResp {
- if m != nil {
- return m.Users
- }
- return nil
-}
-
-type GetActiveGroupReq struct {
- StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=statisticsReq" json:"statisticsReq,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetActiveGroupReq) Reset() { *m = GetActiveGroupReq{} }
-func (m *GetActiveGroupReq) String() string { return proto.CompactTextString(m) }
-func (*GetActiveGroupReq) ProtoMessage() {}
-func (*GetActiveGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{9}
-}
-func (m *GetActiveGroupReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetActiveGroupReq.Unmarshal(m, b)
-}
-func (m *GetActiveGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetActiveGroupReq.Marshal(b, m, deterministic)
-}
-func (dst *GetActiveGroupReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetActiveGroupReq.Merge(dst, src)
-}
-func (m *GetActiveGroupReq) XXX_Size() int {
- return xxx_messageInfo_GetActiveGroupReq.Size(m)
-}
-func (m *GetActiveGroupReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetActiveGroupReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetActiveGroupReq proto.InternalMessageInfo
-
-func (m *GetActiveGroupReq) GetStatisticsReq() *StatisticsReq {
- if m != nil {
- return m.StatisticsReq
- }
- return nil
-}
-
-type GroupResp struct {
- GroupName string `protobuf:"bytes,1,opt,name=GroupName" json:"GroupName,omitempty"`
- GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"`
- MessageNum int32 `protobuf:"varint,3,opt,name=MessageNum" json:"MessageNum,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GroupResp) Reset() { *m = GroupResp{} }
-func (m *GroupResp) String() string { return proto.CompactTextString(m) }
-func (*GroupResp) ProtoMessage() {}
-func (*GroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{10}
-}
-func (m *GroupResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GroupResp.Unmarshal(m, b)
-}
-func (m *GroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GroupResp.Marshal(b, m, deterministic)
-}
-func (dst *GroupResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GroupResp.Merge(dst, src)
-}
-func (m *GroupResp) XXX_Size() int {
- return xxx_messageInfo_GroupResp.Size(m)
-}
-func (m *GroupResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GroupResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GroupResp proto.InternalMessageInfo
-
-func (m *GroupResp) GetGroupName() string {
- if m != nil {
- return m.GroupName
- }
- return ""
-}
-
-func (m *GroupResp) GetGroupID() string {
- if m != nil {
- return m.GroupID
- }
- return ""
-}
-
-func (m *GroupResp) GetMessageNum() int32 {
- if m != nil {
- return m.MessageNum
- }
- return 0
-}
-
-type GetActiveGroupResp struct {
- Groups []*GroupResp `protobuf:"bytes,1,rep,name=Groups" json:"Groups,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetActiveGroupResp) Reset() { *m = GetActiveGroupResp{} }
-func (m *GetActiveGroupResp) String() string { return proto.CompactTextString(m) }
-func (*GetActiveGroupResp) ProtoMessage() {}
-func (*GetActiveGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{11}
-}
-func (m *GetActiveGroupResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetActiveGroupResp.Unmarshal(m, b)
-}
-func (m *GetActiveGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetActiveGroupResp.Marshal(b, m, deterministic)
-}
-func (dst *GetActiveGroupResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetActiveGroupResp.Merge(dst, src)
-}
-func (m *GetActiveGroupResp) XXX_Size() int {
- return xxx_messageInfo_GetActiveGroupResp.Size(m)
-}
-func (m *GetActiveGroupResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetActiveGroupResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetActiveGroupResp proto.InternalMessageInfo
-
-func (m *GetActiveGroupResp) GetGroups() []*GroupResp {
- if m != nil {
- return m.Groups
- }
- return nil
-}
-
-type DateNumList struct {
- Date string `protobuf:"bytes,1,opt,name=Date" json:"Date,omitempty"`
- Num int32 `protobuf:"varint,2,opt,name=Num" json:"Num,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DateNumList) Reset() { *m = DateNumList{} }
-func (m *DateNumList) String() string { return proto.CompactTextString(m) }
-func (*DateNumList) ProtoMessage() {}
-func (*DateNumList) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{12}
-}
-func (m *DateNumList) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DateNumList.Unmarshal(m, b)
-}
-func (m *DateNumList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DateNumList.Marshal(b, m, deterministic)
-}
-func (dst *DateNumList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DateNumList.Merge(dst, src)
-}
-func (m *DateNumList) XXX_Size() int {
- return xxx_messageInfo_DateNumList.Size(m)
-}
-func (m *DateNumList) XXX_DiscardUnknown() {
- xxx_messageInfo_DateNumList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DateNumList proto.InternalMessageInfo
-
-func (m *DateNumList) GetDate() string {
- if m != nil {
- return m.Date
- }
- return ""
-}
-
-func (m *DateNumList) GetNum() int32 {
- if m != nil {
- return m.Num
- }
- return 0
-}
-
-type GetMessageStatisticsReq struct {
- StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq" json:"StatisticsReq,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetMessageStatisticsReq) Reset() { *m = GetMessageStatisticsReq{} }
-func (m *GetMessageStatisticsReq) String() string { return proto.CompactTextString(m) }
-func (*GetMessageStatisticsReq) ProtoMessage() {}
-func (*GetMessageStatisticsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{13}
-}
-func (m *GetMessageStatisticsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetMessageStatisticsReq.Unmarshal(m, b)
-}
-func (m *GetMessageStatisticsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetMessageStatisticsReq.Marshal(b, m, deterministic)
-}
-func (dst *GetMessageStatisticsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetMessageStatisticsReq.Merge(dst, src)
-}
-func (m *GetMessageStatisticsReq) XXX_Size() int {
- return xxx_messageInfo_GetMessageStatisticsReq.Size(m)
-}
-func (m *GetMessageStatisticsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetMessageStatisticsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetMessageStatisticsReq proto.InternalMessageInfo
-
-func (m *GetMessageStatisticsReq) GetStatisticsReq() *StatisticsReq {
- if m != nil {
- return m.StatisticsReq
- }
- return nil
-}
-
-type GetMessageStatisticsResp struct {
- PrivateMessageNum int32 `protobuf:"varint,1,opt,name=PrivateMessageNum" json:"PrivateMessageNum,omitempty"`
- GroupMessageNum int32 `protobuf:"varint,2,opt,name=GroupMessageNum" json:"GroupMessageNum,omitempty"`
- PrivateMessageNumList []*DateNumList `protobuf:"bytes,3,rep,name=PrivateMessageNumList" json:"PrivateMessageNumList,omitempty"`
- GroupMessageNumList []*DateNumList `protobuf:"bytes,4,rep,name=GroupMessageNumList" json:"GroupMessageNumList,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetMessageStatisticsResp) Reset() { *m = GetMessageStatisticsResp{} }
-func (m *GetMessageStatisticsResp) String() string { return proto.CompactTextString(m) }
-func (*GetMessageStatisticsResp) ProtoMessage() {}
-func (*GetMessageStatisticsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{14}
-}
-func (m *GetMessageStatisticsResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetMessageStatisticsResp.Unmarshal(m, b)
-}
-func (m *GetMessageStatisticsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetMessageStatisticsResp.Marshal(b, m, deterministic)
-}
-func (dst *GetMessageStatisticsResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetMessageStatisticsResp.Merge(dst, src)
-}
-func (m *GetMessageStatisticsResp) XXX_Size() int {
- return xxx_messageInfo_GetMessageStatisticsResp.Size(m)
-}
-func (m *GetMessageStatisticsResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetMessageStatisticsResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetMessageStatisticsResp proto.InternalMessageInfo
-
-func (m *GetMessageStatisticsResp) GetSingleChatMessageNum() int32 {
- if m != nil {
- return m.PrivateMessageNum
- }
- return 0
-}
-
-func (m *GetMessageStatisticsResp) GetGroupMessageNum() int32 {
- if m != nil {
- return m.GroupMessageNum
- }
- return 0
-}
-
-func (m *GetMessageStatisticsResp) GetSingleChatMessageNumList() []*DateNumList {
- if m != nil {
- return m.PrivateMessageNumList
- }
- return nil
-}
-
-func (m *GetMessageStatisticsResp) GetGroupMessageNumList() []*DateNumList {
- if m != nil {
- return m.GroupMessageNumList
- }
- return nil
-}
-
-type GetGroupStatisticsReq struct {
- StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq" json:"StatisticsReq,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetGroupStatisticsReq) Reset() { *m = GetGroupStatisticsReq{} }
-func (m *GetGroupStatisticsReq) String() string { return proto.CompactTextString(m) }
-func (*GetGroupStatisticsReq) ProtoMessage() {}
-func (*GetGroupStatisticsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{15}
-}
-func (m *GetGroupStatisticsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetGroupStatisticsReq.Unmarshal(m, b)
-}
-func (m *GetGroupStatisticsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetGroupStatisticsReq.Marshal(b, m, deterministic)
-}
-func (dst *GetGroupStatisticsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetGroupStatisticsReq.Merge(dst, src)
-}
-func (m *GetGroupStatisticsReq) XXX_Size() int {
- return xxx_messageInfo_GetGroupStatisticsReq.Size(m)
-}
-func (m *GetGroupStatisticsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetGroupStatisticsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetGroupStatisticsReq proto.InternalMessageInfo
-
-func (m *GetGroupStatisticsReq) GetStatisticsReq() *StatisticsReq {
- if m != nil {
- return m.StatisticsReq
- }
- return nil
-}
-
-type GetGroupStatisticsResp struct {
- IncreaseGroupNum int32 `protobuf:"varint,1,opt,name=IncreaseGroupNum" json:"IncreaseGroupNum,omitempty"`
- TotalGroupNum int32 `protobuf:"varint,2,opt,name=TotalGroupNum" json:"TotalGroupNum,omitempty"`
- IncreaseGroupNumList []*DateNumList `protobuf:"bytes,3,rep,name=IncreaseGroupNumList" json:"IncreaseGroupNumList,omitempty"`
- TotalGroupNumList []*DateNumList `protobuf:"bytes,4,rep,name=TotalGroupNumList" json:"TotalGroupNumList,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetGroupStatisticsResp) Reset() { *m = GetGroupStatisticsResp{} }
-func (m *GetGroupStatisticsResp) String() string { return proto.CompactTextString(m) }
-func (*GetGroupStatisticsResp) ProtoMessage() {}
-func (*GetGroupStatisticsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{16}
-}
-func (m *GetGroupStatisticsResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetGroupStatisticsResp.Unmarshal(m, b)
-}
-func (m *GetGroupStatisticsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetGroupStatisticsResp.Marshal(b, m, deterministic)
-}
-func (dst *GetGroupStatisticsResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetGroupStatisticsResp.Merge(dst, src)
-}
-func (m *GetGroupStatisticsResp) XXX_Size() int {
- return xxx_messageInfo_GetGroupStatisticsResp.Size(m)
-}
-func (m *GetGroupStatisticsResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetGroupStatisticsResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetGroupStatisticsResp proto.InternalMessageInfo
-
-func (m *GetGroupStatisticsResp) GetIncreaseGroupNum() int32 {
- if m != nil {
- return m.IncreaseGroupNum
- }
- return 0
-}
-
-func (m *GetGroupStatisticsResp) GetTotalGroupNum() int32 {
- if m != nil {
- return m.TotalGroupNum
- }
- return 0
-}
-
-func (m *GetGroupStatisticsResp) GetIncreaseGroupNumList() []*DateNumList {
- if m != nil {
- return m.IncreaseGroupNumList
- }
- return nil
-}
-
-func (m *GetGroupStatisticsResp) GetTotalGroupNumList() []*DateNumList {
- if m != nil {
- return m.TotalGroupNumList
- }
- return nil
-}
-
-type GetUserStatisticsReq struct {
- StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq" json:"StatisticsReq,omitempty"`
- OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserStatisticsReq) Reset() { *m = GetUserStatisticsReq{} }
-func (m *GetUserStatisticsReq) String() string { return proto.CompactTextString(m) }
-func (*GetUserStatisticsReq) ProtoMessage() {}
-func (*GetUserStatisticsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{17}
-}
-func (m *GetUserStatisticsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserStatisticsReq.Unmarshal(m, b)
-}
-func (m *GetUserStatisticsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserStatisticsReq.Marshal(b, m, deterministic)
-}
-func (dst *GetUserStatisticsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserStatisticsReq.Merge(dst, src)
-}
-func (m *GetUserStatisticsReq) XXX_Size() int {
- return xxx_messageInfo_GetUserStatisticsReq.Size(m)
-}
-func (m *GetUserStatisticsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserStatisticsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserStatisticsReq proto.InternalMessageInfo
-
-func (m *GetUserStatisticsReq) GetStatisticsReq() *StatisticsReq {
- if m != nil {
- return m.StatisticsReq
- }
- return nil
-}
-
-func (m *GetUserStatisticsReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
- }
- return ""
-}
-
-type GetUserStatisticsResp struct {
- IncreaseUserNum int32 `protobuf:"varint,1,opt,name=IncreaseUserNum" json:"IncreaseUserNum,omitempty"`
- ActiveUserNum int32 `protobuf:"varint,2,opt,name=ActiveUserNum" json:"ActiveUserNum,omitempty"`
- TotalUserNum int32 `protobuf:"varint,3,opt,name=TotalUserNum" json:"TotalUserNum,omitempty"`
- IncreaseUserNumList []*DateNumList `protobuf:"bytes,4,rep,name=IncreaseUserNumList" json:"IncreaseUserNumList,omitempty"`
- ActiveUserNumList []*DateNumList `protobuf:"bytes,5,rep,name=ActiveUserNumList" json:"ActiveUserNumList,omitempty"`
- TotalUserNumList []*DateNumList `protobuf:"bytes,6,rep,name=TotalUserNumList" json:"TotalUserNumList,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserStatisticsResp) Reset() { *m = GetUserStatisticsResp{} }
-func (m *GetUserStatisticsResp) String() string { return proto.CompactTextString(m) }
-func (*GetUserStatisticsResp) ProtoMessage() {}
-func (*GetUserStatisticsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{18}
-}
-func (m *GetUserStatisticsResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserStatisticsResp.Unmarshal(m, b)
-}
-func (m *GetUserStatisticsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserStatisticsResp.Marshal(b, m, deterministic)
-}
-func (dst *GetUserStatisticsResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserStatisticsResp.Merge(dst, src)
-}
-func (m *GetUserStatisticsResp) XXX_Size() int {
- return xxx_messageInfo_GetUserStatisticsResp.Size(m)
-}
-func (m *GetUserStatisticsResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserStatisticsResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserStatisticsResp proto.InternalMessageInfo
-
-func (m *GetUserStatisticsResp) GetIncreaseUserNum() int32 {
- if m != nil {
- return m.IncreaseUserNum
- }
- return 0
-}
-
-func (m *GetUserStatisticsResp) GetActiveUserNum() int32 {
- if m != nil {
- return m.ActiveUserNum
- }
- return 0
-}
-
-func (m *GetUserStatisticsResp) GetTotalUserNum() int32 {
- if m != nil {
- return m.TotalUserNum
- }
- return 0
-}
-
-func (m *GetUserStatisticsResp) GetIncreaseUserNumList() []*DateNumList {
- if m != nil {
- return m.IncreaseUserNumList
- }
- return nil
-}
-
-func (m *GetUserStatisticsResp) GetActiveUserNumList() []*DateNumList {
- if m != nil {
- return m.ActiveUserNumList
- }
- return nil
-}
-
-func (m *GetUserStatisticsResp) GetTotalUserNumList() []*DateNumList {
- if m != nil {
- return m.TotalUserNumList
- }
- return nil
-}
-
-type GetUserFriendsReq struct {
- OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
- FriendUserID string `protobuf:"bytes,3,opt,name=friendUserID" json:"friendUserID,omitempty"`
- FriendUserName string `protobuf:"bytes,4,opt,name=friendUserName" json:"friendUserName,omitempty"`
- Pagination *sdkws.RequestPagination `protobuf:"bytes,5,opt,name=pagination" json:"pagination,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserFriendsReq) Reset() { *m = GetUserFriendsReq{} }
-func (m *GetUserFriendsReq) String() string { return proto.CompactTextString(m) }
-func (*GetUserFriendsReq) ProtoMessage() {}
-func (*GetUserFriendsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{19}
-}
-func (m *GetUserFriendsReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserFriendsReq.Unmarshal(m, b)
-}
-func (m *GetUserFriendsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserFriendsReq.Marshal(b, m, deterministic)
-}
-func (dst *GetUserFriendsReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserFriendsReq.Merge(dst, src)
-}
-func (m *GetUserFriendsReq) XXX_Size() int {
- return xxx_messageInfo_GetUserFriendsReq.Size(m)
-}
-func (m *GetUserFriendsReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserFriendsReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserFriendsReq proto.InternalMessageInfo
-
-func (m *GetUserFriendsReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
- }
- return ""
-}
-
-func (m *GetUserFriendsReq) GetUserID() string {
- if m != nil {
- return m.UserID
- }
- return ""
-}
-
-func (m *GetUserFriendsReq) GetFriendUserID() string {
- if m != nil {
- return m.FriendUserID
- }
- return ""
-}
-
-func (m *GetUserFriendsReq) GetFriendUserName() string {
- if m != nil {
- return m.FriendUserName
- }
- return ""
-}
-
-func (m *GetUserFriendsReq) GetPagination() *sdkws.RequestPagination {
- if m != nil {
- return m.Pagination
- }
- return nil
-}
-
-type GetUserFriendsResp struct {
- FriendInfoList []*sdkws.FriendInfo `protobuf:"bytes,2,rep,name=friendInfoList" json:"friendInfoList,omitempty"`
- FriendNums int32 `protobuf:"varint,3,opt,name=friendNums" json:"friendNums,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserFriendsResp) Reset() { *m = GetUserFriendsResp{} }
-func (m *GetUserFriendsResp) String() string { return proto.CompactTextString(m) }
-func (*GetUserFriendsResp) ProtoMessage() {}
-func (*GetUserFriendsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{20}
-}
-func (m *GetUserFriendsResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserFriendsResp.Unmarshal(m, b)
-}
-func (m *GetUserFriendsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserFriendsResp.Marshal(b, m, deterministic)
-}
-func (dst *GetUserFriendsResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserFriendsResp.Merge(dst, src)
-}
-func (m *GetUserFriendsResp) XXX_Size() int {
- return xxx_messageInfo_GetUserFriendsResp.Size(m)
-}
-func (m *GetUserFriendsResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserFriendsResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserFriendsResp proto.InternalMessageInfo
-
-func (m *GetUserFriendsResp) GetFriendInfoList() []*sdkws.FriendInfo {
- if m != nil {
- return m.FriendInfoList
- }
- return nil
-}
-
-func (m *GetUserFriendsResp) GetFriendNums() int32 {
- if m != nil {
- return m.FriendNums
- }
- return 0
-}
-
-type GetUserIDByEmailAndPhoneNumberReq struct {
- Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
- PhoneNumber string `protobuf:"bytes,3,opt,name=phoneNumber" json:"phoneNumber,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserIDByEmailAndPhoneNumberReq) Reset() { *m = GetUserIDByEmailAndPhoneNumberReq{} }
-func (m *GetUserIDByEmailAndPhoneNumberReq) String() string { return proto.CompactTextString(m) }
-func (*GetUserIDByEmailAndPhoneNumberReq) ProtoMessage() {}
-func (*GetUserIDByEmailAndPhoneNumberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{21}
-}
-func (m *GetUserIDByEmailAndPhoneNumberReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq.Unmarshal(m, b)
-}
-func (m *GetUserIDByEmailAndPhoneNumberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq.Marshal(b, m, deterministic)
-}
-func (dst *GetUserIDByEmailAndPhoneNumberReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq.Merge(dst, src)
-}
-func (m *GetUserIDByEmailAndPhoneNumberReq) XXX_Size() int {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq.Size(m)
-}
-func (m *GetUserIDByEmailAndPhoneNumberReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserIDByEmailAndPhoneNumberReq proto.InternalMessageInfo
-
-func (m *GetUserIDByEmailAndPhoneNumberReq) GetEmail() string {
- if m != nil {
- return m.Email
- }
- return ""
-}
-
-func (m *GetUserIDByEmailAndPhoneNumberReq) GetPhoneNumber() string {
- if m != nil {
- return m.PhoneNumber
- }
- return ""
-}
-
-type GetUserIDByEmailAndPhoneNumberResp struct {
- UserIDList []string `protobuf:"bytes,1,rep,name=userIDList" json:"userIDList,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserIDByEmailAndPhoneNumberResp) Reset() { *m = GetUserIDByEmailAndPhoneNumberResp{} }
-func (m *GetUserIDByEmailAndPhoneNumberResp) String() string { return proto.CompactTextString(m) }
-func (*GetUserIDByEmailAndPhoneNumberResp) ProtoMessage() {}
-func (*GetUserIDByEmailAndPhoneNumberResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{22}
-}
-func (m *GetUserIDByEmailAndPhoneNumberResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp.Unmarshal(m, b)
-}
-func (m *GetUserIDByEmailAndPhoneNumberResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp.Marshal(b, m, deterministic)
-}
-func (dst *GetUserIDByEmailAndPhoneNumberResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp.Merge(dst, src)
-}
-func (m *GetUserIDByEmailAndPhoneNumberResp) XXX_Size() int {
- return xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp.Size(m)
-}
-func (m *GetUserIDByEmailAndPhoneNumberResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserIDByEmailAndPhoneNumberResp proto.InternalMessageInfo
-
-func (m *GetUserIDByEmailAndPhoneNumberResp) GetUserIDList() []string {
- if m != nil {
- return m.UserIDList
- }
- return nil
-}
-
-type GetUserTokenReq struct {
- UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
- PlatformID int32 `protobuf:"varint,2,opt,name=platformID" json:"platformID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserTokenReq) Reset() { *m = GetUserTokenReq{} }
-func (m *GetUserTokenReq) String() string { return proto.CompactTextString(m) }
-func (*GetUserTokenReq) ProtoMessage() {}
-func (*GetUserTokenReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{23}
-}
-func (m *GetUserTokenReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserTokenReq.Unmarshal(m, b)
-}
-func (m *GetUserTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserTokenReq.Marshal(b, m, deterministic)
-}
-func (dst *GetUserTokenReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserTokenReq.Merge(dst, src)
-}
-func (m *GetUserTokenReq) XXX_Size() int {
- return xxx_messageInfo_GetUserTokenReq.Size(m)
-}
-func (m *GetUserTokenReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserTokenReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserTokenReq proto.InternalMessageInfo
-
-func (m *GetUserTokenReq) GetUserID() string {
- if m != nil {
- return m.UserID
- }
- return ""
-}
-
-func (m *GetUserTokenReq) GetPlatformID() int32 {
- if m != nil {
- return m.PlatformID
- }
- return 0
-}
-
-type GetUserTokenResp struct {
- Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
- ExpTime int64 `protobuf:"varint,2,opt,name=expTime" json:"expTime,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetUserTokenResp) Reset() { *m = GetUserTokenResp{} }
-func (m *GetUserTokenResp) String() string { return proto.CompactTextString(m) }
-func (*GetUserTokenResp) ProtoMessage() {}
-func (*GetUserTokenResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_admin_cms_d71cb129508715a2, []int{24}
-}
-func (m *GetUserTokenResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetUserTokenResp.Unmarshal(m, b)
-}
-func (m *GetUserTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetUserTokenResp.Marshal(b, m, deterministic)
-}
-func (dst *GetUserTokenResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetUserTokenResp.Merge(dst, src)
-}
-func (m *GetUserTokenResp) XXX_Size() int {
- return xxx_messageInfo_GetUserTokenResp.Size(m)
-}
-func (m *GetUserTokenResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetUserTokenResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetUserTokenResp proto.InternalMessageInfo
-
-func (m *GetUserTokenResp) GetToken() string {
- if m != nil {
- return m.Token
- }
- return ""
-}
-
-func (m *GetUserTokenResp) GetExpTime() int64 {
- if m != nil {
- return m.ExpTime
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*AdminLoginReq)(nil), "admin_cms.AdminLoginReq")
- proto.RegisterType((*AdminLoginResp)(nil), "admin_cms.AdminLoginResp")
- proto.RegisterType((*GetChatLogsReq)(nil), "admin_cms.GetChatLogsReq")
- proto.RegisterType((*ChatLog)(nil), "admin_cms.ChatLog")
- proto.RegisterType((*GetChatLogsResp)(nil), "admin_cms.GetChatLogsResp")
- proto.RegisterType((*StatisticsReq)(nil), "admin_cms.StatisticsReq")
- proto.RegisterType((*GetActiveUserReq)(nil), "admin_cms.GetActiveUserReq")
- proto.RegisterType((*UserResp)(nil), "admin_cms.UserResp")
- proto.RegisterType((*GetActiveUserResp)(nil), "admin_cms.GetActiveUserResp")
- proto.RegisterType((*GetActiveGroupReq)(nil), "admin_cms.GetActiveGroupReq")
- proto.RegisterType((*GroupResp)(nil), "admin_cms.GroupResp")
- proto.RegisterType((*GetActiveGroupResp)(nil), "admin_cms.GetActiveGroupResp")
- proto.RegisterType((*DateNumList)(nil), "admin_cms.DateNumList")
- proto.RegisterType((*GetMessageStatisticsReq)(nil), "admin_cms.GetMessageStatisticsReq")
- proto.RegisterType((*GetMessageStatisticsResp)(nil), "admin_cms.GetMessageStatisticsResp")
- proto.RegisterType((*GetGroupStatisticsReq)(nil), "admin_cms.GetGroupStatisticsReq")
- proto.RegisterType((*GetGroupStatisticsResp)(nil), "admin_cms.GetGroupStatisticsResp")
- proto.RegisterType((*GetUserStatisticsReq)(nil), "admin_cms.GetUserStatisticsReq")
- proto.RegisterType((*GetUserStatisticsResp)(nil), "admin_cms.GetUserStatisticsResp")
- proto.RegisterType((*GetUserFriendsReq)(nil), "admin_cms.GetUserFriendsReq")
- proto.RegisterType((*GetUserFriendsResp)(nil), "admin_cms.GetUserFriendsResp")
- proto.RegisterType((*GetUserIDByEmailAndPhoneNumberReq)(nil), "admin_cms.GetUserIDByEmailAndPhoneNumberReq")
- proto.RegisterType((*GetUserIDByEmailAndPhoneNumberResp)(nil), "admin_cms.GetUserIDByEmailAndPhoneNumberResp")
- proto.RegisterType((*GetUserTokenReq)(nil), "admin_cms.GetUserTokenReq")
- proto.RegisterType((*GetUserTokenResp)(nil), "admin_cms.GetUserTokenResp")
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConn
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
-
-// Client API for AdminCMS service
-
-type AdminCMSClient interface {
- AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error)
- GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error)
- GetActiveUser(ctx context.Context, in *GetActiveUserReq, opts ...grpc.CallOption) (*GetActiveUserResp, error)
- GetActiveGroup(ctx context.Context, in *GetActiveGroupReq, opts ...grpc.CallOption) (*GetActiveGroupResp, error)
- GetMessageStatistics(ctx context.Context, in *GetMessageStatisticsReq, opts ...grpc.CallOption) (*GetMessageStatisticsResp, error)
- GetGroupStatistics(ctx context.Context, in *GetGroupStatisticsReq, opts ...grpc.CallOption) (*GetGroupStatisticsResp, error)
- GetUserStatistics(ctx context.Context, in *GetUserStatisticsReq, opts ...grpc.CallOption) (*GetUserStatisticsResp, error)
- GetUserFriends(ctx context.Context, in *GetUserFriendsReq, opts ...grpc.CallOption) (*GetUserFriendsResp, error)
- GetUserIDByEmailAndPhoneNumber(ctx context.Context, in *GetUserIDByEmailAndPhoneNumberReq, opts ...grpc.CallOption) (*GetUserIDByEmailAndPhoneNumberResp, error)
- GetUserToken(ctx context.Context, in *GetUserTokenReq, opts ...grpc.CallOption) (*GetUserTokenResp, error)
-}
-
-type adminCMSClient struct {
- cc *grpc.ClientConn
-}
-
-func NewAdminCMSClient(cc *grpc.ClientConn) AdminCMSClient {
- return &adminCMSClient{cc}
-}
-
-func (c *adminCMSClient) AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error) {
- out := new(AdminLoginResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/AdminLogin", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error) {
- out := new(GetChatLogsResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetChatLogs", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetActiveUser(ctx context.Context, in *GetActiveUserReq, opts ...grpc.CallOption) (*GetActiveUserResp, error) {
- out := new(GetActiveUserResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetActiveUser", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetActiveGroup(ctx context.Context, in *GetActiveGroupReq, opts ...grpc.CallOption) (*GetActiveGroupResp, error) {
- out := new(GetActiveGroupResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetActiveGroup", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetMessageStatistics(ctx context.Context, in *GetMessageStatisticsReq, opts ...grpc.CallOption) (*GetMessageStatisticsResp, error) {
- out := new(GetMessageStatisticsResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetMessageStatistics", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetGroupStatistics(ctx context.Context, in *GetGroupStatisticsReq, opts ...grpc.CallOption) (*GetGroupStatisticsResp, error) {
- out := new(GetGroupStatisticsResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetGroupStatistics", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetUserStatistics(ctx context.Context, in *GetUserStatisticsReq, opts ...grpc.CallOption) (*GetUserStatisticsResp, error) {
- out := new(GetUserStatisticsResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserStatistics", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetUserFriends(ctx context.Context, in *GetUserFriendsReq, opts ...grpc.CallOption) (*GetUserFriendsResp, error) {
- out := new(GetUserFriendsResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserFriends", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetUserIDByEmailAndPhoneNumber(ctx context.Context, in *GetUserIDByEmailAndPhoneNumberReq, opts ...grpc.CallOption) (*GetUserIDByEmailAndPhoneNumberResp, error) {
- out := new(GetUserIDByEmailAndPhoneNumberResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserIDByEmailAndPhoneNumber", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *adminCMSClient) GetUserToken(ctx context.Context, in *GetUserTokenReq, opts ...grpc.CallOption) (*GetUserTokenResp, error) {
- out := new(GetUserTokenResp)
- err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserToken", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// Server API for AdminCMS service
-
-type AdminCMSServer interface {
- AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error)
- GetChatLogs(context.Context, *GetChatLogsReq) (*GetChatLogsResp, error)
- GetActiveUser(context.Context, *GetActiveUserReq) (*GetActiveUserResp, error)
- GetActiveGroup(context.Context, *GetActiveGroupReq) (*GetActiveGroupResp, error)
- GetMessageStatistics(context.Context, *GetMessageStatisticsReq) (*GetMessageStatisticsResp, error)
- GetGroupStatistics(context.Context, *GetGroupStatisticsReq) (*GetGroupStatisticsResp, error)
- GetUserStatistics(context.Context, *GetUserStatisticsReq) (*GetUserStatisticsResp, error)
- GetUserFriends(context.Context, *GetUserFriendsReq) (*GetUserFriendsResp, error)
- GetUserIDByEmailAndPhoneNumber(context.Context, *GetUserIDByEmailAndPhoneNumberReq) (*GetUserIDByEmailAndPhoneNumberResp, error)
- GetUserToken(context.Context, *GetUserTokenReq) (*GetUserTokenResp, error)
-}
-
-func RegisterAdminCMSServer(s *grpc.Server, srv AdminCMSServer) {
- s.RegisterService(&_AdminCMS_serviceDesc, srv)
-}
-
-func _AdminCMS_AdminLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AdminLoginReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).AdminLogin(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/AdminLogin",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).AdminLogin(ctx, req.(*AdminLoginReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetChatLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetChatLogsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetChatLogs(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetChatLogs",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetChatLogs(ctx, req.(*GetChatLogsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetActiveUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetActiveUserReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetActiveUser(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetActiveUser",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetActiveUser(ctx, req.(*GetActiveUserReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetActiveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetActiveGroupReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetActiveGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetActiveGroup",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetActiveGroup(ctx, req.(*GetActiveGroupReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetMessageStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetMessageStatisticsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetMessageStatistics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetMessageStatistics",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetMessageStatistics(ctx, req.(*GetMessageStatisticsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetGroupStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetGroupStatisticsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetGroupStatistics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetGroupStatistics",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetGroupStatistics(ctx, req.(*GetGroupStatisticsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetUserStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserStatisticsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetUserStatistics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetUserStatistics",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetUserStatistics(ctx, req.(*GetUserStatisticsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetUserFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserFriendsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetUserFriends(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetUserFriends",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetUserFriends(ctx, req.(*GetUserFriendsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetUserIDByEmailAndPhoneNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserIDByEmailAndPhoneNumberReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetUserIDByEmailAndPhoneNumber(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetUserIDByEmailAndPhoneNumber",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetUserIDByEmailAndPhoneNumber(ctx, req.(*GetUserIDByEmailAndPhoneNumberReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _AdminCMS_GetUserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserTokenReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AdminCMSServer).GetUserToken(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/admin_cms.adminCMS/GetUserToken",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AdminCMSServer).GetUserToken(ctx, req.(*GetUserTokenReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-var _AdminCMS_serviceDesc = grpc.ServiceDesc{
- ServiceName: "admin_cms.adminCMS",
- HandlerType: (*AdminCMSServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "AdminLogin",
- Handler: _AdminCMS_AdminLogin_Handler,
- },
- {
- MethodName: "GetChatLogs",
- Handler: _AdminCMS_GetChatLogs_Handler,
- },
- {
- MethodName: "GetActiveUser",
- Handler: _AdminCMS_GetActiveUser_Handler,
- },
- {
- MethodName: "GetActiveGroup",
- Handler: _AdminCMS_GetActiveGroup_Handler,
- },
- {
- MethodName: "GetMessageStatistics",
- Handler: _AdminCMS_GetMessageStatistics_Handler,
- },
- {
- MethodName: "GetGroupStatistics",
- Handler: _AdminCMS_GetGroupStatistics_Handler,
- },
- {
- MethodName: "GetUserStatistics",
- Handler: _AdminCMS_GetUserStatistics_Handler,
- },
- {
- MethodName: "GetUserFriends",
- Handler: _AdminCMS_GetUserFriends_Handler,
- },
- {
- MethodName: "GetUserIDByEmailAndPhoneNumber",
- Handler: _AdminCMS_GetUserIDByEmailAndPhoneNumber_Handler,
- },
- {
- MethodName: "GetUserToken",
- Handler: _AdminCMS_GetUserToken_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "admin_cms/admin_cms.proto",
-}
-
-func init() {
- proto.RegisterFile("admin_cms/admin_cms.proto", fileDescriptor_admin_cms_d71cb129508715a2)
-}
-
-var fileDescriptor_admin_cms_d71cb129508715a2 = []byte{
- // 1401 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5f, 0x4f, 0x1b, 0x47,
- 0x10, 0x97, 0x6d, 0x6c, 0xf0, 0x18, 0x08, 0x6c, 0x48, 0x7a, 0x71, 0xfe, 0xd4, 0xb9, 0xa6, 0xad,
- 0x5b, 0x25, 0x20, 0x91, 0xc7, 0x4a, 0x91, 0x20, 0x0e, 0xae, 0x23, 0x20, 0xe8, 0x20, 0xad, 0xd2,
- 0x56, 0x45, 0x17, 0xb3, 0x38, 0x27, 0xf0, 0xdd, 0xe6, 0x76, 0x21, 0x44, 0x55, 0xa5, 0x3e, 0xf7,
- 0xcb, 0xf4, 0xf3, 0xf4, 0x29, 0x5f, 0xa4, 0x0f, 0xd5, 0xcc, 0xee, 0xdd, 0xed, 0xdd, 0xd9, 0x90,
- 0x56, 0x79, 0xbb, 0xf9, 0xed, 0xcc, 0xec, 0xcc, 0x6f, 0x67, 0x67, 0xc7, 0x86, 0x5b, 0xfe, 0xd1,
- 0x38, 0x08, 0x0f, 0x87, 0x63, 0xb9, 0x96, 0x7e, 0xad, 0x8a, 0x38, 0x52, 0x11, 0x6b, 0xa6, 0x40,
- 0xbb, 0xfb, 0x42, 0xf0, 0xf0, 0xd1, 0x60, 0xe7, 0xd1, 0x3e, 0x8f, 0xcf, 0x79, 0xbc, 0x26, 0x4e,
- 0x46, 0x6b, 0xa4, 0xb4, 0x26, 0x8f, 0x4e, 0x0e, 0xdf, 0xc9, 0xb5, 0x77, 0xc6, 0xc8, 0xdd, 0x80,
- 0x85, 0x0d, 0x34, 0xdb, 0x8e, 0x46, 0x41, 0xe8, 0xf1, 0xb7, 0xcc, 0x81, 0x59, 0xf2, 0x33, 0xe8,
- 0x39, 0xd5, 0x4e, 0xa5, 0xdb, 0xf4, 0x12, 0x91, 0xdd, 0x84, 0x86, 0xe4, 0xc3, 0x98, 0x2b, 0xa7,
- 0x46, 0x0b, 0x46, 0x72, 0x7f, 0x81, 0x45, 0xdb, 0x85, 0x14, 0x6c, 0x05, 0xea, 0x2a, 0x3a, 0xe1,
- 0xa1, 0x53, 0x21, 0x45, 0x2d, 0xb0, 0x36, 0xcc, 0x9d, 0x49, 0x1e, 0xef, 0xfa, 0x63, 0x6e, 0x5c,
- 0xa7, 0x32, 0xee, 0x7a, 0xec, 0x0f, 0xf9, 0x4b, 0x6f, 0xdb, 0x38, 0x4f, 0x44, 0xf7, 0x8f, 0x2a,
- 0x2c, 0xf6, 0xb9, 0x7a, 0xfa, 0xc6, 0x57, 0xdb, 0xd1, 0x48, 0x9a, 0x10, 0x87, 0x51, 0xa8, 0x78,
- 0xa8, 0xcc, 0x06, 0x89, 0xa8, 0x43, 0x0c, 0x8f, 0xd2, 0xd8, 0x8d, 0x84, 0x78, 0xcc, 0x87, 0xe7,
- 0x83, 0x5e, 0x12, 0xba, 0x96, 0x30, 0x24, 0xd4, 0x38, 0x08, 0xc6, 0xdc, 0x99, 0xd1, 0x21, 0x25,
- 0x32, 0xeb, 0x40, 0x4b, 0x72, 0x29, 0x83, 0x28, 0x3c, 0x78, 0x2f, 0xb8, 0x53, 0xef, 0x54, 0xba,
- 0x75, 0xcf, 0x86, 0x50, 0xc3, 0x6c, 0x4c, 0x1a, 0x0d, 0xad, 0x61, 0x41, 0xac, 0x07, 0x20, 0xfc,
- 0x51, 0x10, 0xfa, 0x2a, 0x88, 0x42, 0x67, 0xb6, 0x53, 0xe9, 0xb6, 0xd6, 0x1f, 0xac, 0x4a, 0x3a,
- 0x94, 0x43, 0x5f, 0x04, 0x87, 0xc2, 0x8f, 0xfd, 0xb1, 0x5c, 0xf5, 0xf8, 0xdb, 0x33, 0x2e, 0xd5,
- 0x5e, 0xaa, 0xeb, 0x59, 0x76, 0xee, 0x5f, 0x33, 0x30, 0x6b, 0xf2, 0xd7, 0x51, 0xa1, 0xf9, 0x8e,
- 0x1c, 0x0d, 0x7a, 0x26, 0x7f, 0x1b, 0xa2, 0xa8, 0x4e, 0x03, 0x1e, 0x2a, 0xad, 0xa1, 0x89, 0xb0,
- 0x21, 0x8b, 0xa5, 0xda, 0x14, 0x96, 0x66, 0x72, 0x2c, 0x39, 0x30, 0x3b, 0x8a, 0xa3, 0x33, 0x31,
- 0xe8, 0x11, 0x0b, 0x4d, 0x2f, 0x11, 0x99, 0x0b, 0xf3, 0xa8, 0xb3, 0x1b, 0x0c, 0x4f, 0x42, 0x3c,
- 0xd6, 0x06, 0x2d, 0xe7, 0x30, 0xf6, 0x2d, 0x2c, 0xa1, 0x7f, 0x1e, 0xef, 0x9d, 0xfa, 0xea, 0x38,
- 0x8a, 0xc7, 0x83, 0x1e, 0x31, 0x51, 0xf7, 0x4a, 0x38, 0xfb, 0x0a, 0x16, 0x35, 0x96, 0x7a, 0x9c,
- 0x23, 0x8f, 0x05, 0x94, 0x3d, 0x80, 0x05, 0x8d, 0x6c, 0x99, 0xa2, 0x69, 0x92, 0x5a, 0x1e, 0x64,
- 0x77, 0xa0, 0x49, 0x81, 0x52, 0xc5, 0x01, 0x69, 0x64, 0x40, 0xf1, 0x7c, 0x5b, 0xe5, 0xf3, 0x75,
- 0x60, 0x76, 0x2c, 0x47, 0x5b, 0x71, 0x34, 0x76, 0xe6, 0x69, 0x35, 0x11, 0x8b, 0x27, 0xbf, 0x50,
- 0x3e, 0x79, 0xab, 0x46, 0x17, 0xcb, 0x35, 0xaa, 0x7c, 0x75, 0x26, 0x9d, 0x6b, 0x64, 0x66, 0xa4,
- 0x5c, 0x2d, 0x2e, 0x75, 0x2a, 0xdd, 0x9a, 0x55, 0x8b, 0xf7, 0x00, 0x86, 0x31, 0xf7, 0x15, 0xa7,
- 0xd5, 0x65, 0x5a, 0xb5, 0x10, 0xb6, 0x08, 0x55, 0x7e, 0xe1, 0x30, 0xda, 0xa8, 0xca, 0x2f, 0xdc,
- 0x21, 0x5c, 0xcb, 0xdd, 0x19, 0x29, 0xd8, 0x2a, 0xcc, 0x0d, 0x8d, 0xec, 0x54, 0x3a, 0xb5, 0x6e,
- 0x6b, 0x9d, 0xad, 0x66, 0x1d, 0xc4, 0xa8, 0x7a, 0xa9, 0x0e, 0xa5, 0x68, 0xbe, 0x77, 0xcf, 0xc6,
- 0x54, 0x46, 0x98, 0x62, 0x06, 0xb9, 0x8f, 0x61, 0x61, 0x5f, 0xf9, 0x2a, 0x90, 0x2a, 0x18, 0xd2,
- 0xbd, 0x64, 0x30, 0x73, 0x8c, 0x64, 0xe9, 0xa2, 0xa4, 0x6f, 0x8c, 0x4c, 0x45, 0xa6, 0x08, 0xab,
- 0x2a, 0x72, 0x3d, 0x58, 0xea, 0x73, 0xb5, 0x31, 0x54, 0xc1, 0x39, 0x7f, 0x29, 0x79, 0x8c, 0x76,
- 0x4f, 0x60, 0x41, 0xda, 0x8e, 0xc8, 0x41, 0x6b, 0xdd, 0xb1, 0xe2, 0xcb, 0x6d, 0xe4, 0xe5, 0xd5,
- 0xdd, 0x5f, 0x61, 0x4e, 0xbb, 0x92, 0x02, 0x59, 0x0c, 0x83, 0xe1, 0x09, 0x1d, 0xb9, 0x8e, 0x23,
- 0x95, 0x91, 0x79, 0x6c, 0x38, 0x59, 0x77, 0xd0, 0x12, 0xb2, 0x3b, 0xe6, 0x52, 0xfa, 0x23, 0x8e,
- 0x99, 0xd6, 0x28, 0x53, 0x0b, 0x71, 0x9f, 0xc0, 0x72, 0x21, 0x66, 0x29, 0xd8, 0x37, 0x50, 0xc7,
- 0xef, 0x84, 0xcc, 0xeb, 0x56, 0xb0, 0x89, 0x8e, 0xa7, 0x35, 0xdc, 0x7d, 0xcb, 0xbe, 0x8f, 0xf5,
- 0xf7, 0x29, 0x92, 0x1e, 0x42, 0xd3, 0xf8, 0x92, 0x02, 0x2b, 0xbd, 0x9f, 0x56, 0xba, 0x4e, 0x3b,
- 0x03, 0xb0, 0x16, 0xfb, 0xe6, 0xfe, 0x9a, 0x96, 0x6e, 0x44, 0xcc, 0x7c, 0xa7, 0x94, 0x79, 0x86,
- 0xb8, 0x9b, 0xc0, 0x8a, 0x91, 0x4b, 0xc1, 0x1e, 0x42, 0x83, 0x84, 0x24, 0xf7, 0x15, 0x2b, 0xe6,
- 0x54, 0xcb, 0x33, 0x3a, 0xee, 0x63, 0x68, 0xf5, 0x7c, 0x85, 0xee, 0xb6, 0x03, 0xa9, 0xb0, 0x48,
- 0x50, 0x4c, 0x8a, 0x04, 0xbf, 0xd9, 0x12, 0xd4, 0xb2, 0x1a, 0xc3, 0x4f, 0xf7, 0x15, 0x7c, 0xd6,
- 0xe7, 0xca, 0x44, 0x92, 0xaf, 0xb2, 0x27, 0x85, 0xb2, 0xbb, 0x9a, 0xb8, 0x9c, 0xe8, 0xfe, 0x59,
- 0x05, 0x67, 0xb2, 0x6f, 0x4a, 0x6d, 0x79, 0x2f, 0x0e, 0xce, 0x7d, 0xc5, 0x2d, 0x5e, 0x2a, 0x14,
- 0x57, 0x79, 0x81, 0x75, 0xe1, 0x1a, 0x25, 0x69, 0xe9, 0xea, 0x1c, 0x8a, 0x30, 0xdb, 0x86, 0x1b,
- 0x25, 0x73, 0xa4, 0xc3, 0xa9, 0x11, 0x83, 0x37, 0xad, 0xe0, 0x2d, 0xb2, 0xbc, 0xc9, 0x46, 0xec,
- 0x7b, 0xb8, 0x5e, 0xd8, 0x80, 0x7c, 0xcd, 0x5c, 0xea, 0x6b, 0x92, 0x89, 0xfb, 0x23, 0xdc, 0xe8,
- 0x73, 0x45, 0x2b, 0x9f, 0x96, 0xe5, 0x7f, 0x2a, 0x70, 0x73, 0x92, 0x67, 0x29, 0xf0, 0x41, 0x18,
- 0x84, 0xd8, 0xbc, 0xa4, 0xae, 0xa9, 0x8c, 0xe2, 0x12, 0x8e, 0x8d, 0xfe, 0x20, 0x52, 0xfe, 0x69,
- 0xaa, 0xa8, 0xf9, 0xcd, 0x83, 0xec, 0x39, 0xac, 0x14, 0x2d, 0x3f, 0x82, 0xdc, 0x89, 0x36, 0xac,
- 0x07, 0xcb, 0x39, 0xe7, 0x1f, 0xc1, 0x6c, 0xd9, 0xc0, 0xbd, 0x80, 0x95, 0x3e, 0x57, 0x78, 0xfd,
- 0x3f, 0x29, 0xad, 0xd8, 0x95, 0x5f, 0x08, 0x1e, 0xd3, 0x5c, 0x90, 0x3d, 0xee, 0x16, 0xe4, 0x7e,
- 0xa8, 0xd2, 0x91, 0x16, 0xb7, 0x96, 0x02, 0xab, 0x35, 0xc9, 0x18, 0x57, 0x33, 0xda, 0x8b, 0x30,
- 0xb2, 0x9e, 0x75, 0x3b, 0x8b, 0xf5, 0x1c, 0x88, 0x8f, 0x3f, 0x25, 0x9e, 0x28, 0xe9, 0xf6, 0x91,
- 0xc3, 0xb0, 0x52, 0x0b, 0xce, 0x3f, 0xa6, 0x52, 0x27, 0x98, 0xe0, 0xb9, 0xe4, 0xb6, 0x27, 0x3f,
- 0xf5, 0xcb, 0xcf, 0xa5, 0x64, 0xc0, 0x36, 0x61, 0xc9, 0x8e, 0x8f, 0x9c, 0x34, 0x2e, 0x75, 0x52,
- 0xd2, 0x77, 0x3f, 0x54, 0xa8, 0x9f, 0x23, 0xb4, 0x15, 0x07, 0x3c, 0x3c, 0x4a, 0x4e, 0x26, 0xb2,
- 0x4e, 0xc6, 0x0c, 0x66, 0x16, 0x34, 0xf5, 0xf9, 0x71, 0x61, 0xfe, 0x98, 0xfc, 0xbc, 0xd4, 0xab,
- 0x7a, 0x28, 0xcb, 0x61, 0x38, 0x18, 0x65, 0x32, 0x75, 0x79, 0x3d, 0xa2, 0x15, 0xd0, 0xc2, 0xc0,
- 0x59, 0xff, 0x9f, 0x03, 0xe7, 0x6f, 0xd4, 0xf6, 0x73, 0x09, 0x4a, 0xc1, 0x9e, 0x25, 0x31, 0x0c,
- 0xc2, 0xe3, 0x88, 0x98, 0xab, 0x12, 0x73, 0x77, 0x27, 0xf8, 0xdf, 0x4a, 0x15, 0xbd, 0x82, 0x11,
- 0xbe, 0x39, 0x1a, 0xd9, 0x3d, 0x1b, 0xcb, 0xe4, 0xcd, 0xc9, 0x10, 0xf7, 0x67, 0xb8, 0x6f, 0x36,
- 0x1f, 0xf4, 0x36, 0xdf, 0x3f, 0x1b, 0xfb, 0xc1, 0xe9, 0x46, 0x78, 0xb4, 0xf7, 0x26, 0x0a, 0xf1,
- 0x4c, 0x5e, 0xeb, 0x91, 0x61, 0x05, 0xea, 0x1c, 0x57, 0x0c, 0x95, 0x5a, 0xc0, 0x33, 0x10, 0x99,
- 0x9e, 0x21, 0xd2, 0x86, 0xdc, 0x1e, 0xb8, 0x57, 0x39, 0x97, 0x02, 0x43, 0xd4, 0x67, 0x43, 0x59,
- 0xe2, 0x23, 0xd7, 0xf4, 0x2c, 0xc4, 0x1d, 0xd0, 0x78, 0x85, 0x5e, 0x0e, 0xf0, 0x97, 0x0d, 0x06,
- 0x94, 0x1d, 0x6e, 0xa5, 0x38, 0x5b, 0x88, 0x6c, 0xee, 0xd5, 0xf7, 0xc8, 0x42, 0xdc, 0x4d, 0x9a,
- 0x87, 0x2c, 0x57, 0x53, 0x7f, 0x3e, 0x39, 0x30, 0xcb, 0x2f, 0x04, 0x0d, 0x80, 0x55, 0x1a, 0x00,
- 0x13, 0x71, 0xfd, 0xef, 0x06, 0xcc, 0x51, 0xf1, 0x3e, 0xdd, 0xd9, 0x67, 0x1b, 0x00, 0xd9, 0xaf,
- 0x31, 0x66, 0x37, 0x96, 0xdc, 0xef, 0xbc, 0xf6, 0xad, 0x29, 0x2b, 0x52, 0xb0, 0x1e, 0xb4, 0xac,
- 0xe9, 0x91, 0xd9, 0x9a, 0xf9, 0x5f, 0x62, 0xed, 0xf6, 0xb4, 0x25, 0x29, 0xd8, 0x73, 0x58, 0xc8,
- 0x4d, 0x4d, 0xec, 0x76, 0x5e, 0x39, 0x37, 0x03, 0xb6, 0xef, 0x4c, 0x5f, 0x94, 0x82, 0xed, 0xd0,
- 0x6f, 0x40, 0x6b, 0x0e, 0x61, 0x13, 0xf5, 0x93, 0xe1, 0xaa, 0x7d, 0xf7, 0x92, 0x55, 0x29, 0xd8,
- 0x21, 0x75, 0xe7, 0xd2, 0x04, 0xc0, 0xdc, 0xbc, 0xd9, 0xa4, 0xf1, 0xa3, 0xfd, 0xc5, 0x95, 0x3a,
- 0x52, 0xb0, 0x57, 0x74, 0x81, 0x0a, 0x8f, 0x1f, 0xeb, 0xe4, 0x4d, 0xcb, 0xaf, 0x6e, 0xfb, 0xfe,
- 0x15, 0x1a, 0x52, 0xb0, 0x1f, 0xd2, 0xe6, 0x63, 0x79, 0xfe, 0x3c, 0x6f, 0x57, 0x7a, 0x77, 0xda,
- 0x9d, 0xcb, 0x15, 0x52, 0x8a, 0xad, 0x3b, 0x5f, 0xa4, 0x38, 0xdf, 0xef, 0x8a, 0x14, 0x17, 0x9b,
- 0xc5, 0xef, 0x70, 0xef, 0xf2, 0x8b, 0xc6, 0x1e, 0x96, 0x1d, 0x4c, 0xbf, 0xf0, 0xed, 0x47, 0xff,
- 0x41, 0x5b, 0x0a, 0xd6, 0x87, 0x79, 0xfb, 0x5a, 0xb1, 0x76, 0xd9, 0x3c, 0xb9, 0xba, 0xed, 0xdb,
- 0x53, 0xd7, 0xa4, 0xd8, 0xfc, 0xfa, 0xa7, 0x2f, 0x5f, 0x08, 0x1e, 0x1e, 0x0e, 0x76, 0xac, 0x3f,
- 0x51, 0x52, 0xfd, 0xef, 0xd2, 0xaf, 0xd7, 0x0d, 0x5a, 0x7a, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x33, 0xc3, 0x25, 0x0e, 0xa1, 0x11, 0x00, 0x00,
-}
diff --git a/pkg/proto/admincms/admin_cms.proto b/pkg/proto/admincms/admin_cms.proto
deleted file mode 100644
index b71517596..000000000
--- a/pkg/proto/admincms/admin_cms.proto
+++ /dev/null
@@ -1,175 +0,0 @@
-syntax = "proto3";
-option go_package = "Open_IM/pkg/proto/admincms;admincms";
-import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
-package admincms;
-
-message AdminLoginReq {
- string adminID = 2;
- string secret = 3;
-}
-
-message AdminLoginResp {
- string token = 1;
- string userName = 2;
- string faceURL = 3;
-}
-
-message GetChatLogsReq {
- string content = 1;
- string sendID = 2;
- string recvID = 3;
- string sendTime = 4;
- int32 sessionType = 5;
- int32 contentType = 6;
- sdkws.RequestPagination pagination = 7;
-}
-
-message ChatLog {
- string serverMsgID = 1;
- string clientMsgID = 2;
- string sendID = 3;
- string recvID = 4;
- string groupID = 5;
- string recvNickname = 6;
- int32 senderPlatformID = 7;
- string senderNickname = 8;
- string senderFaceURL = 9;
- string groupName = 10;
- int32 sessionType = 11;
- int32 msgFrom = 12;
- int32 contentType = 13;
- string content = 14;
- int32 status = 15;
- int64 sendTime = 16;
- int64 createTime = 17;
- string ex = 18;
-}
-
-message GetChatLogsResp {
- repeated ChatLog chatLogs = 1;
- int32 chatLogsNum = 2;
-}
-
-
-message StatisticsReq {
- string from = 1;
- string to = 2;
-}
-
-message GetActiveUserReq{
- StatisticsReq statisticsReq = 1;
-}
-
-message UserResp{
- string nickName = 1;
- string userID = 2;
- int32 messageNum = 3;
-}
-
-message GetActiveUserResp {
- repeated UserResp Users = 1;
-}
-
-message GetActiveGroupReq{
- StatisticsReq statisticsReq = 1;
-}
-
-message GroupResp {
- string GroupName = 1;
- string GroupID = 2;
- int32 MessageNum = 3;
-}
-
-message GetActiveGroupResp {
- repeated GroupResp Groups = 1;
-}
-
-message DateNumList {
- string Date = 1;
- int32 Num = 2;
-}
-
-
-message GetMessageStatisticsReq {
- StatisticsReq StatisticsReq = 1;
-}
-
-
-message GetMessageStatisticsResp {
- int32 PrivateMessageNum = 1;
- int32 GroupMessageNum = 2;
- repeated DateNumList PrivateMessageNumList = 3;
- repeated DateNumList GroupMessageNumList = 4;
-}
-
-message GetGroupStatisticsReq {
- StatisticsReq StatisticsReq = 1;
-}
-
-
-message GetGroupStatisticsResp {
- int32 IncreaseGroupNum = 1;
- int32 TotalGroupNum = 2;
- repeated DateNumList IncreaseGroupNumList = 3;
- repeated DateNumList TotalGroupNumList = 4;
-}
-
-message GetUserStatisticsReq {
- StatisticsReq StatisticsReq = 1;
- string OperationID = 2;
-}
-
-message GetUserStatisticsResp {
- int32 IncreaseUserNum = 1;
- int32 ActiveUserNum = 2;
- int32 TotalUserNum = 3;
- repeated DateNumList IncreaseUserNumList = 4;
- repeated DateNumList ActiveUserNumList = 5;
- repeated DateNumList TotalUserNumList = 6;
-}
-
-
-message GetUserFriendsReq {
- string operationID = 1;
- string userID = 2;
- string friendUserID = 3;
- string friendUserName = 4;
- sdkws.RequestPagination pagination = 5;
-}
-
-message GetUserFriendsResp {
- repeated sdkws.FriendInfo friendInfoList = 2;
- int32 friendNums = 3;
-}
-
-message GetUserIDByEmailAndPhoneNumberReq{
- string email = 2;
- string phoneNumber = 3;
-}
-
-message GetUserIDByEmailAndPhoneNumberResp{
- repeated string userIDList = 1;
-}
-
-message GetUserTokenReq {
- string userID = 1;
- int32 platformID = 2;
-}
-
-message GetUserTokenResp {
- string token = 1;
- int64 expTime = 2;
-}
-
-service adminCMS {
- rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
- rpc GetChatLogs(GetChatLogsReq) returns(GetChatLogsResp);
- rpc GetActiveUser(GetActiveUserReq) returns(GetActiveUserResp);
- rpc GetActiveGroup(GetActiveGroupReq) returns(GetActiveGroupResp);
- rpc GetMessageStatistics(GetMessageStatisticsReq) returns(GetMessageStatisticsResp);
- rpc GetGroupStatistics(GetGroupStatisticsReq) returns(GetGroupStatisticsResp);
- rpc GetUserStatistics(GetUserStatisticsReq) returns(GetUserStatisticsResp);
- rpc GetUserFriends(GetUserFriendsReq) returns(GetUserFriendsResp);
- rpc GetUserIDByEmailAndPhoneNumber(GetUserIDByEmailAndPhoneNumberReq) returns(GetUserIDByEmailAndPhoneNumberResp);
- rpc GetUserToken(GetUserTokenReq) returns(GetUserTokenResp);
-}
diff --git a/pkg/proto/office/office.pb.go b/pkg/proto/office/office.pb.go
deleted file mode 100644
index d9eaf3857..000000000
--- a/pkg/proto/office/office.pb.go
+++ /dev/null
@@ -1,4729 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.27.1
-// protoc v3.15.5
-// source: office/office.proto
-
-package office
-
-import (
- sdkws "Open_IM/pkg/proto/sdkws"
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type CommonResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ErrCode int32 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode,omitempty"`
- ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
-}
-
-func (x *CommonResp) Reset() {
- *x = CommonResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CommonResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CommonResp) ProtoMessage() {}
-
-func (x *CommonResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CommonResp.ProtoReflect.Descriptor instead.
-func (*CommonResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *CommonResp) GetErrCode() int32 {
- if x != nil {
- return x.ErrCode
- }
- return 0
-}
-
-func (x *CommonResp) GetErrMsg() string {
- if x != nil {
- return x.ErrMsg
- }
- return ""
-}
-
-type TagUser struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
-}
-
-func (x *TagUser) Reset() {
- *x = TagUser{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *TagUser) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*TagUser) ProtoMessage() {}
-
-func (x *TagUser) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use TagUser.ProtoReflect.Descriptor instead.
-func (*TagUser) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *TagUser) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *TagUser) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-type Tag struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TagID string `protobuf:"bytes,1,opt,name=tagID,proto3" json:"tagID,omitempty"`
- TagName string `protobuf:"bytes,2,opt,name=tagName,proto3" json:"tagName,omitempty"`
- UserList []*TagUser `protobuf:"bytes,3,rep,name=userList,proto3" json:"userList,omitempty"`
-}
-
-func (x *Tag) Reset() {
- *x = Tag{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Tag) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Tag) ProtoMessage() {}
-
-func (x *Tag) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Tag.ProtoReflect.Descriptor instead.
-func (*Tag) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *Tag) GetTagID() string {
- if x != nil {
- return x.TagID
- }
- return ""
-}
-
-func (x *Tag) GetTagName() string {
- if x != nil {
- return x.TagName
- }
- return ""
-}
-
-func (x *Tag) GetUserList() []*TagUser {
- if x != nil {
- return x.UserList
- }
- return nil
-}
-
-type GetUserTagsReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetUserTagsReq) Reset() {
- *x = GetUserTagsReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserTagsReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserTagsReq) ProtoMessage() {}
-
-func (x *GetUserTagsReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserTagsReq.ProtoReflect.Descriptor instead.
-func (*GetUserTagsReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *GetUserTagsReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *GetUserTagsReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type GetUserTagsResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- Tags []*Tag `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
-}
-
-func (x *GetUserTagsResp) Reset() {
- *x = GetUserTagsResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserTagsResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserTagsResp) ProtoMessage() {}
-
-func (x *GetUserTagsResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserTagsResp.ProtoReflect.Descriptor instead.
-func (*GetUserTagsResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{4}
-}
-
-func (x *GetUserTagsResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetUserTagsResp) GetTags() []*Tag {
- if x != nil {
- return x.Tags
- }
- return nil
-}
-
-type CreateTagReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TagName string `protobuf:"bytes,1,opt,name=tagName,proto3" json:"tagName,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
- UserIDList []string `protobuf:"bytes,3,rep,name=userIDList,proto3" json:"userIDList,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *CreateTagReq) Reset() {
- *x = CreateTagReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateTagReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateTagReq) ProtoMessage() {}
-
-func (x *CreateTagReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateTagReq.ProtoReflect.Descriptor instead.
-func (*CreateTagReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{5}
-}
-
-func (x *CreateTagReq) GetTagName() string {
- if x != nil {
- return x.TagName
- }
- return ""
-}
-
-func (x *CreateTagReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *CreateTagReq) GetUserIDList() []string {
- if x != nil {
- return x.UserIDList
- }
- return nil
-}
-
-func (x *CreateTagReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type CreateTagResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *CreateTagResp) Reset() {
- *x = CreateTagResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateTagResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateTagResp) ProtoMessage() {}
-
-func (x *CreateTagResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateTagResp.ProtoReflect.Descriptor instead.
-func (*CreateTagResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{6}
-}
-
-func (x *CreateTagResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type DeleteTagReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- TagID string `protobuf:"bytes,2,opt,name=tagID,proto3" json:"tagID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *DeleteTagReq) Reset() {
- *x = DeleteTagReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteTagReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteTagReq) ProtoMessage() {}
-
-func (x *DeleteTagReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteTagReq.ProtoReflect.Descriptor instead.
-func (*DeleteTagReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *DeleteTagReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *DeleteTagReq) GetTagID() string {
- if x != nil {
- return x.TagID
- }
- return ""
-}
-
-func (x *DeleteTagReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type DeleteTagResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *DeleteTagResp) Reset() {
- *x = DeleteTagResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteTagResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteTagResp) ProtoMessage() {}
-
-func (x *DeleteTagResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteTagResp.ProtoReflect.Descriptor instead.
-func (*DeleteTagResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{8}
-}
-
-func (x *DeleteTagResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type SetTagReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- TagID string `protobuf:"bytes,2,opt,name=tagID,proto3" json:"tagID,omitempty"`
- NewName string `protobuf:"bytes,3,opt,name=newName,proto3" json:"newName,omitempty"`
- IncreaseUserIDList []string `protobuf:"bytes,4,rep,name=increaseUserIDList,proto3" json:"increaseUserIDList,omitempty"`
- ReduceUserIDList []string `protobuf:"bytes,5,rep,name=reduceUserIDList,proto3" json:"reduceUserIDList,omitempty"`
- OperationID string `protobuf:"bytes,6,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *SetTagReq) Reset() {
- *x = SetTagReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SetTagReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SetTagReq) ProtoMessage() {}
-
-func (x *SetTagReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SetTagReq.ProtoReflect.Descriptor instead.
-func (*SetTagReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{9}
-}
-
-func (x *SetTagReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *SetTagReq) GetTagID() string {
- if x != nil {
- return x.TagID
- }
- return ""
-}
-
-func (x *SetTagReq) GetNewName() string {
- if x != nil {
- return x.NewName
- }
- return ""
-}
-
-func (x *SetTagReq) GetIncreaseUserIDList() []string {
- if x != nil {
- return x.IncreaseUserIDList
- }
- return nil
-}
-
-func (x *SetTagReq) GetReduceUserIDList() []string {
- if x != nil {
- return x.ReduceUserIDList
- }
- return nil
-}
-
-func (x *SetTagReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type SetTagResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *SetTagResp) Reset() {
- *x = SetTagResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SetTagResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SetTagResp) ProtoMessage() {}
-
-func (x *SetTagResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SetTagResp.ProtoReflect.Descriptor instead.
-func (*SetTagResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{10}
-}
-
-func (x *SetTagResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type SendMsg2TagReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TagList []string `protobuf:"bytes,1,rep,name=tagList,proto3" json:"tagList,omitempty"`
- UserList []string `protobuf:"bytes,2,rep,name=UserList,proto3" json:"UserList,omitempty"`
- GroupList []string `protobuf:"bytes,3,rep,name=GroupList,proto3" json:"GroupList,omitempty"`
- SendID string `protobuf:"bytes,4,opt,name=sendID,proto3" json:"sendID,omitempty"`
- SenderPlatformID int32 `protobuf:"varint,5,opt,name=senderPlatformID,proto3" json:"senderPlatformID,omitempty"`
- Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"`
- OperationID string `protobuf:"bytes,7,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *SendMsg2TagReq) Reset() {
- *x = SendMsg2TagReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SendMsg2TagReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SendMsg2TagReq) ProtoMessage() {}
-
-func (x *SendMsg2TagReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SendMsg2TagReq.ProtoReflect.Descriptor instead.
-func (*SendMsg2TagReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{11}
-}
-
-func (x *SendMsg2TagReq) GetTagList() []string {
- if x != nil {
- return x.TagList
- }
- return nil
-}
-
-func (x *SendMsg2TagReq) GetUserList() []string {
- if x != nil {
- return x.UserList
- }
- return nil
-}
-
-func (x *SendMsg2TagReq) GetGroupList() []string {
- if x != nil {
- return x.GroupList
- }
- return nil
-}
-
-func (x *SendMsg2TagReq) GetSendID() string {
- if x != nil {
- return x.SendID
- }
- return ""
-}
-
-func (x *SendMsg2TagReq) GetSenderPlatformID() int32 {
- if x != nil {
- return x.SenderPlatformID
- }
- return 0
-}
-
-func (x *SendMsg2TagReq) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *SendMsg2TagReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type SendMsg2TagResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *SendMsg2TagResp) Reset() {
- *x = SendMsg2TagResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SendMsg2TagResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SendMsg2TagResp) ProtoMessage() {}
-
-func (x *SendMsg2TagResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SendMsg2TagResp.ProtoReflect.Descriptor instead.
-func (*SendMsg2TagResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{12}
-}
-
-func (x *SendMsg2TagResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type GetTagSendLogsReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetTagSendLogsReq) Reset() {
- *x = GetTagSendLogsReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetTagSendLogsReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetTagSendLogsReq) ProtoMessage() {}
-
-func (x *GetTagSendLogsReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetTagSendLogsReq.ProtoReflect.Descriptor instead.
-func (*GetTagSendLogsReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{13}
-}
-
-func (x *GetTagSendLogsReq) GetPagination() *sdkws.RequestPagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-func (x *GetTagSendLogsReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *GetTagSendLogsReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type TagSendLog struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserList []*TagUser `protobuf:"bytes,1,rep,name=userList,proto3" json:"userList,omitempty"`
- Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
- SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime,omitempty"`
-}
-
-func (x *TagSendLog) Reset() {
- *x = TagSendLog{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *TagSendLog) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*TagSendLog) ProtoMessage() {}
-
-func (x *TagSendLog) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use TagSendLog.ProtoReflect.Descriptor instead.
-func (*TagSendLog) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{14}
-}
-
-func (x *TagSendLog) GetUserList() []*TagUser {
- if x != nil {
- return x.UserList
- }
- return nil
-}
-
-func (x *TagSendLog) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *TagSendLog) GetSendTime() int64 {
- if x != nil {
- return x.SendTime
- }
- return 0
-}
-
-type GetTagSendLogsResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- Pagination *sdkws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
- TagSendLogs []*TagSendLog `protobuf:"bytes,3,rep,name=tagSendLogs,proto3" json:"tagSendLogs,omitempty"`
-}
-
-func (x *GetTagSendLogsResp) Reset() {
- *x = GetTagSendLogsResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetTagSendLogsResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetTagSendLogsResp) ProtoMessage() {}
-
-func (x *GetTagSendLogsResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetTagSendLogsResp.ProtoReflect.Descriptor instead.
-func (*GetTagSendLogsResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{15}
-}
-
-func (x *GetTagSendLogsResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetTagSendLogsResp) GetPagination() *sdkws.ResponsePagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-func (x *GetTagSendLogsResp) GetTagSendLogs() []*TagSendLog {
- if x != nil {
- return x.TagSendLogs
- }
- return nil
-}
-
-type GetUserTagByIDReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- TagID string `protobuf:"bytes,2,opt,name=tagID,proto3" json:"tagID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetUserTagByIDReq) Reset() {
- *x = GetUserTagByIDReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserTagByIDReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserTagByIDReq) ProtoMessage() {}
-
-func (x *GetUserTagByIDReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserTagByIDReq.ProtoReflect.Descriptor instead.
-func (*GetUserTagByIDReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{16}
-}
-
-func (x *GetUserTagByIDReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *GetUserTagByIDReq) GetTagID() string {
- if x != nil {
- return x.TagID
- }
- return ""
-}
-
-func (x *GetUserTagByIDReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type GetUserTagByIDResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- Tag *Tag `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
-}
-
-func (x *GetUserTagByIDResp) Reset() {
- *x = GetUserTagByIDResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserTagByIDResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserTagByIDResp) ProtoMessage() {}
-
-func (x *GetUserTagByIDResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserTagByIDResp.ProtoReflect.Descriptor instead.
-func (*GetUserTagByIDResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{17}
-}
-
-func (x *GetUserTagByIDResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetUserTagByIDResp) GetTag() *Tag {
- if x != nil {
- return x.Tag
- }
- return nil
-}
-
-type LikeUser struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
-}
-
-func (x *LikeUser) Reset() {
- *x = LikeUser{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *LikeUser) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*LikeUser) ProtoMessage() {}
-
-func (x *LikeUser) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use LikeUser.ProtoReflect.Descriptor instead.
-func (*LikeUser) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{18}
-}
-
-func (x *LikeUser) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *LikeUser) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-type NotificationUser struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
-}
-
-func (x *NotificationUser) Reset() {
- *x = NotificationUser{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *NotificationUser) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*NotificationUser) ProtoMessage() {}
-
-func (x *NotificationUser) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use NotificationUser.ProtoReflect.Descriptor instead.
-func (*NotificationUser) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{19}
-}
-
-func (x *NotificationUser) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *NotificationUser) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-type Comment struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
- FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL,omitempty"`
- ReplyUserID string `protobuf:"bytes,4,opt,name=replyUserID,proto3" json:"replyUserID,omitempty"`
- ReplyUserName string `protobuf:"bytes,5,opt,name=replyUserName,proto3" json:"replyUserName,omitempty"`
- ContentID string `protobuf:"bytes,6,opt,name=contentID,proto3" json:"contentID,omitempty"`
- Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`
- CreateTime int32 `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"`
-}
-
-func (x *Comment) Reset() {
- *x = Comment{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Comment) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Comment) ProtoMessage() {}
-
-func (x *Comment) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Comment.ProtoReflect.Descriptor instead.
-func (*Comment) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{20}
-}
-
-func (x *Comment) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *Comment) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-func (x *Comment) GetFaceURL() string {
- if x != nil {
- return x.FaceURL
- }
- return ""
-}
-
-func (x *Comment) GetReplyUserID() string {
- if x != nil {
- return x.ReplyUserID
- }
- return ""
-}
-
-func (x *Comment) GetReplyUserName() string {
- if x != nil {
- return x.ReplyUserName
- }
- return ""
-}
-
-func (x *Comment) GetContentID() string {
- if x != nil {
- return x.ContentID
- }
- return ""
-}
-
-func (x *Comment) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *Comment) GetCreateTime() int32 {
- if x != nil {
- return x.CreateTime
- }
- return 0
-}
-
-type PermissionGroup struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- GroupName string `protobuf:"bytes,1,opt,name=groupName,proto3" json:"groupName,omitempty"`
- GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID,omitempty"`
-}
-
-func (x *PermissionGroup) Reset() {
- *x = PermissionGroup{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *PermissionGroup) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PermissionGroup) ProtoMessage() {}
-
-func (x *PermissionGroup) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use PermissionGroup.ProtoReflect.Descriptor instead.
-func (*PermissionGroup) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{21}
-}
-
-func (x *PermissionGroup) GetGroupName() string {
- if x != nil {
- return x.GroupName
- }
- return ""
-}
-
-func (x *PermissionGroup) GetGroupID() string {
- if x != nil {
- return x.GroupID
- }
- return ""
-}
-
-type WorkMomentUser struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
-}
-
-func (x *WorkMomentUser) Reset() {
- *x = WorkMomentUser{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *WorkMomentUser) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*WorkMomentUser) ProtoMessage() {}
-
-func (x *WorkMomentUser) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use WorkMomentUser.ProtoReflect.Descriptor instead.
-func (*WorkMomentUser) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{22}
-}
-
-func (x *WorkMomentUser) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *WorkMomentUser) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-type WorkMoment struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName,omitempty"`
- FaceURL string `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL,omitempty"`
- Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
- LikeUserList []*WorkMomentUser `protobuf:"bytes,6,rep,name=likeUserList,proto3" json:"likeUserList,omitempty"`
- Comments []*Comment `protobuf:"bytes,7,rep,name=comments,proto3" json:"comments,omitempty"`
- Permission int32 `protobuf:"varint,8,opt,name=permission,proto3" json:"permission,omitempty"`
- PermissionUserList []*WorkMomentUser `protobuf:"bytes,9,rep,name=permissionUserList,proto3" json:"permissionUserList,omitempty"`
- PermissionGroupList []*PermissionGroup `protobuf:"bytes,10,rep,name=permissionGroupList,proto3" json:"permissionGroupList,omitempty"`
- AtUserList []*WorkMomentUser `protobuf:"bytes,11,rep,name=atUserList,proto3" json:"atUserList,omitempty"`
- CreateTime int32 `protobuf:"varint,12,opt,name=createTime,proto3" json:"createTime,omitempty"`
-}
-
-func (x *WorkMoment) Reset() {
- *x = WorkMoment{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *WorkMoment) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*WorkMoment) ProtoMessage() {}
-
-func (x *WorkMoment) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use WorkMoment.ProtoReflect.Descriptor instead.
-func (*WorkMoment) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{23}
-}
-
-func (x *WorkMoment) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *WorkMoment) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *WorkMoment) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-func (x *WorkMoment) GetFaceURL() string {
- if x != nil {
- return x.FaceURL
- }
- return ""
-}
-
-func (x *WorkMoment) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *WorkMoment) GetLikeUserList() []*WorkMomentUser {
- if x != nil {
- return x.LikeUserList
- }
- return nil
-}
-
-func (x *WorkMoment) GetComments() []*Comment {
- if x != nil {
- return x.Comments
- }
- return nil
-}
-
-func (x *WorkMoment) GetPermission() int32 {
- if x != nil {
- return x.Permission
- }
- return 0
-}
-
-func (x *WorkMoment) GetPermissionUserList() []*WorkMomentUser {
- if x != nil {
- return x.PermissionUserList
- }
- return nil
-}
-
-func (x *WorkMoment) GetPermissionGroupList() []*PermissionGroup {
- if x != nil {
- return x.PermissionGroupList
- }
- return nil
-}
-
-func (x *WorkMoment) GetAtUserList() []*WorkMomentUser {
- if x != nil {
- return x.AtUserList
- }
- return nil
-}
-
-func (x *WorkMoment) GetCreateTime() int32 {
- if x != nil {
- return x.CreateTime
- }
- return 0
-}
-
-type CreateOneWorkMomentReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMoment *WorkMoment `protobuf:"bytes,1,opt,name=workMoment,proto3" json:"workMoment,omitempty"`
- OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *CreateOneWorkMomentReq) Reset() {
- *x = CreateOneWorkMomentReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateOneWorkMomentReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateOneWorkMomentReq) ProtoMessage() {}
-
-func (x *CreateOneWorkMomentReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateOneWorkMomentReq.ProtoReflect.Descriptor instead.
-func (*CreateOneWorkMomentReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{24}
-}
-
-func (x *CreateOneWorkMomentReq) GetWorkMoment() *WorkMoment {
- if x != nil {
- return x.WorkMoment
- }
- return nil
-}
-
-func (x *CreateOneWorkMomentReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type CreateOneWorkMomentResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *CreateOneWorkMomentResp) Reset() {
- *x = CreateOneWorkMomentResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateOneWorkMomentResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateOneWorkMomentResp) ProtoMessage() {}
-
-func (x *CreateOneWorkMomentResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateOneWorkMomentResp.ProtoReflect.Descriptor instead.
-func (*CreateOneWorkMomentResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{25}
-}
-
-func (x *CreateOneWorkMomentResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type DeleteOneWorkMomentReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *DeleteOneWorkMomentReq) Reset() {
- *x = DeleteOneWorkMomentReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteOneWorkMomentReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteOneWorkMomentReq) ProtoMessage() {}
-
-func (x *DeleteOneWorkMomentReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteOneWorkMomentReq.ProtoReflect.Descriptor instead.
-func (*DeleteOneWorkMomentReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{26}
-}
-
-func (x *DeleteOneWorkMomentReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *DeleteOneWorkMomentReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *DeleteOneWorkMomentReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type DeleteOneWorkMomentResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *DeleteOneWorkMomentResp) Reset() {
- *x = DeleteOneWorkMomentResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteOneWorkMomentResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteOneWorkMomentResp) ProtoMessage() {}
-
-func (x *DeleteOneWorkMomentResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteOneWorkMomentResp.ProtoReflect.Descriptor instead.
-func (*DeleteOneWorkMomentResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{27}
-}
-
-func (x *DeleteOneWorkMomentResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type LikeOneWorkMomentReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- WorkMomentID string `protobuf:"bytes,2,opt,name=WorkMomentID,proto3" json:"WorkMomentID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *LikeOneWorkMomentReq) Reset() {
- *x = LikeOneWorkMomentReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[28]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *LikeOneWorkMomentReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*LikeOneWorkMomentReq) ProtoMessage() {}
-
-func (x *LikeOneWorkMomentReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[28]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use LikeOneWorkMomentReq.ProtoReflect.Descriptor instead.
-func (*LikeOneWorkMomentReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{28}
-}
-
-func (x *LikeOneWorkMomentReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *LikeOneWorkMomentReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *LikeOneWorkMomentReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type LikeOneWorkMomentResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *LikeOneWorkMomentResp) Reset() {
- *x = LikeOneWorkMomentResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[29]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *LikeOneWorkMomentResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*LikeOneWorkMomentResp) ProtoMessage() {}
-
-func (x *LikeOneWorkMomentResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[29]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use LikeOneWorkMomentResp.ProtoReflect.Descriptor instead.
-func (*LikeOneWorkMomentResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{29}
-}
-
-func (x *LikeOneWorkMomentResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type CommentOneWorkMomentReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- WorkMomentID string `protobuf:"bytes,2,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- ReplyUserID string `protobuf:"bytes,3,opt,name=replyUserID,proto3" json:"replyUserID,omitempty"`
- Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
- OperationID string `protobuf:"bytes,5,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *CommentOneWorkMomentReq) Reset() {
- *x = CommentOneWorkMomentReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[30]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CommentOneWorkMomentReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CommentOneWorkMomentReq) ProtoMessage() {}
-
-func (x *CommentOneWorkMomentReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[30]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CommentOneWorkMomentReq.ProtoReflect.Descriptor instead.
-func (*CommentOneWorkMomentReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{30}
-}
-
-func (x *CommentOneWorkMomentReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *CommentOneWorkMomentReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *CommentOneWorkMomentReq) GetReplyUserID() string {
- if x != nil {
- return x.ReplyUserID
- }
- return ""
-}
-
-func (x *CommentOneWorkMomentReq) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *CommentOneWorkMomentReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type CommentOneWorkMomentResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *CommentOneWorkMomentResp) Reset() {
- *x = CommentOneWorkMomentResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[31]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CommentOneWorkMomentResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CommentOneWorkMomentResp) ProtoMessage() {}
-
-func (x *CommentOneWorkMomentResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[31]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CommentOneWorkMomentResp.ProtoReflect.Descriptor instead.
-func (*CommentOneWorkMomentResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{31}
-}
-
-func (x *CommentOneWorkMomentResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type DeleteCommentReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- ContentID string `protobuf:"bytes,2,opt,name=contentID,proto3" json:"contentID,omitempty"`
- OpUserID string `protobuf:"bytes,3,opt,name=opUserID,proto3" json:"opUserID,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *DeleteCommentReq) Reset() {
- *x = DeleteCommentReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[32]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteCommentReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteCommentReq) ProtoMessage() {}
-
-func (x *DeleteCommentReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[32]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteCommentReq.ProtoReflect.Descriptor instead.
-func (*DeleteCommentReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{32}
-}
-
-func (x *DeleteCommentReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *DeleteCommentReq) GetContentID() string {
- if x != nil {
- return x.ContentID
- }
- return ""
-}
-
-func (x *DeleteCommentReq) GetOpUserID() string {
- if x != nil {
- return x.OpUserID
- }
- return ""
-}
-
-func (x *DeleteCommentReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type DeleteCommentResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *DeleteCommentResp) Reset() {
- *x = DeleteCommentResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[33]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteCommentResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteCommentResp) ProtoMessage() {}
-
-func (x *DeleteCommentResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[33]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteCommentResp.ProtoReflect.Descriptor instead.
-func (*DeleteCommentResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{33}
-}
-
-func (x *DeleteCommentResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type GetWorkMomentByIDReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- OpUserID string `protobuf:"bytes,2,opt,name=opUserID,proto3" json:"opUserID,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetWorkMomentByIDReq) Reset() {
- *x = GetWorkMomentByIDReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[34]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetWorkMomentByIDReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetWorkMomentByIDReq) ProtoMessage() {}
-
-func (x *GetWorkMomentByIDReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[34]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetWorkMomentByIDReq.ProtoReflect.Descriptor instead.
-func (*GetWorkMomentByIDReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{34}
-}
-
-func (x *GetWorkMomentByIDReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *GetWorkMomentByIDReq) GetOpUserID() string {
- if x != nil {
- return x.OpUserID
- }
- return ""
-}
-
-func (x *GetWorkMomentByIDReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type GetWorkMomentByIDResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- WorkMoment *WorkMoment `protobuf:"bytes,2,opt,name=workMoment,proto3" json:"workMoment,omitempty"`
-}
-
-func (x *GetWorkMomentByIDResp) Reset() {
- *x = GetWorkMomentByIDResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[35]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetWorkMomentByIDResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetWorkMomentByIDResp) ProtoMessage() {}
-
-func (x *GetWorkMomentByIDResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[35]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetWorkMomentByIDResp.ProtoReflect.Descriptor instead.
-func (*GetWorkMomentByIDResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{35}
-}
-
-func (x *GetWorkMomentByIDResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetWorkMomentByIDResp) GetWorkMoment() *WorkMoment {
- if x != nil {
- return x.WorkMoment
- }
- return nil
-}
-
-type ChangeWorkMomentPermissionReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- OpUserID string `protobuf:"bytes,2,opt,name=opUserID,proto3" json:"opUserID,omitempty"`
- Permission int32 `protobuf:"varint,3,opt,name=permission,proto3" json:"permission,omitempty"`
- PermissionUserIDList []string `protobuf:"bytes,4,rep,name=permissionUserIDList,proto3" json:"permissionUserIDList,omitempty"`
- OperationID string `protobuf:"bytes,5,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *ChangeWorkMomentPermissionReq) Reset() {
- *x = ChangeWorkMomentPermissionReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[36]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ChangeWorkMomentPermissionReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ChangeWorkMomentPermissionReq) ProtoMessage() {}
-
-func (x *ChangeWorkMomentPermissionReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[36]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ChangeWorkMomentPermissionReq.ProtoReflect.Descriptor instead.
-func (*ChangeWorkMomentPermissionReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{36}
-}
-
-func (x *ChangeWorkMomentPermissionReq) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *ChangeWorkMomentPermissionReq) GetOpUserID() string {
- if x != nil {
- return x.OpUserID
- }
- return ""
-}
-
-func (x *ChangeWorkMomentPermissionReq) GetPermission() int32 {
- if x != nil {
- return x.Permission
- }
- return 0
-}
-
-func (x *ChangeWorkMomentPermissionReq) GetPermissionUserIDList() []string {
- if x != nil {
- return x.PermissionUserIDList
- }
- return nil
-}
-
-func (x *ChangeWorkMomentPermissionReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type ChangeWorkMomentPermissionResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *ChangeWorkMomentPermissionResp) Reset() {
- *x = ChangeWorkMomentPermissionResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[37]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ChangeWorkMomentPermissionResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ChangeWorkMomentPermissionResp) ProtoMessage() {}
-
-func (x *ChangeWorkMomentPermissionResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[37]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ChangeWorkMomentPermissionResp.ProtoReflect.Descriptor instead.
-func (*ChangeWorkMomentPermissionResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{37}
-}
-
-func (x *ChangeWorkMomentPermissionResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-type GetUserWorkMomentsReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- OpUserID string `protobuf:"bytes,2,opt,name=opUserID,proto3" json:"opUserID,omitempty"`
- Pagination *sdkws.RequestPagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetUserWorkMomentsReq) Reset() {
- *x = GetUserWorkMomentsReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[38]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserWorkMomentsReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserWorkMomentsReq) ProtoMessage() {}
-
-func (x *GetUserWorkMomentsReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[38]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserWorkMomentsReq.ProtoReflect.Descriptor instead.
-func (*GetUserWorkMomentsReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{38}
-}
-
-func (x *GetUserWorkMomentsReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *GetUserWorkMomentsReq) GetOpUserID() string {
- if x != nil {
- return x.OpUserID
- }
- return ""
-}
-
-func (x *GetUserWorkMomentsReq) GetPagination() *sdkws.RequestPagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-func (x *GetUserWorkMomentsReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type GetUserWorkMomentsResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- WorkMoments []*WorkMoment `protobuf:"bytes,2,rep,name=workMoments,proto3" json:"workMoments,omitempty"`
- Pagination *sdkws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
-}
-
-func (x *GetUserWorkMomentsResp) Reset() {
- *x = GetUserWorkMomentsResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[39]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserWorkMomentsResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserWorkMomentsResp) ProtoMessage() {}
-
-func (x *GetUserWorkMomentsResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[39]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserWorkMomentsResp.ProtoReflect.Descriptor instead.
-func (*GetUserWorkMomentsResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{39}
-}
-
-func (x *GetUserWorkMomentsResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetUserWorkMomentsResp) GetWorkMoments() []*WorkMoment {
- if x != nil {
- return x.WorkMoments
- }
- return nil
-}
-
-func (x *GetUserWorkMomentsResp) GetPagination() *sdkws.ResponsePagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-type GetUserFriendWorkMomentsReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *GetUserFriendWorkMomentsReq) Reset() {
- *x = GetUserFriendWorkMomentsReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[40]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserFriendWorkMomentsReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserFriendWorkMomentsReq) ProtoMessage() {}
-
-func (x *GetUserFriendWorkMomentsReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[40]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserFriendWorkMomentsReq.ProtoReflect.Descriptor instead.
-func (*GetUserFriendWorkMomentsReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{40}
-}
-
-func (x *GetUserFriendWorkMomentsReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *GetUserFriendWorkMomentsReq) GetPagination() *sdkws.RequestPagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-func (x *GetUserFriendWorkMomentsReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type GetUserFriendWorkMomentsResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
- WorkMoments []*WorkMoment `protobuf:"bytes,2,rep,name=workMoments,proto3" json:"workMoments,omitempty"`
- Pagination *sdkws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
-}
-
-func (x *GetUserFriendWorkMomentsResp) Reset() {
- *x = GetUserFriendWorkMomentsResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[41]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserFriendWorkMomentsResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserFriendWorkMomentsResp) ProtoMessage() {}
-
-func (x *GetUserFriendWorkMomentsResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[41]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserFriendWorkMomentsResp.ProtoReflect.Descriptor instead.
-func (*GetUserFriendWorkMomentsResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{41}
-}
-
-func (x *GetUserFriendWorkMomentsResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-func (x *GetUserFriendWorkMomentsResp) GetWorkMoments() []*WorkMoment {
- if x != nil {
- return x.WorkMoments
- }
- return nil
-}
-
-func (x *GetUserFriendWorkMomentsResp) GetPagination() *sdkws.ResponsePagination {
- if x != nil {
- return x.Pagination
- }
- return nil
-}
-
-type WorkMomentNotificationMsg struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- NotificationMsgType int32 `protobuf:"varint,1,opt,name=notificationMsgType,proto3" json:"notificationMsgType,omitempty"`
- ReplyUserName string `protobuf:"bytes,2,opt,name=replyUserName,proto3" json:"replyUserName,omitempty"`
- ReplyUserID string `protobuf:"bytes,3,opt,name=replyUserID,proto3" json:"replyUserID,omitempty"`
- Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
- ContentID string `protobuf:"bytes,5,opt,name=contentID,proto3" json:"contentID,omitempty"`
- WorkMomentID string `protobuf:"bytes,6,opt,name=workMomentID,proto3" json:"workMomentID,omitempty"`
- UserID string `protobuf:"bytes,7,opt,name=userID,proto3" json:"userID,omitempty"`
- UserName string `protobuf:"bytes,8,opt,name=userName,proto3" json:"userName,omitempty"`
- FaceURL string `protobuf:"bytes,9,opt,name=faceURL,proto3" json:"faceURL,omitempty"`
- WorkMomentContent string `protobuf:"bytes,10,opt,name=workMomentContent,proto3" json:"workMomentContent,omitempty"`
- CreateTime int32 `protobuf:"varint,11,opt,name=createTime,proto3" json:"createTime,omitempty"`
-}
-
-func (x *WorkMomentNotificationMsg) Reset() {
- *x = WorkMomentNotificationMsg{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[42]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *WorkMomentNotificationMsg) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*WorkMomentNotificationMsg) ProtoMessage() {}
-
-func (x *WorkMomentNotificationMsg) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[42]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use WorkMomentNotificationMsg.ProtoReflect.Descriptor instead.
-func (*WorkMomentNotificationMsg) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{42}
-}
-
-func (x *WorkMomentNotificationMsg) GetNotificationMsgType() int32 {
- if x != nil {
- return x.NotificationMsgType
- }
- return 0
-}
-
-func (x *WorkMomentNotificationMsg) GetReplyUserName() string {
- if x != nil {
- return x.ReplyUserName
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetReplyUserID() string {
- if x != nil {
- return x.ReplyUserID
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetContent() string {
- if x != nil {
- return x.Content
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetContentID() string {
- if x != nil {
- return x.ContentID
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetWorkMomentID() string {
- if x != nil {
- return x.WorkMomentID
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetUserName() string {
- if x != nil {
- return x.UserName
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetFaceURL() string {
- if x != nil {
- return x.FaceURL
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetWorkMomentContent() string {
- if x != nil {
- return x.WorkMomentContent
- }
- return ""
-}
-
-func (x *WorkMomentNotificationMsg) GetCreateTime() int32 {
- if x != nil {
- return x.CreateTime
- }
- return 0
-}
-
-type SetUserWorkMomentsLevelReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
- Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID,omitempty"`
-}
-
-func (x *SetUserWorkMomentsLevelReq) Reset() {
- *x = SetUserWorkMomentsLevelReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[43]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SetUserWorkMomentsLevelReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SetUserWorkMomentsLevelReq) ProtoMessage() {}
-
-func (x *SetUserWorkMomentsLevelReq) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[43]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SetUserWorkMomentsLevelReq.ProtoReflect.Descriptor instead.
-func (*SetUserWorkMomentsLevelReq) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{43}
-}
-
-func (x *SetUserWorkMomentsLevelReq) GetUserID() string {
- if x != nil {
- return x.UserID
- }
- return ""
-}
-
-func (x *SetUserWorkMomentsLevelReq) GetLevel() int32 {
- if x != nil {
- return x.Level
- }
- return 0
-}
-
-func (x *SetUserWorkMomentsLevelReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
- }
- return ""
-}
-
-type SetUserWorkMomentsLevelResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp,omitempty"`
-}
-
-func (x *SetUserWorkMomentsLevelResp) Reset() {
- *x = SetUserWorkMomentsLevelResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_office_office_proto_msgTypes[44]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SetUserWorkMomentsLevelResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SetUserWorkMomentsLevelResp) ProtoMessage() {}
-
-func (x *SetUserWorkMomentsLevelResp) ProtoReflect() protoreflect.Message {
- mi := &file_office_office_proto_msgTypes[44]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SetUserWorkMomentsLevelResp.ProtoReflect.Descriptor instead.
-func (*SetUserWorkMomentsLevelResp) Descriptor() ([]byte, []int) {
- return file_office_office_proto_rawDescGZIP(), []int{44}
-}
-
-func (x *SetUserWorkMomentsLevelResp) GetCommonResp() *CommonResp {
- if x != nil {
- return x.CommonResp
- }
- return nil
-}
-
-var File_office_office_proto protoreflect.FileDescriptor
-
-var file_office_office_proto_rawDesc = []byte{
- 0x0a, 0x13, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x1a, 0x28, 0x4f,
- 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b,
- 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b, 0x5f, 0x77, 0x73, 0x2f, 0x77,
- 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
- 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x3d, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x14, 0x0a,
- 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61,
- 0x67, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a,
- 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x0f, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x55, 0x73, 0x65, 0x72,
- 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x4a, 0x0a, 0x0e, 0x47, 0x65,
- 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
- 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x66, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
- 0x72, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a,
- 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x82,
- 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x12,
- 0x18, 0x0a, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
- 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
- 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73,
- 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x49, 0x44, 0x22, 0x43, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63,
- 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44,
- 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x43, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xd1, 0x01,
- 0x0a, 0x09, 0x53, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
- 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x77,
- 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e,
- 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52,
- 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c,
- 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x55, 0x73, 0x65,
- 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72,
- 0x65, 0x64, 0x75, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x12,
- 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
- 0x44, 0x22, 0x40, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x22, 0xe4, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x32,
- 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x67, 0x4c, 0x69, 0x73,
- 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74,
- 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
- 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
- 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65,
- 0x6e, 0x64, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64,
- 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74,
- 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65,
- 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x18,
- 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
- 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x45, 0x0a, 0x0f, 0x53, 0x65,
- 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x32, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a,
- 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x22, 0x93, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64,
- 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65,
- 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x6f, 0x0a, 0x0a, 0x54, 0x61, 0x67, 0x53, 0x65,
- 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x2b, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73,
- 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,
- 0x2e, 0x54, 0x61, 0x67, 0x55, 0x73, 0x65, 0x72, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69,
- 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08,
- 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
- 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74,
- 0x54, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
- 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
- 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x74, 0x61,
- 0x67, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64,
- 0x4c, 0x6f, 0x67, 0x52, 0x0b, 0x74, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x73,
- 0x22, 0x63, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x42, 0x79,
- 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a,
- 0x05, 0x74, 0x61, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61,
- 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x67, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
- 0x54, 0x61, 0x67, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x1d, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x3e,
- 0x0a, 0x08, 0x4c, 0x69, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
- 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x46,
- 0x0a, 0x10, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65,
- 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
- 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52,
- 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c,
- 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4e,
- 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79,
- 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
- 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x22, 0x49, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d,
- 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x44, 0x0a, 0x0e, 0x57,
- 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
- 0x65, 0x22, 0x8c, 0x04, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74,
- 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08,
- 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65,
- 0x55, 0x52, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55,
- 0x52, 0x4c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0c,
- 0x6c, 0x69, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0c, 0x6c, 0x69, 0x6b, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x66, 0x66,
- 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6d,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69,
- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4d,
- 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x12, 0x70, 0x65, 0x72, 0x6d, 0x69,
- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, 0x0a,
- 0x13, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x4c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x66, 0x66,
- 0x69, 0x63, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x52, 0x13, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x47,
- 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0a, 0x61, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74,
- 0x55, 0x73, 0x65, 0x72, 0x52, 0x0a, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
- 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x22, 0x6e, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x32, 0x0a, 0x0a, 0x77, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
- 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20,
- 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
- 0x22, 0x4d, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22,
- 0x76, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e,
- 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
- 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x74, 0x0a, 0x14, 0x4c, 0x69, 0x6b, 0x65, 0x4f, 0x6e,
- 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16,
- 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x4b, 0x0a, 0x15,
- 0x4c, 0x69, 0x6b, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e,
- 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69,
- 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x17, 0x43, 0x6f,
- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a,
- 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49,
- 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65,
- 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a,
- 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22,
- 0x4e, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22,
- 0x92, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
- 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
- 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x47, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f,
- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x78, 0x0a,
- 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79,
- 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d,
- 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x7f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63,
- 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x77, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x1d, 0x43, 0x68, 0x61,
- 0x6e, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72,
- 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1a,
- 0x0a, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65,
- 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
- 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x14, 0x70, 0x65,
- 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69,
- 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
- 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20,
- 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
- 0x22, 0x54, 0x0a, 0x1e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e,
- 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
- 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
- 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x55, 0x73,
- 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x55, 0x73,
- 0x65, 0x72, 0x49, 0x44, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65,
- 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
- 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xc9, 0x01, 0x0a,
- 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52,
- 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0b, 0x77,
- 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61,
- 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61,
- 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74,
- 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44,
- 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70,
- 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69,
- 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xcf, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74,
- 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a,
- 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
- 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
- 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x03, 0x0a, 0x19, 0x57,
- 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x6f, 0x74, 0x69,
- 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65,
- 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
- 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16,
- 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61,
- 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x2c, 0x0a, 0x11,
- 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d,
- 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x6c, 0x0a, 0x1a, 0x53, 0x65,
- 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
- 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44,
- 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x51, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x55,
- 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x65,
- 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52,
- 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x32, 0xc8, 0x0a, 0x0a, 0x0d,
- 0x4f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
- 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67,
- 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65,
- 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a,
- 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x14, 0x2e, 0x6f, 0x66, 0x66,
- 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71,
- 0x1a, 0x15, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x54, 0x61, 0x67, 0x12, 0x14, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6f, 0x66, 0x66,
- 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x2f, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x54, 0x61, 0x67, 0x12, 0x11, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x12,
- 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x32, 0x54, 0x61,
- 0x67, 0x12, 0x16, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d,
- 0x73, 0x67, 0x32, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6f, 0x66, 0x66, 0x69,
- 0x63, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x32, 0x54, 0x61, 0x67, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64,
- 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65,
- 0x74, 0x54, 0x61, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x1a,
- 0x1a, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53,
- 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0e, 0x47,
- 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x42, 0x79, 0x49, 0x44, 0x12, 0x19, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61,
- 0x67, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63,
- 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x61, 0x67, 0x42, 0x79, 0x49, 0x44,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e,
- 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x13,
- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d,
- 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74,
- 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, 0x11, 0x4c, 0x69, 0x6b, 0x65, 0x4f, 0x6e, 0x65, 0x57,
- 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x6f, 0x66, 0x66, 0x69,
- 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x6b, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f,
- 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,
- 0x2e, 0x4c, 0x69, 0x6b, 0x65, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65,
- 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
- 0x74, 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f,
- 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x4f,
- 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a,
- 0x20, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
- 0x4f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x44, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65,
- 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d,
- 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1c, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d,
- 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x66, 0x66,
- 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e,
- 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x1a, 0x43, 0x68, 0x61,
- 0x6e, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72,
- 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,
- 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e,
- 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x26,
- 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
- 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
- 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x66,
- 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x18, 0x47,
- 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b,
- 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,
- 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x6f,
- 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69,
- 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x62, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72,
- 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x22, 0x2e,
- 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x57, 0x6f,
- 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65,
- 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x65, 0x76,
- 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x42, 0x21, 0x5a, 0x1f, 0x4f, 0x70, 0x65, 0x6e, 0x5f, 0x49,
- 0x4d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x66, 0x66, 0x69,
- 0x63, 0x65, 0x3b, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
-}
-
-var (
- file_office_office_proto_rawDescOnce sync.Once
- file_office_office_proto_rawDescData = file_office_office_proto_rawDesc
-)
-
-func file_office_office_proto_rawDescGZIP() []byte {
- file_office_office_proto_rawDescOnce.Do(func() {
- file_office_office_proto_rawDescData = protoimpl.X.CompressGZIP(file_office_office_proto_rawDescData)
- })
- return file_office_office_proto_rawDescData
-}
-
-var file_office_office_proto_msgTypes = make([]protoimpl.MessageInfo, 45)
-var file_office_office_proto_goTypes = []interface{}{
- (*CommonResp)(nil), // 0: office.CommonResp
- (*TagUser)(nil), // 1: office.TagUser
- (*Tag)(nil), // 2: office.Tag
- (*GetUserTagsReq)(nil), // 3: office.GetUserTagsReq
- (*GetUserTagsResp)(nil), // 4: office.GetUserTagsResp
- (*CreateTagReq)(nil), // 5: office.CreateTagReq
- (*CreateTagResp)(nil), // 6: office.CreateTagResp
- (*DeleteTagReq)(nil), // 7: office.DeleteTagReq
- (*DeleteTagResp)(nil), // 8: office.DeleteTagResp
- (*SetTagReq)(nil), // 9: office.SetTagReq
- (*SetTagResp)(nil), // 10: office.SetTagResp
- (*SendMsg2TagReq)(nil), // 11: office.SendMsg2TagReq
- (*SendMsg2TagResp)(nil), // 12: office.SendMsg2TagResp
- (*GetTagSendLogsReq)(nil), // 13: office.GetTagSendLogsReq
- (*TagSendLog)(nil), // 14: office.TagSendLog
- (*GetTagSendLogsResp)(nil), // 15: office.GetTagSendLogsResp
- (*GetUserTagByIDReq)(nil), // 16: office.GetUserTagByIDReq
- (*GetUserTagByIDResp)(nil), // 17: office.GetUserTagByIDResp
- (*LikeUser)(nil), // 18: office.LikeUser
- (*NotificationUser)(nil), // 19: office.NotificationUser
- (*Comment)(nil), // 20: office.Comment
- (*PermissionGroup)(nil), // 21: office.PermissionGroup
- (*WorkMomentUser)(nil), // 22: office.WorkMomentUser
- (*WorkMoment)(nil), // 23: office.WorkMoment
- (*CreateOneWorkMomentReq)(nil), // 24: office.CreateOneWorkMomentReq
- (*CreateOneWorkMomentResp)(nil), // 25: office.CreateOneWorkMomentResp
- (*DeleteOneWorkMomentReq)(nil), // 26: office.DeleteOneWorkMomentReq
- (*DeleteOneWorkMomentResp)(nil), // 27: office.DeleteOneWorkMomentResp
- (*LikeOneWorkMomentReq)(nil), // 28: office.LikeOneWorkMomentReq
- (*LikeOneWorkMomentResp)(nil), // 29: office.LikeOneWorkMomentResp
- (*CommentOneWorkMomentReq)(nil), // 30: office.CommentOneWorkMomentReq
- (*CommentOneWorkMomentResp)(nil), // 31: office.CommentOneWorkMomentResp
- (*DeleteCommentReq)(nil), // 32: office.DeleteCommentReq
- (*DeleteCommentResp)(nil), // 33: office.DeleteCommentResp
- (*GetWorkMomentByIDReq)(nil), // 34: office.GetWorkMomentByIDReq
- (*GetWorkMomentByIDResp)(nil), // 35: office.GetWorkMomentByIDResp
- (*ChangeWorkMomentPermissionReq)(nil), // 36: office.ChangeWorkMomentPermissionReq
- (*ChangeWorkMomentPermissionResp)(nil), // 37: office.ChangeWorkMomentPermissionResp
- (*GetUserWorkMomentsReq)(nil), // 38: office.GetUserWorkMomentsReq
- (*GetUserWorkMomentsResp)(nil), // 39: office.GetUserWorkMomentsResp
- (*GetUserFriendWorkMomentsReq)(nil), // 40: office.GetUserFriendWorkMomentsReq
- (*GetUserFriendWorkMomentsResp)(nil), // 41: office.GetUserFriendWorkMomentsResp
- (*WorkMomentNotificationMsg)(nil), // 42: office.WorkMomentNotificationMsg
- (*SetUserWorkMomentsLevelReq)(nil), // 43: office.SetUserWorkMomentsLevelReq
- (*SetUserWorkMomentsLevelResp)(nil), // 44: office.SetUserWorkMomentsLevelResp
- (*sdkws.RequestPagination)(nil), // 45: sdkws.RequestPagination
- (*sdkws.ResponsePagination)(nil), // 46: sdkws.ResponsePagination
-}
-var file_office_office_proto_depIdxs = []int32{
- 1, // 0: office.Tag.userList:type_name -> office.TagUser
- 0, // 1: office.GetUserTagsResp.commonResp:type_name -> office.CommonResp
- 2, // 2: office.GetUserTagsResp.tags:type_name -> office.Tag
- 0, // 3: office.CreateTagResp.commonResp:type_name -> office.CommonResp
- 0, // 4: office.DeleteTagResp.commonResp:type_name -> office.CommonResp
- 0, // 5: office.SetTagResp.commonResp:type_name -> office.CommonResp
- 0, // 6: office.SendMsg2TagResp.commonResp:type_name -> office.CommonResp
- 45, // 7: office.GetTagSendLogsReq.Pagination:type_name -> sdkws.RequestPagination
- 1, // 8: office.TagSendLog.userList:type_name -> office.TagUser
- 0, // 9: office.GetTagSendLogsResp.commonResp:type_name -> office.CommonResp
- 46, // 10: office.GetTagSendLogsResp.Pagination:type_name -> sdkws.ResponsePagination
- 14, // 11: office.GetTagSendLogsResp.tagSendLogs:type_name -> office.TagSendLog
- 0, // 12: office.GetUserTagByIDResp.commonResp:type_name -> office.CommonResp
- 2, // 13: office.GetUserTagByIDResp.tag:type_name -> office.Tag
- 22, // 14: office.WorkMoment.likeUserList:type_name -> office.WorkMomentUser
- 20, // 15: office.WorkMoment.comments:type_name -> office.Comment
- 22, // 16: office.WorkMoment.permissionUserList:type_name -> office.WorkMomentUser
- 21, // 17: office.WorkMoment.permissionGroupList:type_name -> office.PermissionGroup
- 22, // 18: office.WorkMoment.atUserList:type_name -> office.WorkMomentUser
- 23, // 19: office.CreateOneWorkMomentReq.workMoment:type_name -> office.WorkMoment
- 0, // 20: office.CreateOneWorkMomentResp.commonResp:type_name -> office.CommonResp
- 0, // 21: office.DeleteOneWorkMomentResp.commonResp:type_name -> office.CommonResp
- 0, // 22: office.LikeOneWorkMomentResp.commonResp:type_name -> office.CommonResp
- 0, // 23: office.CommentOneWorkMomentResp.commonResp:type_name -> office.CommonResp
- 0, // 24: office.DeleteCommentResp.commonResp:type_name -> office.CommonResp
- 0, // 25: office.GetWorkMomentByIDResp.commonResp:type_name -> office.CommonResp
- 23, // 26: office.GetWorkMomentByIDResp.workMoment:type_name -> office.WorkMoment
- 0, // 27: office.ChangeWorkMomentPermissionResp.commonResp:type_name -> office.CommonResp
- 45, // 28: office.GetUserWorkMomentsReq.Pagination:type_name -> sdkws.RequestPagination
- 0, // 29: office.GetUserWorkMomentsResp.commonResp:type_name -> office.CommonResp
- 23, // 30: office.GetUserWorkMomentsResp.workMoments:type_name -> office.WorkMoment
- 46, // 31: office.GetUserWorkMomentsResp.Pagination:type_name -> sdkws.ResponsePagination
- 45, // 32: office.GetUserFriendWorkMomentsReq.Pagination:type_name -> sdkws.RequestPagination
- 0, // 33: office.GetUserFriendWorkMomentsResp.commonResp:type_name -> office.CommonResp
- 23, // 34: office.GetUserFriendWorkMomentsResp.workMoments:type_name -> office.WorkMoment
- 46, // 35: office.GetUserFriendWorkMomentsResp.Pagination:type_name -> sdkws.ResponsePagination
- 0, // 36: office.SetUserWorkMomentsLevelResp.commonResp:type_name -> office.CommonResp
- 3, // 37: office.OfficeService.GetUserTags:input_type -> office.GetUserTagsReq
- 5, // 38: office.OfficeService.CreateTag:input_type -> office.CreateTagReq
- 7, // 39: office.OfficeService.DeleteTag:input_type -> office.DeleteTagReq
- 9, // 40: office.OfficeService.SetTag:input_type -> office.SetTagReq
- 11, // 41: office.OfficeService.SendMsg2Tag:input_type -> office.SendMsg2TagReq
- 13, // 42: office.OfficeService.GetTagSendLogs:input_type -> office.GetTagSendLogsReq
- 16, // 43: office.OfficeService.GetUserTagByID:input_type -> office.GetUserTagByIDReq
- 24, // 44: office.OfficeService.CreateOneWorkMoment:input_type -> office.CreateOneWorkMomentReq
- 26, // 45: office.OfficeService.DeleteOneWorkMoment:input_type -> office.DeleteOneWorkMomentReq
- 28, // 46: office.OfficeService.LikeOneWorkMoment:input_type -> office.LikeOneWorkMomentReq
- 30, // 47: office.OfficeService.CommentOneWorkMoment:input_type -> office.CommentOneWorkMomentReq
- 32, // 48: office.OfficeService.DeleteComment:input_type -> office.DeleteCommentReq
- 34, // 49: office.OfficeService.GetWorkMomentByID:input_type -> office.GetWorkMomentByIDReq
- 36, // 50: office.OfficeService.ChangeWorkMomentPermission:input_type -> office.ChangeWorkMomentPermissionReq
- 38, // 51: office.OfficeService.GetUserWorkMoments:input_type -> office.GetUserWorkMomentsReq
- 40, // 52: office.OfficeService.GetUserFriendWorkMoments:input_type -> office.GetUserFriendWorkMomentsReq
- 43, // 53: office.OfficeService.SetUserWorkMomentsLevel:input_type -> office.SetUserWorkMomentsLevelReq
- 4, // 54: office.OfficeService.GetUserTags:output_type -> office.GetUserTagsResp
- 6, // 55: office.OfficeService.CreateTag:output_type -> office.CreateTagResp
- 8, // 56: office.OfficeService.DeleteTag:output_type -> office.DeleteTagResp
- 10, // 57: office.OfficeService.SetTag:output_type -> office.SetTagResp
- 12, // 58: office.OfficeService.SendMsg2Tag:output_type -> office.SendMsg2TagResp
- 15, // 59: office.OfficeService.GetTagSendLogs:output_type -> office.GetTagSendLogsResp
- 17, // 60: office.OfficeService.GetUserTagByID:output_type -> office.GetUserTagByIDResp
- 25, // 61: office.OfficeService.CreateOneWorkMoment:output_type -> office.CreateOneWorkMomentResp
- 27, // 62: office.OfficeService.DeleteOneWorkMoment:output_type -> office.DeleteOneWorkMomentResp
- 29, // 63: office.OfficeService.LikeOneWorkMoment:output_type -> office.LikeOneWorkMomentResp
- 31, // 64: office.OfficeService.CommentOneWorkMoment:output_type -> office.CommentOneWorkMomentResp
- 33, // 65: office.OfficeService.DeleteComment:output_type -> office.DeleteCommentResp
- 35, // 66: office.OfficeService.GetWorkMomentByID:output_type -> office.GetWorkMomentByIDResp
- 37, // 67: office.OfficeService.ChangeWorkMomentPermission:output_type -> office.ChangeWorkMomentPermissionResp
- 39, // 68: office.OfficeService.GetUserWorkMoments:output_type -> office.GetUserWorkMomentsResp
- 41, // 69: office.OfficeService.GetUserFriendWorkMoments:output_type -> office.GetUserFriendWorkMomentsResp
- 44, // 70: office.OfficeService.SetUserWorkMomentsLevel:output_type -> office.SetUserWorkMomentsLevelResp
- 54, // [54:71] is the sub-list for method output_type
- 37, // [37:54] is the sub-list for method input_type
- 37, // [37:37] is the sub-list for extension type_name
- 37, // [37:37] is the sub-list for extension extendee
- 0, // [0:37] is the sub-list for field type_name
-}
-
-func init() { file_office_office_proto_init() }
-func file_office_office_proto_init() {
- if File_office_office_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_office_office_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CommonResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TagUser); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Tag); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserTagsReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserTagsResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateTagReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateTagResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteTagReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteTagResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetTagReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetTagResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SendMsg2TagReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SendMsg2TagResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTagSendLogsReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TagSendLog); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTagSendLogsResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserTagByIDReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserTagByIDResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*LikeUser); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NotificationUser); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Comment); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PermissionGroup); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*WorkMomentUser); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*WorkMoment); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateOneWorkMomentReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateOneWorkMomentResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteOneWorkMomentReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteOneWorkMomentResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*LikeOneWorkMomentReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*LikeOneWorkMomentResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CommentOneWorkMomentReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CommentOneWorkMomentResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteCommentReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteCommentResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetWorkMomentByIDReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetWorkMomentByIDResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ChangeWorkMomentPermissionReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ChangeWorkMomentPermissionResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserWorkMomentsReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserWorkMomentsResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserFriendWorkMomentsReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserFriendWorkMomentsResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*WorkMomentNotificationMsg); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetUserWorkMomentsLevelReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_office_office_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetUserWorkMomentsLevelResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_office_office_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 45,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_office_office_proto_goTypes,
- DependencyIndexes: file_office_office_proto_depIdxs,
- MessageInfos: file_office_office_proto_msgTypes,
- }.Build()
- File_office_office_proto = out.File
- file_office_office_proto_rawDesc = nil
- file_office_office_proto_goTypes = nil
- file_office_office_proto_depIdxs = nil
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConnInterface
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion6
-
-// OfficeServiceClient is the client API for OfficeService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type OfficeServiceClient interface {
- GetUserTags(ctx context.Context, in *GetUserTagsReq, opts ...grpc.CallOption) (*GetUserTagsResp, error)
- CreateTag(ctx context.Context, in *CreateTagReq, opts ...grpc.CallOption) (*CreateTagResp, error)
- DeleteTag(ctx context.Context, in *DeleteTagReq, opts ...grpc.CallOption) (*DeleteTagResp, error)
- SetTag(ctx context.Context, in *SetTagReq, opts ...grpc.CallOption) (*SetTagResp, error)
- SendMsg2Tag(ctx context.Context, in *SendMsg2TagReq, opts ...grpc.CallOption) (*SendMsg2TagResp, error)
- GetTagSendLogs(ctx context.Context, in *GetTagSendLogsReq, opts ...grpc.CallOption) (*GetTagSendLogsResp, error)
- GetUserTagByID(ctx context.Context, in *GetUserTagByIDReq, opts ...grpc.CallOption) (*GetUserTagByIDResp, error)
- CreateOneWorkMoment(ctx context.Context, in *CreateOneWorkMomentReq, opts ...grpc.CallOption) (*CreateOneWorkMomentResp, error)
- DeleteOneWorkMoment(ctx context.Context, in *DeleteOneWorkMomentReq, opts ...grpc.CallOption) (*DeleteOneWorkMomentResp, error)
- LikeOneWorkMoment(ctx context.Context, in *LikeOneWorkMomentReq, opts ...grpc.CallOption) (*LikeOneWorkMomentResp, error)
- CommentOneWorkMoment(ctx context.Context, in *CommentOneWorkMomentReq, opts ...grpc.CallOption) (*CommentOneWorkMomentResp, error)
- DeleteComment(ctx context.Context, in *DeleteCommentReq, opts ...grpc.CallOption) (*DeleteCommentResp, error)
- GetWorkMomentByID(ctx context.Context, in *GetWorkMomentByIDReq, opts ...grpc.CallOption) (*GetWorkMomentByIDResp, error)
- ChangeWorkMomentPermission(ctx context.Context, in *ChangeWorkMomentPermissionReq, opts ...grpc.CallOption) (*ChangeWorkMomentPermissionResp, error)
- /// user self
- GetUserWorkMoments(ctx context.Context, in *GetUserWorkMomentsReq, opts ...grpc.CallOption) (*GetUserWorkMomentsResp, error)
- /// users friend
- GetUserFriendWorkMoments(ctx context.Context, in *GetUserFriendWorkMomentsReq, opts ...grpc.CallOption) (*GetUserFriendWorkMomentsResp, error)
- SetUserWorkMomentsLevel(ctx context.Context, in *SetUserWorkMomentsLevelReq, opts ...grpc.CallOption) (*SetUserWorkMomentsLevelResp, error)
-}
-
-type officeServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewOfficeServiceClient(cc grpc.ClientConnInterface) OfficeServiceClient {
- return &officeServiceClient{cc}
-}
-
-func (c *officeServiceClient) GetUserTags(ctx context.Context, in *GetUserTagsReq, opts ...grpc.CallOption) (*GetUserTagsResp, error) {
- out := new(GetUserTagsResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetUserTags", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) CreateTag(ctx context.Context, in *CreateTagReq, opts ...grpc.CallOption) (*CreateTagResp, error) {
- out := new(CreateTagResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/CreateTag", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) DeleteTag(ctx context.Context, in *DeleteTagReq, opts ...grpc.CallOption) (*DeleteTagResp, error) {
- out := new(DeleteTagResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/DeleteTag", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) SetTag(ctx context.Context, in *SetTagReq, opts ...grpc.CallOption) (*SetTagResp, error) {
- out := new(SetTagResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/SetTag", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) SendMsg2Tag(ctx context.Context, in *SendMsg2TagReq, opts ...grpc.CallOption) (*SendMsg2TagResp, error) {
- out := new(SendMsg2TagResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/SendMsg2Tag", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) GetTagSendLogs(ctx context.Context, in *GetTagSendLogsReq, opts ...grpc.CallOption) (*GetTagSendLogsResp, error) {
- out := new(GetTagSendLogsResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetTagSendLogs", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) GetUserTagByID(ctx context.Context, in *GetUserTagByIDReq, opts ...grpc.CallOption) (*GetUserTagByIDResp, error) {
- out := new(GetUserTagByIDResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetUserTagByID", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) CreateOneWorkMoment(ctx context.Context, in *CreateOneWorkMomentReq, opts ...grpc.CallOption) (*CreateOneWorkMomentResp, error) {
- out := new(CreateOneWorkMomentResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/CreateOneWorkMoment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) DeleteOneWorkMoment(ctx context.Context, in *DeleteOneWorkMomentReq, opts ...grpc.CallOption) (*DeleteOneWorkMomentResp, error) {
- out := new(DeleteOneWorkMomentResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/DeleteOneWorkMoment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) LikeOneWorkMoment(ctx context.Context, in *LikeOneWorkMomentReq, opts ...grpc.CallOption) (*LikeOneWorkMomentResp, error) {
- out := new(LikeOneWorkMomentResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/LikeOneWorkMoment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) CommentOneWorkMoment(ctx context.Context, in *CommentOneWorkMomentReq, opts ...grpc.CallOption) (*CommentOneWorkMomentResp, error) {
- out := new(CommentOneWorkMomentResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/CommentOneWorkMoment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) DeleteComment(ctx context.Context, in *DeleteCommentReq, opts ...grpc.CallOption) (*DeleteCommentResp, error) {
- out := new(DeleteCommentResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/DeleteComment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) GetWorkMomentByID(ctx context.Context, in *GetWorkMomentByIDReq, opts ...grpc.CallOption) (*GetWorkMomentByIDResp, error) {
- out := new(GetWorkMomentByIDResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetWorkMomentByID", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) ChangeWorkMomentPermission(ctx context.Context, in *ChangeWorkMomentPermissionReq, opts ...grpc.CallOption) (*ChangeWorkMomentPermissionResp, error) {
- out := new(ChangeWorkMomentPermissionResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/ChangeWorkMomentPermission", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) GetUserWorkMoments(ctx context.Context, in *GetUserWorkMomentsReq, opts ...grpc.CallOption) (*GetUserWorkMomentsResp, error) {
- out := new(GetUserWorkMomentsResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetUserWorkMoments", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) GetUserFriendWorkMoments(ctx context.Context, in *GetUserFriendWorkMomentsReq, opts ...grpc.CallOption) (*GetUserFriendWorkMomentsResp, error) {
- out := new(GetUserFriendWorkMomentsResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/GetUserFriendWorkMoments", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *officeServiceClient) SetUserWorkMomentsLevel(ctx context.Context, in *SetUserWorkMomentsLevelReq, opts ...grpc.CallOption) (*SetUserWorkMomentsLevelResp, error) {
- out := new(SetUserWorkMomentsLevelResp)
- err := c.cc.Invoke(ctx, "/office.OfficeService/SetUserWorkMomentsLevel", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// OfficeServiceServer is the server API for OfficeService service.
-type OfficeServiceServer interface {
- GetUserTags(context.Context, *GetUserTagsReq) (*GetUserTagsResp, error)
- CreateTag(context.Context, *CreateTagReq) (*CreateTagResp, error)
- DeleteTag(context.Context, *DeleteTagReq) (*DeleteTagResp, error)
- SetTag(context.Context, *SetTagReq) (*SetTagResp, error)
- SendMsg2Tag(context.Context, *SendMsg2TagReq) (*SendMsg2TagResp, error)
- GetTagSendLogs(context.Context, *GetTagSendLogsReq) (*GetTagSendLogsResp, error)
- GetUserTagByID(context.Context, *GetUserTagByIDReq) (*GetUserTagByIDResp, error)
- CreateOneWorkMoment(context.Context, *CreateOneWorkMomentReq) (*CreateOneWorkMomentResp, error)
- DeleteOneWorkMoment(context.Context, *DeleteOneWorkMomentReq) (*DeleteOneWorkMomentResp, error)
- LikeOneWorkMoment(context.Context, *LikeOneWorkMomentReq) (*LikeOneWorkMomentResp, error)
- CommentOneWorkMoment(context.Context, *CommentOneWorkMomentReq) (*CommentOneWorkMomentResp, error)
- DeleteComment(context.Context, *DeleteCommentReq) (*DeleteCommentResp, error)
- GetWorkMomentByID(context.Context, *GetWorkMomentByIDReq) (*GetWorkMomentByIDResp, error)
- ChangeWorkMomentPermission(context.Context, *ChangeWorkMomentPermissionReq) (*ChangeWorkMomentPermissionResp, error)
- /// user self
- GetUserWorkMoments(context.Context, *GetUserWorkMomentsReq) (*GetUserWorkMomentsResp, error)
- /// users friend
- GetUserFriendWorkMoments(context.Context, *GetUserFriendWorkMomentsReq) (*GetUserFriendWorkMomentsResp, error)
- SetUserWorkMomentsLevel(context.Context, *SetUserWorkMomentsLevelReq) (*SetUserWorkMomentsLevelResp, error)
-}
-
-// UnimplementedOfficeServiceServer can be embedded to have forward compatible implementations.
-type UnimplementedOfficeServiceServer struct {
-}
-
-func (*UnimplementedOfficeServiceServer) GetUserTags(context.Context, *GetUserTagsReq) (*GetUserTagsResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetUserTags not implemented")
-}
-func (*UnimplementedOfficeServiceServer) CreateTag(context.Context, *CreateTagReq) (*CreateTagResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateTag not implemented")
-}
-func (*UnimplementedOfficeServiceServer) DeleteTag(context.Context, *DeleteTagReq) (*DeleteTagResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented")
-}
-func (*UnimplementedOfficeServiceServer) SetTag(context.Context, *SetTagReq) (*SetTagResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SetTag not implemented")
-}
-func (*UnimplementedOfficeServiceServer) SendMsg2Tag(context.Context, *SendMsg2TagReq) (*SendMsg2TagResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SendMsg2Tag not implemented")
-}
-func (*UnimplementedOfficeServiceServer) GetTagSendLogs(context.Context, *GetTagSendLogsReq) (*GetTagSendLogsResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetTagSendLogs not implemented")
-}
-func (*UnimplementedOfficeServiceServer) GetUserTagByID(context.Context, *GetUserTagByIDReq) (*GetUserTagByIDResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetUserTagByID not implemented")
-}
-func (*UnimplementedOfficeServiceServer) CreateOneWorkMoment(context.Context, *CreateOneWorkMomentReq) (*CreateOneWorkMomentResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateOneWorkMoment not implemented")
-}
-func (*UnimplementedOfficeServiceServer) DeleteOneWorkMoment(context.Context, *DeleteOneWorkMomentReq) (*DeleteOneWorkMomentResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteOneWorkMoment not implemented")
-}
-func (*UnimplementedOfficeServiceServer) LikeOneWorkMoment(context.Context, *LikeOneWorkMomentReq) (*LikeOneWorkMomentResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LikeOneWorkMoment not implemented")
-}
-func (*UnimplementedOfficeServiceServer) CommentOneWorkMoment(context.Context, *CommentOneWorkMomentReq) (*CommentOneWorkMomentResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CommentOneWorkMoment not implemented")
-}
-func (*UnimplementedOfficeServiceServer) DeleteComment(context.Context, *DeleteCommentReq) (*DeleteCommentResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented")
-}
-func (*UnimplementedOfficeServiceServer) GetWorkMomentByID(context.Context, *GetWorkMomentByIDReq) (*GetWorkMomentByIDResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetWorkMomentByID not implemented")
-}
-func (*UnimplementedOfficeServiceServer) ChangeWorkMomentPermission(context.Context, *ChangeWorkMomentPermissionReq) (*ChangeWorkMomentPermissionResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ChangeWorkMomentPermission not implemented")
-}
-func (*UnimplementedOfficeServiceServer) GetUserWorkMoments(context.Context, *GetUserWorkMomentsReq) (*GetUserWorkMomentsResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetUserWorkMoments not implemented")
-}
-func (*UnimplementedOfficeServiceServer) GetUserFriendWorkMoments(context.Context, *GetUserFriendWorkMomentsReq) (*GetUserFriendWorkMomentsResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetUserFriendWorkMoments not implemented")
-}
-func (*UnimplementedOfficeServiceServer) SetUserWorkMomentsLevel(context.Context, *SetUserWorkMomentsLevelReq) (*SetUserWorkMomentsLevelResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SetUserWorkMomentsLevel not implemented")
-}
-
-func RegisterOfficeServiceServer(s *grpc.Server, srv OfficeServiceServer) {
- s.RegisterService(&_OfficeService_serviceDesc, srv)
-}
-
-func _OfficeService_GetUserTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserTagsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetUserTags(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetUserTags",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetUserTags(ctx, req.(*GetUserTagsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_CreateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateTagReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).CreateTag(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/CreateTag",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).CreateTag(ctx, req.(*CreateTagReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_DeleteTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteTagReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).DeleteTag(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/DeleteTag",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).DeleteTag(ctx, req.(*DeleteTagReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_SetTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SetTagReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).SetTag(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/SetTag",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).SetTag(ctx, req.(*SetTagReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_SendMsg2Tag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SendMsg2TagReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).SendMsg2Tag(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/SendMsg2Tag",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).SendMsg2Tag(ctx, req.(*SendMsg2TagReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_GetTagSendLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetTagSendLogsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetTagSendLogs(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetTagSendLogs",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetTagSendLogs(ctx, req.(*GetTagSendLogsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_GetUserTagByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserTagByIDReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetUserTagByID(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetUserTagByID",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetUserTagByID(ctx, req.(*GetUserTagByIDReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_CreateOneWorkMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateOneWorkMomentReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).CreateOneWorkMoment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/CreateOneWorkMoment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).CreateOneWorkMoment(ctx, req.(*CreateOneWorkMomentReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_DeleteOneWorkMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteOneWorkMomentReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).DeleteOneWorkMoment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/DeleteOneWorkMoment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).DeleteOneWorkMoment(ctx, req.(*DeleteOneWorkMomentReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_LikeOneWorkMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LikeOneWorkMomentReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).LikeOneWorkMoment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/LikeOneWorkMoment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).LikeOneWorkMoment(ctx, req.(*LikeOneWorkMomentReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_CommentOneWorkMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CommentOneWorkMomentReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).CommentOneWorkMoment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/CommentOneWorkMoment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).CommentOneWorkMoment(ctx, req.(*CommentOneWorkMomentReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteCommentReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).DeleteComment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/DeleteComment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).DeleteComment(ctx, req.(*DeleteCommentReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_GetWorkMomentByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetWorkMomentByIDReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetWorkMomentByID(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetWorkMomentByID",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetWorkMomentByID(ctx, req.(*GetWorkMomentByIDReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_ChangeWorkMomentPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ChangeWorkMomentPermissionReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).ChangeWorkMomentPermission(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/ChangeWorkMomentPermission",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).ChangeWorkMomentPermission(ctx, req.(*ChangeWorkMomentPermissionReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_GetUserWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserWorkMomentsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetUserWorkMoments",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, req.(*GetUserWorkMomentsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_GetUserFriendWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserFriendWorkMomentsReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/GetUserFriendWorkMoments",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, req.(*GetUserFriendWorkMomentsReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _OfficeService_SetUserWorkMomentsLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SetUserWorkMomentsLevelReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OfficeServiceServer).SetUserWorkMomentsLevel(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/office.OfficeService/SetUserWorkMomentsLevel",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OfficeServiceServer).SetUserWorkMomentsLevel(ctx, req.(*SetUserWorkMomentsLevelReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-var _OfficeService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "office.OfficeService",
- HandlerType: (*OfficeServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetUserTags",
- Handler: _OfficeService_GetUserTags_Handler,
- },
- {
- MethodName: "CreateTag",
- Handler: _OfficeService_CreateTag_Handler,
- },
- {
- MethodName: "DeleteTag",
- Handler: _OfficeService_DeleteTag_Handler,
- },
- {
- MethodName: "SetTag",
- Handler: _OfficeService_SetTag_Handler,
- },
- {
- MethodName: "SendMsg2Tag",
- Handler: _OfficeService_SendMsg2Tag_Handler,
- },
- {
- MethodName: "GetTagSendLogs",
- Handler: _OfficeService_GetTagSendLogs_Handler,
- },
- {
- MethodName: "GetUserTagByID",
- Handler: _OfficeService_GetUserTagByID_Handler,
- },
- {
- MethodName: "CreateOneWorkMoment",
- Handler: _OfficeService_CreateOneWorkMoment_Handler,
- },
- {
- MethodName: "DeleteOneWorkMoment",
- Handler: _OfficeService_DeleteOneWorkMoment_Handler,
- },
- {
- MethodName: "LikeOneWorkMoment",
- Handler: _OfficeService_LikeOneWorkMoment_Handler,
- },
- {
- MethodName: "CommentOneWorkMoment",
- Handler: _OfficeService_CommentOneWorkMoment_Handler,
- },
- {
- MethodName: "DeleteComment",
- Handler: _OfficeService_DeleteComment_Handler,
- },
- {
- MethodName: "GetWorkMomentByID",
- Handler: _OfficeService_GetWorkMomentByID_Handler,
- },
- {
- MethodName: "ChangeWorkMomentPermission",
- Handler: _OfficeService_ChangeWorkMomentPermission_Handler,
- },
- {
- MethodName: "GetUserWorkMoments",
- Handler: _OfficeService_GetUserWorkMoments_Handler,
- },
- {
- MethodName: "GetUserFriendWorkMoments",
- Handler: _OfficeService_GetUserFriendWorkMoments_Handler,
- },
- {
- MethodName: "SetUserWorkMomentsLevel",
- Handler: _OfficeService_SetUserWorkMomentsLevel_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "office/office.proto",
-}
diff --git a/pkg/proto/office/office.proto b/pkg/proto/office/office.proto
deleted file mode 100644
index 213fa3cae..000000000
--- a/pkg/proto/office/office.proto
+++ /dev/null
@@ -1,303 +0,0 @@
-syntax = "proto3";
-import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
-option go_package = "Open_IM/pkg/proto/office;office";
-package office;
-
-message CommonResp{
- int32 errCode = 1;
- string errMsg = 2;
-}
-
-message TagUser {
- string userID = 1;
- string userName = 2;
-}
-
-message Tag {
- string tagID = 1;
- string tagName = 2;
- repeated TagUser userList = 3;
-}
-
-message GetUserTagsReq{
- string userID = 1;
- string operationID = 2;
-}
-
-message GetUserTagsResp{
- CommonResp commonResp = 1;
- repeated Tag tags = 2;
-}
-
-message CreateTagReq {
- string tagName = 1;
- string userID = 2;
- repeated string userIDList = 3;
- string operationID = 4;
-}
-
-message CreateTagResp {
- CommonResp commonResp = 1;
-}
-
-message DeleteTagReq {
- string userID = 1;
- string tagID = 2;
- string operationID = 3;
-}
-
-message DeleteTagResp {
- CommonResp commonResp = 1;
-}
-
-message SetTagReq {
- string userID = 1;
- string tagID = 2;
- string newName = 3;
- repeated string increaseUserIDList = 4;
- repeated string reduceUserIDList = 5;
- string operationID = 6;
-}
-
-message SetTagResp {
- CommonResp commonResp = 1;
-}
-
-message SendMsg2TagReq {
- repeated string tagList = 1;
- repeated string UserList = 2;
- repeated string GroupList = 3;
- string sendID = 4;
- int32 senderPlatformID = 5;
- string content = 6;
- string operationID = 7;
-}
-
-message SendMsg2TagResp {
- CommonResp commonResp = 1;
-}
-
-message GetTagSendLogsReq {
- sdkws.RequestPagination Pagination = 1;
- string userID = 2;
- string operationID = 3;
-}
-
-message TagSendLog {
- repeated TagUser userList = 1;
- string content = 2;
- int64 sendTime = 3;
-}
-
-message GetTagSendLogsResp {
- CommonResp commonResp = 1;
- sdkws.ResponsePagination Pagination = 2;
- repeated TagSendLog tagSendLogs = 3;
-}
-
-message GetUserTagByIDReq {
- string userID = 1;
- string tagID = 2;
- string operationID = 3;
-}
-
-message GetUserTagByIDResp {
- CommonResp commonResp = 1;
- Tag tag = 2;
-}
-
-/// WorkMoment
-
-message LikeUser {
- string userID = 1;
- string userName = 2;
-}
-
-message NotificationUser {
- string userID = 1;
- string userName = 2;
-}
-
-message Comment {
- string userID = 1;
- string userName = 2;
- string faceURL = 3;
- string replyUserID = 4;
- string replyUserName = 5;
- string contentID = 6;
- string content = 7;
- int32 createTime = 8;
-}
-
-message PermissionGroup {
- string groupName = 1;
- string groupID = 2;
-}
-
-message WorkMomentUser {
- string userID = 1;
- string userName = 2;
-}
-
-message WorkMoment {
- string workMomentID = 1;
- string userID = 2;
- string userName = 3;
- string faceURL = 4;
- string content = 5;
- repeated WorkMomentUser likeUserList = 6;
- repeated Comment comments = 7;
- int32 permission = 8;
- repeated WorkMomentUser permissionUserList = 9;
- repeated PermissionGroup permissionGroupList = 10;
- repeated WorkMomentUser atUserList = 11;
- int32 createTime = 12;
-}
-
-message CreateOneWorkMomentReq {
- WorkMoment workMoment = 1;
- string operationID = 2;
-}
-
-message CreateOneWorkMomentResp {
- CommonResp commonResp = 1;
-}
-
-message DeleteOneWorkMomentReq {
- string workMomentID = 1;
- string userID = 2;
- string operationID = 3;
-}
-
-message DeleteOneWorkMomentResp {
- CommonResp commonResp = 1;
-}
-
-message LikeOneWorkMomentReq {
- string userID = 1;
- string WorkMomentID = 2;
- string operationID = 3;
-}
-
-message LikeOneWorkMomentResp {
- CommonResp commonResp = 1;
-}
-
-message CommentOneWorkMomentReq {
- string userID = 1;
- string workMomentID = 2;
- string replyUserID = 3;
- string content = 4;
- string operationID = 5;
-}
-
-message CommentOneWorkMomentResp {
- CommonResp commonResp = 1;
-}
-
-message DeleteCommentReq {
- string workMomentID = 1;
- string contentID = 2;
- string opUserID = 3;
- string operationID = 4;
-}
-
-message DeleteCommentResp {
- CommonResp commonResp = 1;
-}
-
-message GetWorkMomentByIDReq {
- string workMomentID = 1;
- string opUserID = 2;
- string operationID = 3;
-}
-
-message GetWorkMomentByIDResp {
- CommonResp commonResp = 1;
- WorkMoment workMoment = 2;
-}
-
-message ChangeWorkMomentPermissionReq {
- string workMomentID = 1;
- string opUserID = 2;
- int32 permission = 3;
- repeated string permissionUserIDList = 4;
- string operationID = 5;
-}
-
-message ChangeWorkMomentPermissionResp {
- CommonResp commonResp = 1;
-}
-
-message GetUserWorkMomentsReq {
- string userID = 1;
- string opUserID = 2;
- sdkws.RequestPagination Pagination = 3;
- string operationID = 4;
-}
-
-message GetUserWorkMomentsResp {
- CommonResp commonResp = 1;
- repeated WorkMoment workMoments = 2;
- sdkws.ResponsePagination Pagination = 3;
-}
-
-message GetUserFriendWorkMomentsReq {
- string userID = 1;
- sdkws.RequestPagination Pagination = 2;
- string operationID = 3;
-}
-
-message GetUserFriendWorkMomentsResp {
- CommonResp commonResp = 1;
- repeated WorkMoment workMoments = 2;
- sdkws.ResponsePagination Pagination = 3;
-}
-
-message WorkMomentNotificationMsg {
- int32 notificationMsgType = 1;
- string replyUserName = 2;
- string replyUserID = 3;
- string content = 4;
- string contentID = 5;
- string workMomentID = 6;
- string userID = 7;
- string userName = 8;
- string faceURL = 9;
- string workMomentContent = 10;
- int32 createTime = 11;
-}
-
-message SetUserWorkMomentsLevelReq {
- string userID = 1;
- int32 level = 2;
- string operationID = 3;
-}
-
-message SetUserWorkMomentsLevelResp {
- CommonResp commonResp = 1;
-}
-
-service OfficeService {
- rpc GetUserTags(GetUserTagsReq) returns(GetUserTagsResp);
- rpc CreateTag(CreateTagReq) returns(CreateTagResp);
- rpc DeleteTag(DeleteTagReq) returns(DeleteTagResp);
- rpc SetTag(SetTagReq) returns(SetTagResp);
- rpc SendMsg2Tag(SendMsg2TagReq) returns(SendMsg2TagResp);
- rpc GetTagSendLogs(GetTagSendLogsReq) returns(GetTagSendLogsResp);
- rpc GetUserTagByID(GetUserTagByIDReq) returns(GetUserTagByIDResp);
-
- rpc CreateOneWorkMoment(CreateOneWorkMomentReq) returns(CreateOneWorkMomentResp);
- rpc DeleteOneWorkMoment(DeleteOneWorkMomentReq) returns(DeleteOneWorkMomentResp);
- rpc LikeOneWorkMoment(LikeOneWorkMomentReq) returns(LikeOneWorkMomentResp);
- rpc CommentOneWorkMoment(CommentOneWorkMomentReq) returns(CommentOneWorkMomentResp);
- rpc DeleteComment(DeleteCommentReq) returns(DeleteCommentResp);
- rpc GetWorkMomentByID(GetWorkMomentByIDReq) returns(GetWorkMomentByIDResp);
- rpc ChangeWorkMomentPermission(ChangeWorkMomentPermissionReq) returns(ChangeWorkMomentPermissionResp);
- /// user self
- rpc GetUserWorkMoments(GetUserWorkMomentsReq) returns(GetUserWorkMomentsResp);
- /// users friend
- rpc GetUserFriendWorkMoments(GetUserFriendWorkMomentsReq) returns(GetUserFriendWorkMomentsResp);
- rpc SetUserWorkMomentsLevel(SetUserWorkMomentsLevelReq) returns(SetUserWorkMomentsLevelResp);
-}
-
diff --git a/pkg/proto/proto_dir.cfg b/pkg/proto/proto_dir.cfg
index 48eeb4ba7..a85a69155 100644
--- a/pkg/proto/proto_dir.cfg
+++ b/pkg/proto/proto_dir.cfg
@@ -1,6 +1,5 @@
all_proto=(
- admin_cms/admin_cms.proto
auth/auth.proto
friend/friend.proto
group/group.proto
@@ -11,5 +10,4 @@ all_proto=(
relay/relay.proto
sdkws/ws.proto
conversation/conversation.proto
- office/office.proto
)
diff --git a/pkg/proto/sdkws/ws.proto b/pkg/proto/sdkws/ws.proto
index 6f1c6a5fe..baa0eb2ee 100644
--- a/pkg/proto/sdkws/ws.proto
+++ b/pkg/proto/sdkws/ws.proto
@@ -345,12 +345,6 @@ message GroupMemberInfoSetTips{
}
-message OrganizationChangedTips{
- UserInfo opUser = 2;
- int64 operationTime = 3;
-}
-
-
//////////////////////friend/////////////////////
message FriendApplication{
diff --git a/pkg/utils/utils_v2.go b/pkg/utils/utils_v2.go
index 91c8fecd9..bd2959845 100644
--- a/pkg/utils/utils_v2.go
+++ b/pkg/utils/utils_v2.go
@@ -412,3 +412,16 @@ func (o *sortSlice[E]) Swap(i, j int) {
type Ordered interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | ~string
}
+
+func Unwrap(err error) error {
+ for err != nil {
+ unwrap, ok := err.(interface {
+ Unwrap() error
+ })
+ if !ok {
+ break
+ }
+ err = unwrap.Unwrap()
+ }
+ return err
+}
diff --git a/script/batch_start_all.sh b/script/batch_start_all.sh
index c2d78c509..085690717 100644
--- a/script/batch_start_all.sh
+++ b/script/batch_start_all.sh
@@ -9,7 +9,6 @@ need_to_start_server_shell=(
push_start.sh
msg_transfer_start.sh
sdk_svr_start.sh
- demo_svr_start.sh
)
time=`date +"%Y-%m-%d %H:%M:%S"`
echo "==========================================================">>../logs/openIM.log 2>&1 &
diff --git a/script/check_all.sh b/script/check_all.sh
index 82b77f042..234176842 100644
--- a/script/check_all.sh
+++ b/script/check_all.sh
@@ -7,7 +7,6 @@ service_port_name=(
openImWsPort
openImApiPort
openImSdkWsPort
- openImCmsApiPort
openImUserPort
openImFriendPort
openImMessagePort
@@ -15,17 +14,9 @@ service_port_name=(
openImGroupPort
openImAuthPort
openImPushPort
- openImAdminCmsPort
- openImOfficePort
openImConversationPort
)
-switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
for i in ${service_port_name[*]}; do
- if [ ${switch} != "true" ]; then
- if [ ${i} == "openImDemoPort" ]; then
- continue
- fi
- fi
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
for j in ${ports_array}; do
diff --git a/script/docker_start_all.sh b/script/docker_start_all.sh
index 42ee81992..f3b8801a5 100644
--- a/script/docker_start_all.sh
+++ b/script/docker_start_all.sh
@@ -9,7 +9,6 @@ need_to_start_server_shell=(
push_start.sh
msg_transfer_start.sh
sdk_svr_start.sh
- demo_svr_start.sh
)
#fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started
diff --git a/script/enterprise/check_all.sh b/script/enterprise/check_all.sh
index 844b978a5..0f6cb0d5c 100644
--- a/script/enterprise/check_all.sh
+++ b/script/enterprise/check_all.sh
@@ -10,7 +10,7 @@ service_port_name=(
openImAdminPort
openImChatPort
)
-switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
+
for i in ${service_port_name[*]}; do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
diff --git a/script/path_info.cfg b/script/path_info.cfg
index cde2736b1..f747dc1da 100644
--- a/script/path_info.cfg
+++ b/script/path_info.cfg
@@ -19,13 +19,10 @@ msg_transfer_source_root="../cmd/open_im_msg_transfer/"
msg_transfer_service_num=4
-sdk_server_name="open_im_sdk_server"
+sdk_server_name="sdkws_server"
sdk_server_binary_root="../bin/"
sdk_server_source_root="../cmd/Open-IM-SDK-Core/"
-demo_server_name="open_im_demo"
-demo_server_binary_root="../bin/"
-demo_server_source_root="../cmd/open_im_demo/"
cron_task_name="open_im_cron_task"
cron_task_binary_root="../bin/"
@@ -39,36 +36,28 @@ config_path="../config/config.yaml"
service_source_root=(
#api service file
../cmd/open_im_api/
- ../cmd/open_im_cms_api/
#rpc service file
../cmd/rpc/open_im_user/
../cmd/rpc/open_im_friend/
../cmd/rpc/open_im_group/
../cmd/rpc/open_im_auth/
- ../cmd/rpc/open_im_admin_cms/
- ../cmd/rpc/open_im_office/
../cmd/rpc/open_im_conversation/
- ../cmd/rpc/open_im_cache/
../cmd/open_im_cron_task
${msg_gateway_source_root}
${msg_transfer_source_root}
${msg_source_root}
${push_source_root}
${sdk_server_source_root}
- ${demo_server_source_root}
)
#service filename
service_names=(
#api service filename
open_im_api
- open_im_cms_api
#rpc service filename
open_im_user
open_im_friend
open_im_group
open_im_auth
- open_im_admin_cms
- open_im_office
open_im_conversation
open_im_cron_task
${msg_gateway_name}
@@ -76,7 +65,6 @@ service_names=(
${msg_name}
${push_name}
${sdk_server_name}
- ${demo_server_name}
)
diff --git a/script/start_all.sh b/script/start_all.sh
index 223187973..0ce76e960 100644
--- a/script/start_all.sh
+++ b/script/start_all.sh
@@ -9,7 +9,6 @@ need_to_start_server_shell=(
msg_transfer_start.sh
sdk_svr_start.sh
msg_gateway_start.sh
- demo_svr_start.sh
# start_cron.sh
)
time=`date +"%Y-%m-%d %H:%M:%S"`
diff --git a/script/start_rpc_service.sh b/script/start_rpc_service.sh
index 6c3feaa97..eaeff132a 100644
--- a/script/start_rpc_service.sh
+++ b/script/start_rpc_service.sh
@@ -8,15 +8,12 @@ source ./function.sh
service_filename=(
#api
open_im_api
- open_im_cms_api
#rpc
open_im_user
open_im_friend
open_im_group
open_im_auth
- open_im_admin_cms
${msg_name}
- open_im_office
open_im_conversation
)
@@ -24,30 +21,24 @@ service_filename=(
service_port_name=(
#api port name
openImApiPort
- openImCmsApiPort
#rpc port name
openImUserPort
openImFriendPort
openImGroupPort
openImAuthPort
- openImAdminCmsPort
openImMessagePort
- openImOfficePort
openImConversationPort
)
service_prometheus_port_name=(
#api port name
openImApiPort
- openImCmsApiPort
#rpc port name
userPrometheusPort
friendPrometheusPort
groupPrometheusPort
authPrometheusPort
- adminCmsPrometheusPort
messagePrometheusPort
- officePrometheusPort
conversationPrometheusPort
)
diff --git a/script/win_build_all_service.cmd b/script/win_build_all_service.cmd
index 9ec7313ae..5bbda660e 100644
--- a/script/win_build_all_service.cmd
+++ b/script/win_build_all_service.cmd
@@ -1,22 +1,14 @@
SET ROOT=%cd%
mkdir %ROOT%\..\bin\
cd ..\cmd\open_im_api\ && go build -ldflags="-w -s" && move open_im_api.exe %ROOT%\..\bin\
-cd ..\..\cmd\open_im_cms_api\ && go build -ldflags="-w -s" && move open_im_cms_api.exe %ROOT%\..\bin\
-cd ..\..\cmd\open_im_demo\ && go build -ldflags="-w -s" && move open_im_demo.exe %ROOT%\..\bin\
cd ..\..\cmd\open_im_msg_gateway\ && go build -ldflags="-w -s" && move open_im_msg_gateway.exe %ROOT%\..\bin\
cd ..\..\cmd\open_im_msg_transfer\ && go build -ldflags="-w -s" && move open_im_msg_transfer.exe %ROOT%\..\bin\
cd ..\..\cmd\open_im_push\ && go build -ldflags="-w -s" && move open_im_push.exe %ROOT%\..\bin\
-cd ..\..\cmd\rpc\open_im_admin_cms\&& go build -ldflags="-w -s" && move open_im_admin_cms.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_auth\&& go build -ldflags="-w -s" && move open_im_auth.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\rpc\open_im_cache\&& go build -ldflags="-w -s" && move open_im_cache.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_conversation\&& go build -ldflags="-w -s" && move open_im_conversation.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_friend\&& go build -ldflags="-w -s" && move open_im_friend.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_group\&& go build -ldflags="-w -s" && move open_im_group.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\rpc\open_im_message_cms\&& go build -ldflags="-w -s" && move open_im_message_cms.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_msg\&& go build -ldflags="-w -s" && move open_im_msg.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\rpc\open_im_office\&& go build -ldflags="-w -s" && move open_im_office.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\rpc\open_im_organization\&& go build -ldflags="-w -s" && move open_im_organization.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\rpc\open_im_statistics\&& go build -ldflags="-w -s" && move open_im_statistics.exe %ROOT%\..\bin\
cd ..\..\..\cmd\rpc\open_im_user\&& go build -ldflags="-w -s" && move open_im_user.exe %ROOT%\..\bin\
-cd ..\..\..\cmd\Open-IM-SDK-Core\ws_wrapper\cmd\&& go build -ldflags="-w -s" open_im_sdk_server.go && move open_im_sdk_server.exe %ROOT%\..\bin\
+cd ..\..\..\cmd\Open-IM-SDK-Core\ws_wrapper\cmd\&& go build -ldflags="-w -s" sdkws_server.go && move sdkws_server.exe %ROOT%\..\bin\
cd %ROOT%
\ No newline at end of file
diff --git a/script/win_start_all_service.cmd b/script/win_start_all_service.cmd
index 5b221418b..f6ea5ed78 100644
--- a/script/win_start_all_service.cmd
+++ b/script/win_start_all_service.cmd
@@ -1,22 +1,15 @@
SET ROOT=%cd%
cd %ROOT%\..\bin\
start cmd /C .\open_im_api.exe -port 10002
-start cmd /C .\open_im_cms_api.exe -port 10006
start cmd /C .\open_im_user.exe -port 10110
start cmd /C .\open_im_friend.exe -port 10120
start cmd /C .\open_im_group.exe -port 10150
start cmd /C .\open_im_auth.exe -port 10160
-start cmd /C .\open_im_admin_cms.exe -port 10200
start cmd /C .\open_im_message_cms.exe -port 10190
-start cmd /C .\open_im_statistics.exe -port 10180
start cmd /C .\open_im_msg.exe -port 10130
-start cmd /C .\open_im_office.exe -port 10210
-start cmd /C .\open_im_organization.exe -port 10220
start cmd /C .\open_im_conversation.exe -port 10230
-start cmd /C .\open_im_cache.exe -port 10240
start cmd /C .\open_im_push.exe -port 10170
start cmd /C .\open_im_msg_transfer.exe
-start cmd /C .\open_im_sdk_server.exe -openIM_api_port 10002 -openIM_ws_port 10001 -sdkws_port 10003 -openIM_log_level 6
+start cmd /C .\sdkws_server.exe -openIM_api_port 10002 -openIM_ws_port 10001 -sdkws_port 10003 -openIM_log_level 6
start cmd /C .\open_im_msg_gateway.exe -rpc_port 10140 -ws_port 10001
-start cmd /C .\open_im_demo.exe -port 10004
cd %ROOT%
\ No newline at end of file