123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604 |
- // 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": {
- "/api/chatroom/create": {
- "post": {
- "description": "创建聊天室",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "创建聊天室",
- "parameters": [
- {
- "description": "创建聊天室请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.CreateChatroomReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/delete": {
- "get": {
- "description": "删除聊天室",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "删除聊天室",
- "parameters": [
- {
- "type": "string",
- "description": "用户ID",
- "name": "userId",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "房间ID",
- "name": "roomId",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/detail": {
- "get": {
- "description": "获取房间详情",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间操作"
- ],
- "summary": "获取房间详情",
- "parameters": [
- {
- "type": "string",
- "description": "房间id",
- "name": "room_id",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/join": {
- "post": {
- "description": "加入房间",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "加入房间",
- "parameters": [
- {
- "description": "加入房间请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.JoinChatroomParam"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/joinCreate": {
- "post": {
- "description": "创建并加入房间",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "创建并加入房间",
- "parameters": [
- {
- "description": "创建并加入房间请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.JoinChatroomReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/leave": {
- "post": {
- "description": "离开房间",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "离开房间",
- "parameters": [
- {
- "description": "离开房间请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.LeaveChatroomParam"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/chatroom/list": {
- "get": {
- "description": "获取聊天室列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "房间管理"
- ],
- "summary": "获取聊天室列表",
- "parameters": [
- {
- "type": "string",
- "description": "用户ID",
- "name": "userId",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/deleteInteract": {
- "get": {
- "description": "互动删除",
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "互动删除",
- "parameters": [
- {
- "type": "string",
- "description": "id",
- "name": "id",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "互动类型",
- "name": "int_type",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/interact": {
- "get": {
- "description": "获取互动",
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "获取互动",
- "parameters": [
- {
- "type": "string",
- "description": "用户id",
- "name": "userId",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/notice": {
- "get": {
- "description": "获取公告",
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "获取公告",
- "parameters": [
- {
- "type": "string",
- "description": "用户id",
- "name": "userId",
- "in": "query"
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/notice/read": {
- "post": {
- "description": "公告阅读",
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "公告阅读",
- "parameters": [
- {
- "description": "阅读公告",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.NoticeReadReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/send": {
- "post": {
- "description": "发送消息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "发送消息",
- "parameters": [
- {
- "description": "发送请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.MessageParam"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\"}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "/api/message/timeline": {
- "get": {
- "description": "获取历史消息记录",
- "produces": [
- "application/json"
- ],
- "tags": [
- "消息管理"
- ],
- "summary": "获取历史消息记录",
- "parameters": [
- {
- "type": "string",
- "description": "用户id",
- "name": "userId",
- "in": "query"
- },
- {
- "type": "string",
- "description": "房间id",
- "name": "roomId",
- "in": "query",
- "required": true
- },
- {
- "type": "integer",
- "description": "当前页",
- "name": "pageIndex",
- "in": "query",
- "required": true
- },
- {
- "type": "integer",
- "description": "每页数量",
- "name": "pageSize",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "models.CreateChatroomReq": {
- "type": "object",
- "properties": {
- "bCreatorId": {
- "type": "string"
- },
- "creatorId": {
- "type": "string"
- },
- "userCount": {
- "type": "integer"
- }
- }
- },
- "models.JoinChatroomParam": {
- "type": "object",
- "properties": {
- "roomId": {
- "type": "string"
- },
- "userId": {
- "type": "string"
- }
- }
- },
- "models.JoinChatroomReq": {
- "type": "object",
- "properties": {
- "bCreatorId": {
- "type": "string"
- },
- "creatorId": {
- "type": "string"
- },
- "userCount": {
- "type": "integer"
- }
- }
- },
- "models.LeaveChatroomParam": {
- "type": "object",
- "properties": {
- "roomId": {
- "type": "string"
- },
- "userId": {
- "type": "string"
- }
- }
- },
- "models.MessageParam": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "messageType": {
- "type": "string"
- },
- "roomId": {
- "type": "string"
- },
- "userId": {
- "type": "string"
- }
- }
- },
- "models.NoticeReadReq": {
- "type": "object",
- "properties": {
- "app_id": {
- "type": "string"
- },
- "notice_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- }
- }
- }
- }
- }`
- 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: "",
- Host: "",
- BasePath: "",
- Schemes: []string{},
- 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{})
- }
|