// Code generated by swaggo/swag. DO NOT EDIT. package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/admin/bot/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new bot", "produces": [ "application/json" ], "tags": [ "bot" ], "summary": "CreateBot", "parameters": [ { "description": "CreateBotParams", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.CreateBotParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/admin/bot/delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete bot", "tags": [ "bot" ], "summary": "DeleteBot", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/admin/bot/list": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "get community bot info", "tags": [ "bot" ], "summary": "ListBot", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/admin/bot/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update bot info", "tags": [ "bot" ], "summary": "UpdateBot", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/admin/staff/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new staff", "produces": [ "application/json" ], "tags": [ "user" ], "summary": "CreateStaff", "parameters": [ { "description": "RegisterStaffParams", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.RegisterStaffParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/admin/staff/delete": { "post": { "description": "Delete a new staff", "produces": [ "application/json" ], "tags": [ "user" ], "summary": "DeleteStaff", "parameters": [ { "description": "DeleteUserParams", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.DeleteUserParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/common/file/upload": { "post": { "description": "upload a file", "produces": [ "application/json" ], "tags": [ "common" ], "summary": "UploadFile", "parameters": [ { "type": "file", "description": "file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/community/create": { "post": { "description": "Create a new community", "produces": [ "application/json" ], "tags": [ "community" ], "summary": "CreateCommunity", "parameters": [ { "description": "Community", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.CommunityParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/community/info": { "post": { "description": "get community info", "produces": [ "application/json" ], "tags": [ "community" ], "summary": "GetCommunityInfo", "parameters": [ { "description": "GetCommunityInfoParams", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.GetCommunityInfoParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/community/me": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get my community info", "produces": [ "application/json" ], "tags": [ "community" ], "summary": "GetMyCommunityInfo", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/community/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "get my community info", "produces": [ "application/json" ], "tags": [ "community" ], "summary": "GetMyCommunityInfo", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/email/code": { "post": { "description": "Use email to send verification code", "produces": [ "application/json" ], "tags": [ "mail" ], "summary": "SendCode", "parameters": [ { "description": "Email address", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.SendToParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/login/account": { "post": { "description": "login with account", "produces": [ "application/json" ], "tags": [ "user" ], "summary": "AccountLogin", "parameters": [ { "description": "LoginParamsWithAccount", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.LoginParamsWithAccount" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/openim/callback": { "post": { "description": "Support OpenIM callback", "produces": [ "application/json" ], "tags": [ "openim" ], "summary": "OpenIMCallback", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/register/admin": { "post": { "description": "Create a new admin", "produces": [ "application/json" ], "tags": [ "user" ], "summary": "AdminRegister", "parameters": [ { "description": "RegisterAdminParams", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/requestparams.RegisterAdminParams" } } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/user/info": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "get user info", "tags": [ "user" ], "summary": "GetUserInfo", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/user/me": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get my user info", "tags": [ "user" ], "summary": "GetMyInfo", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/user/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update user info", "tags": [ "user" ], "summary": "UpdateInfo", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/user/update-password": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update user password", "tags": [ "user" ], "summary": "UpdatePassword", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } }, "/api/v1/user/userlist": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "get community user info", "tags": [ "user" ], "summary": "GetCommunityUserList", "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "msg": { "type": "string" } } } ] } } } } } }, "definitions": { "requestparams.CommunityParams": { "type": "object", "required": [ "avatar", "email", "name" ], "properties": { "avatar": { "description": "Avatar is optional.", "type": "string" }, "description": { "description": "Description is optional.", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } } }, "requestparams.CreateBotParams": { "type": "object", "required": [ "avatar", "bot_addr", "bot_port", "bot_token", "description", "nickname" ], "properties": { "avatar": { "type": "string" }, "bot_addr": { "type": "string" }, "bot_port": { "type": "integer" }, "bot_token": { "type": "string" }, "description": { "type": "string" }, "nickname": { "type": "string" } } }, "requestparams.CreateUserParams": { "type": "object", "required": [ "avatar", "email", "nickname", "password" ], "properties": { "avatar": { "description": "Avatar is optional.", "type": "string" }, "email": { "type": "string" }, "nickname": { "type": "string" }, "password": { "type": "string" } } }, "requestparams.DeleteUserParams": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } }, "requestparams.GetCommunityInfoParams": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } }, "requestparams.LoginParamsWithAccount": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "requestparams.RegisterAdminParams": { "type": "object", "required": [ "code", "community_info", "user_info" ], "properties": { "code": { "type": "string" }, "community_info": { "$ref": "#/definitions/requestparams.CommunityParams" }, "user_info": { "$ref": "#/definitions/requestparams.CreateUserParams" } } }, "requestparams.RegisterStaffParams": { "type": "object", "required": [ "user_info" ], "properties": { "user_info": { "$ref": "#/definitions/requestparams.CreateUserParams" } } }, "requestparams.SendToParams": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } }, "response.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "msg": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "v0.2.0", Host: "", BasePath: "", Schemes: []string{}, Title: "OpenKF Server", Description: "OpenKF Server API Docs.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }