Files
chain33-dtalk/gateway/api/v1/docs/docs.go
2022-03-17 15:59:24 +08:00

2331 lines
78 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import (
"bytes"
"encoding/json"
"strings"
"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
var doc = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{.Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/app/group-list": {
"post": {
"tags": [
"group 群信息"
],
"summary": "查询群列表",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetGroupListReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetGroupListResp"
}
}
}
]
}
}
}
}
},
"/app/modules/all": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"startup 初始化模块"
],
"summary": "获取模块启用状态",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/model.GeneralResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.GetModuleResp"
}
}
}
}
]
}
}
}
}
},
"/app/mute-list": {
"post": {
"tags": [
"group 禁言"
],
"summary": "查询群内被禁言成员名单",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetMuteListReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetMuteListResp"
}
}
}
]
}
}
}
}
},
"/app/pri-chat-record": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"record 消息模块"
],
"summary": "获得聊天记录",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/model.GetPriRecordsReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/model.GeneralResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.GetPriRecordsResp"
}
}
}
]
}
}
}
}
},
"/app/record/focus": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"record 消息模块"
],
"summary": "关注消息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.FocusMsgReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.GeneralResponse"
}
}
}
}
},
"/app/record/revoke": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"record 消息模块"
],
"summary": "撤回消息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.RevokeMsgReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.GeneralResponse"
}
}
}
}
},
"/group/app/avatar": {
"post": {
"tags": [
"group 群信息"
],
"summary": "更新群头像",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupAvatarReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupAvatarResp"
}
}
}
]
}
}
}
}
},
"/group/app/change-owner": {
"post": {
"tags": [
"group 群动作"
],
"summary": "转让群",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.ChangeOwnerReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.ChangeOwnerResp"
}
}
}
]
}
}
}
}
},
"/group/app/create-group": {
"post": {
"tags": [
"group 群动作"
],
"summary": "创建群",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.CreateGroupReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.CreateGroupResp"
}
}
}
]
}
}
}
}
},
"/group/app/friendType": {
"post": {
"tags": [
"group 群信息"
],
"summary": "更新群内加好友设置",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupFriendTypeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupFriendTypeResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-disband": {
"post": {
"tags": [
"group 群动作"
],
"summary": "解散群",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GroupDisbandReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GroupDisbandResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-exit": {
"post": {
"tags": [
"group 群动作"
],
"summary": "退群",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GroupExitReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GroupExitResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-info": {
"post": {
"tags": [
"group 群信息"
],
"summary": "查询群信息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetGroupInfoReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetGroupInfoResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-member-info": {
"post": {
"tags": [
"group 群成员信息"
],
"summary": "查询群成员信息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetGroupMemberInfoReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetGroupMemberInfoResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-member-list": {
"post": {
"tags": [
"group 群成员信息"
],
"summary": "查询群成员列表",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetGroupMemberListReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetGroupMemberListResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-pub-info": {
"post": {
"tags": [
"group 群信息"
],
"summary": "查询群公开信息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GetGroupPubInfoReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GetGroupPubInfoResp"
}
}
}
]
}
}
}
}
},
"/group/app/group-remove": {
"post": {
"tags": [
"group 群动作"
],
"summary": "踢人",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.GroupRemoveReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.GroupRemoveResp"
}
}
}
]
}
}
}
}
},
"/group/app/invite-group-members": {
"post": {
"tags": [
"group 群动作"
],
"summary": "邀请新群员",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.InviteGroupMembersReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.InviteGroupMembersResp"
}
}
}
]
}
}
}
}
},
"/group/app/join-group": {
"post": {
"tags": [
"group 群动作"
],
"summary": "直接进群",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.JoinGroupReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.JoinGroupResp"
}
}
}
]
}
}
}
}
},
"/group/app/joinType": {
"post": {
"tags": [
"group 群信息"
],
"summary": "更新群内加好友设置",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupJoinTypeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupJoinTypeResp"
}
}
}
]
}
}
}
}
},
"/group/app/member/muteTime": {
"post": {
"tags": [
"group 禁言"
],
"summary": "更新群成员禁言时间",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupMemberMuteTimeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupMemberMuteTimeResp"
}
}
}
]
}
}
}
}
},
"/group/app/member/name": {
"post": {
"tags": [
"group 群成员信息"
],
"summary": "更新群成员昵称",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupMemberNameReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupMemberNameResp"
}
}
}
]
}
}
}
}
},
"/group/app/member/type": {
"post": {
"tags": [
"group 群成员信息"
],
"summary": "设置管理员",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.SetAdminReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.SetAdminResp"
}
}
}
]
}
}
}
}
},
"/group/app/muteType": {
"post": {
"tags": [
"group 群信息"
],
"summary": "更新群内加好友设置",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupMuteTypeReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupMuteTypeResp"
}
}
}
]
}
}
}
}
},
"/group/app/name": {
"post": {
"tags": [
"group 群信息"
],
"summary": "更新群名称",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "body",
"name": "data",
"in": "body",
"schema": {
"$ref": "#/definitions/types.UpdateGroupNameReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/types.GeneralResp"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/types.UpdateGroupNameResp"
}
}
}
]
}
}
}
}
},
"/record/push": {
"post": {
"description": "comet.Proto由接口组装客户端只需传入comet.Proto的body部分",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"record 消息模块"
],
"summary": "推送消息",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "消息协议序列化",
"name": "message",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.GeneralResponse"
}
}
}
}
},
"/record/push2": {
"post": {
"description": "comet.Proto由客户端传入",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"record 消息模块"
],
"summary": "推送消息2",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
},
{
"description": "消息协议序列化",
"name": "message",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.GeneralResponse"
}
}
}
}
},
"/user/login": {
"post": {
"description": "内部接口,comet层使用",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"account 账户模块"
],
"summary": "用户登录",
"parameters": [
{
"type": "string",
"description": "MOCK",
"name": "FZM-SIGNATURE",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/model.GeneralResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressLoginResp"
}
}
}
]
}
}
}
}
}
},
"definitions": {
"model.AddressLoginResp": {
"type": "object",
"properties": {
"address": {
"description": "用户地址",
"type": "string",
"example": "123"
}
}
},
"model.FocusMsgReq": {
"type": "object",
"required": [
"logId"
],
"properties": {
"logId": {
"type": "integer"
},
"type": {
"type": "integer",
"enum": [
0,
1
]
}
}
},
"model.GeneralResponse": {
"type": "object",
"properties": {
"data": {
"type": "object"
},
"message": {
"type": "string"
},
"result": {
"type": "integer"
}
}
},
"model.GetModuleResp": {
"type": "object",
"properties": {
"endPoints": {
"type": "array",
"items": {
"type": "string"
}
},
"isEnabled": {
"type": "boolean"
},
"name": {
"type": "string",
"enum": [
"wallet",
"oa",
"redpacket"
]
}
}
},
"model.GetPriRecordsReq": {
"type": "object",
"required": [
"count",
"targetId"
],
"properties": {
"count": {
"description": "消息数量",
"type": "integer"
},
"logId": {
"description": "消息 ID",
"type": "string"
},
"targetId": {
"description": "接受者 ID",
"type": "string"
}
}
},
"model.GetPriRecordsResp": {
"type": "object",
"properties": {
"record_count": {
"description": "聊天记录数量",
"type": "integer"
},
"records": {
"description": "聊天记录",
"type": "array",
"items": {
"$ref": "#/definitions/model.Record"
}
}
}
},
"model.Record": {
"type": "object",
"properties": {
"content": {
"description": "消息内容",
"type": "object"
},
"createTime": {
"description": "消息发送时间",
"type": "integer"
},
"fromId": {
"description": "发送者 id",
"type": "string"
},
"logId": {
"description": "log id",
"type": "string"
},
"msgId": {
"description": "msg id (uuid)",
"type": "string"
},
"msgType": {
"description": "消息类型",
"type": "integer"
},
"targetId": {
"description": "接收者 id",
"type": "string"
}
}
},
"model.RevokeMsgReq": {
"type": "object",
"required": [
"logId"
],
"properties": {
"logId": {
"type": "integer"
},
"type": {
"type": "integer",
"enum": [
0,
1
]
}
}
},
"types.ChangeOwnerReq": {
"type": "object",
"required": [
"memberId"
],
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberId": {
"description": "被转让为群主的群成员 ID",
"type": "string"
}
}
},
"types.ChangeOwnerResp": {
"type": "object"
},
"types.CreateGroupReq": {
"type": "object",
"properties": {
"avatar": {
"type": "string"
},
"introduce": {
"type": "string"
},
"memberIds": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
}
}
},
"types.CreateGroupResp": {
"type": "object",
"properties": {
"adminNum": {
"description": "群内管理员数量",
"type": "integer"
},
"avatar": {
"description": "头像 url",
"type": "string"
},
"createTime": {
"description": "群创建时间",
"type": "integer"
},
"friendType": {
"description": "加好友限制, 0=群内可加好友1=群内禁止加好友",
"type": "integer"
},
"groupType": {
"description": "群类型 (0: 普通群, 1: 全员群, 2: 部门群)",
"type": "integer"
},
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"type": "string"
},
"introduce": {
"type": "string"
},
"joinType": {
"description": "加群方式0=无需审批默认1=禁止加群,群主和管理员邀请加群, 2=普通人邀请需要审批,群主和管理员直接加群",
"type": "integer"
},
"key": {
"type": "string"
},
"markId": {
"description": "群显示的 ID",
"type": "string"
},
"maximum": {
"description": "群人数上限",
"type": "integer"
},
"memberNum": {
"description": "群人数",
"type": "integer"
},
"members": {
"description": "群成员",
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupMember"
}
},
"muteNum": {
"description": "群内当前被禁言的人数",
"type": "integer"
},
"muteType": {
"description": "禁言, 0=全员可发言, 1=全员禁言(除群主和管理员)",
"type": "integer"
},
"name": {
"description": "群名称 加密的",
"type": "string"
},
"owner": {
"description": "群主 信息",
"$ref": "#/definitions/types.GroupMember"
},
"person": {
"description": "本人在群内的信息",
"$ref": "#/definitions/types.GroupMember"
},
"publicName": {
"description": "公开的群名称 不加密的",
"type": "string"
},
"status": {
"description": "群状态0=正常 1=封禁 2=解散",
"type": "integer"
}
}
},
"types.GeneralResp": {
"type": "object",
"properties": {
"data": {
"type": "object"
},
"message": {
"type": "integer"
},
"result": {
"type": "integer"
}
}
},
"types.GetGroupInfoReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GetGroupInfoResp": {
"type": "object",
"properties": {
"adminNum": {
"description": "群内管理员数量",
"type": "integer"
},
"avatar": {
"description": "头像 url",
"type": "string"
},
"createTime": {
"description": "群创建时间",
"type": "integer"
},
"friendType": {
"description": "加好友限制, 0=群内可加好友1=群内禁止加好友",
"type": "integer"
},
"groupType": {
"description": "群类型 (0: 普通群, 1: 全员群, 2: 部门群)",
"type": "integer"
},
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"type": "string"
},
"introduce": {
"type": "string"
},
"joinType": {
"description": "加群方式0=无需审批默认1=禁止加群,群主和管理员邀请加群, 2=普通人邀请需要审批,群主和管理员直接加群",
"type": "integer"
},
"key": {
"type": "string"
},
"markId": {
"description": "群显示的 ID",
"type": "string"
},
"maximum": {
"description": "群人数上限",
"type": "integer"
},
"memberNum": {
"description": "群人数",
"type": "integer"
},
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupMember"
}
},
"muteNum": {
"description": "群内当前被禁言的人数",
"type": "integer"
},
"muteType": {
"description": "禁言, 0=全员可发言, 1=全员禁言(除群主和管理员)",
"type": "integer"
},
"name": {
"description": "群名称 加密的",
"type": "string"
},
"owner": {
"description": "群主 信息",
"$ref": "#/definitions/types.GroupMember"
},
"person": {
"description": "本人在群内的信息",
"$ref": "#/definitions/types.GroupMember"
},
"publicName": {
"description": "公开的群名称 不加密的",
"type": "string"
},
"status": {
"description": "群状态0=正常 1=封禁 2=解散",
"type": "integer"
}
}
},
"types.GetGroupListReq": {
"type": "object"
},
"types.GetGroupListResp": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupInfo"
}
}
}
},
"types.GetGroupMemberInfoReq": {
"type": "object",
"required": [
"memberId"
],
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberId": {
"type": "string"
}
}
},
"types.GetGroupMemberInfoResp": {
"type": "object",
"properties": {
"memberId": {
"description": "用户 ID",
"type": "string"
},
"memberMuteTime": {
"description": "该用户被禁言结束的时间 9223372036854775807=永久禁言",
"type": "integer"
},
"memberName": {
"description": "用户群昵称",
"type": "string"
},
"memberType": {
"description": "用户角色2=群主1=管理员0=群员10=退群",
"type": "integer"
}
}
},
"types.GetGroupMemberListReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GetGroupMemberListResp": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupMember"
}
}
}
},
"types.GetGroupPubInfoReq": {
"type": "object",
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GetGroupPubInfoResp": {
"type": "object",
"properties": {
"adminNum": {
"description": "群内管理员数量",
"type": "integer"
},
"avatar": {
"description": "头像 url",
"type": "string"
},
"createTime": {
"description": "群创建时间",
"type": "integer"
},
"friendType": {
"description": "加好友限制, 0=群内可加好友1=群内禁止加好友",
"type": "integer"
},
"groupType": {
"description": "群类型 (0: 普通群, 1: 全员群, 2: 部门群)",
"type": "integer"
},
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"type": "string"
},
"introduce": {
"type": "string"
},
"joinType": {
"description": "加群方式0=无需审批默认1=禁止加群,群主和管理员邀请加群, 2=普通人邀请需要审批,群主和管理员直接加群",
"type": "integer"
},
"key": {
"type": "string"
},
"markId": {
"description": "群显示的 ID",
"type": "string"
},
"maximum": {
"description": "群人数上限",
"type": "integer"
},
"memberNum": {
"description": "群人数",
"type": "integer"
},
"muteNum": {
"description": "群内当前被禁言的人数",
"type": "integer"
},
"muteType": {
"description": "禁言, 0=全员可发言, 1=全员禁言(除群主和管理员)",
"type": "integer"
},
"name": {
"description": "群名称 加密的",
"type": "string"
},
"owner": {
"description": "群主 信息",
"$ref": "#/definitions/types.GroupMember"
},
"person": {
"description": "本人在群内的信息",
"$ref": "#/definitions/types.GroupMember"
},
"publicName": {
"description": "公开的群名称 不加密的",
"type": "string"
},
"status": {
"description": "群状态0=正常 1=封禁 2=解散",
"type": "integer"
}
}
},
"types.GetMuteListReq": {
"type": "object",
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GetMuteListResp": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupMember"
}
}
}
},
"types.GroupDisbandReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GroupDisbandResp": {
"type": "object"
},
"types.GroupExitReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.GroupExitResp": {
"type": "object"
},
"types.GroupInfo": {
"type": "object",
"properties": {
"adminNum": {
"description": "群内管理员数量",
"type": "integer"
},
"avatar": {
"description": "头像 url",
"type": "string"
},
"createTime": {
"description": "群创建时间",
"type": "integer"
},
"friendType": {
"description": "加好友限制, 0=群内可加好友1=群内禁止加好友",
"type": "integer"
},
"groupType": {
"description": "群类型 (0: 普通群, 1: 全员群, 2: 部门群)",
"type": "integer"
},
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"type": "string"
},
"introduce": {
"type": "string"
},
"joinType": {
"description": "加群方式0=无需审批默认1=禁止加群,群主和管理员邀请加群, 2=普通人邀请需要审批,群主和管理员直接加群",
"type": "integer"
},
"key": {
"type": "string"
},
"markId": {
"description": "群显示的 ID",
"type": "string"
},
"maximum": {
"description": "群人数上限",
"type": "integer"
},
"memberNum": {
"description": "群人数",
"type": "integer"
},
"muteNum": {
"description": "群内当前被禁言的人数",
"type": "integer"
},
"muteType": {
"description": "禁言, 0=全员可发言, 1=全员禁言(除群主和管理员)",
"type": "integer"
},
"name": {
"description": "群名称 加密的",
"type": "string"
},
"owner": {
"description": "群主 信息",
"$ref": "#/definitions/types.GroupMember"
},
"person": {
"description": "本人在群内的信息",
"$ref": "#/definitions/types.GroupMember"
},
"publicName": {
"description": "公开的群名称 不加密的",
"type": "string"
},
"status": {
"description": "群状态0=正常 1=封禁 2=解散",
"type": "integer"
}
}
},
"types.GroupMember": {
"type": "object",
"properties": {
"memberId": {
"description": "用户 ID",
"type": "string"
},
"memberMuteTime": {
"description": "该用户被禁言结束的时间 9223372036854775807=永久禁言",
"type": "integer"
},
"memberName": {
"description": "用户群昵称",
"type": "string"
},
"memberType": {
"description": "用户角色2=群主1=管理员0=群员10=退群",
"type": "integer"
}
}
},
"types.GroupRemoveReq": {
"type": "object",
"required": [
"memberIds"
],
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"types.GroupRemoveResp": {
"type": "object",
"properties": {
"memberIds": {
"description": "成功被踢的成员列表",
"type": "array",
"items": {
"type": "string"
}
},
"memberNum": {
"description": "群人数",
"type": "integer"
}
}
},
"types.InviteGroupMembersReq": {
"type": "object",
"required": [
"newMemberIds"
],
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"newMemberIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"types.InviteGroupMembersResp": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 123821199217135616
},
"idStr": {
"type": "string"
},
"memberNum": {
"type": "integer",
"example": 5
}
}
},
"types.JoinGroupReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"type": "string"
},
"inviterId": {
"type": "string"
}
}
},
"types.JoinGroupResp": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"type": "string"
}
}
},
"types.SetAdminReq": {
"type": "object",
"required": [
"memberId"
],
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberId": {
"description": "被设置的群成员 ID",
"type": "string"
},
"memberType": {
"description": "用户角色 0=群员, 1=管理员",
"type": "integer"
}
}
},
"types.SetAdminResp": {
"type": "object"
},
"types.UpdateGroupAvatarReq": {
"type": "object",
"properties": {
"avatar": {
"type": "string"
},
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.UpdateGroupAvatarResp": {
"type": "object"
},
"types.UpdateGroupFriendTypeReq": {
"type": "object",
"properties": {
"friendType": {
"description": "加好友限制, 0=群内可加好友1=群内禁止加好友",
"type": "integer"
},
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
}
}
},
"types.UpdateGroupFriendTypeResp": {
"type": "object"
},
"types.UpdateGroupJoinTypeReq": {
"type": "object",
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"joinType": {
"description": "加群方式0=无需审批默认1=禁止加群,群主和管理员邀请加群, 2=普通人邀请需要审批,群主和管理员直接加群",
"type": "integer"
}
}
},
"types.UpdateGroupJoinTypeResp": {
"type": "object"
},
"types.UpdateGroupMemberMuteTimeReq": {
"type": "object",
"required": [
"memberIds"
],
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberIds": {
"description": "被禁言的群员 ID",
"type": "array",
"items": {
"type": "string"
}
},
"muteTime": {
"description": "禁言持续时间, 传9223372036854775807=永久禁言, 0=解除禁言",
"type": "integer"
}
}
},
"types.UpdateGroupMemberMuteTimeResp": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/types.GroupMember"
}
}
}
},
"types.UpdateGroupMemberNameReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"memberName": {
"type": "string"
}
}
},
"types.UpdateGroupMemberNameResp": {
"type": "object"
},
"types.UpdateGroupMuteTypeReq": {
"type": "object",
"properties": {
"id": {
"description": "群 ID",
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"muteType": {
"description": "禁言, 0=全员可发言, 1=全员禁言(除群主和管理员)",
"type": "integer"
}
}
},
"types.UpdateGroupMuteTypeResp": {
"type": "object"
},
"types.UpdateGroupNameReq": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"idStr": {
"description": "如果同时填了 idStr, 则优先选择 idStr",
"type": "string"
},
"name": {
"type": "string"
},
"publicName": {
"type": "string"
}
}
},
"types.UpdateGroupNameResp": {
"type": "object"
}
}
}`
type swaggerInfo struct {
Version string
Host string
BasePath string
Schemes []string
Title string
Description string
}
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{"https"},
Title: "即时通讯系统后端接口",
Description: "",
}
type s struct{}
func (s *s) ReadDoc() string {
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
},
}).Parse(doc)
if err != nil {
return doc
}
var tpl bytes.Buffer
if err := t.Execute(&tpl, sInfo); err != nil {
return doc
}
return tpl.String()
}
func init() {
swag.Register(swag.Name, &s{})
}