| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
- // This file was generated by swaggo/swag at
- // 2020-10-19 23:32:55.3852666 +0800 CST m=+0.208956401
- package docs
- import (
- "bytes"
- "encoding/json"
- "strings"
- "github.com/alecthomas/template"
- )
- var doc = `{
- "schemes": {{ marshal .Schemes }},
- "swagger": "2.0",
- "info": {
- "description": "{{.Description}}",
- "title": "{{.Title}}",
- "contact": {},
- "license": {},
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/check": {
- "post": {
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "summary": "登陆验证接口",
- "parameters": [
- {
- "type": "string",
- "description": "用户名",
- "name": "username",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "密码",
- "name": "password",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "类型",
- "name": "type",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.Response"
- }
- }
- }
- }
- },
- "/message": {
- "post": {
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "summary": "发送消息接口",
- "parameters": [
- {
- "type": "string",
- "description": "来源uid",
- "name": "from_id",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "目标uid",
- "name": "to_id",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "内容",
- "name": "content",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "类型|kefu,visitor",
- "name": "type",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.Response"
- }
- }
- }
- }
- },
- "/messages": {
- "get": {
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "summary": "获取访客聊天信息接口",
- "parameters": [
- {
- "type": "string",
- "description": "访客ID",
- "name": "visitorId",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "认证token",
- "name": "token",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.Response"
- }
- }
- }
- }
- },
- "/visitors": {
- "get": {
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "summary": "获取访客列表接口",
- "parameters": [
- {
- "type": "string",
- "description": "分页",
- "name": "page",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "认证token",
- "name": "token",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.Response"
- }
- }
- }
- }
- },
- "/visitors_online": {
- "get": {
- "produces": [
- "application/json"
- ],
- "summary": "获取在线访客列表接口",
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.Response"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "controller.Response": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "msg": {
- "type": "string"
- },
- "result": {
- "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: "",
- 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{})
- }
|