Files
rustdesk-api/docs/admin/admin_docs.go
2024-10-18 15:05:58 +08:00

3294 lines
106 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.

// Package admin Code generated by swaggo/swag. DO NOT EDIT
package admin
import "github.com/swaggo/swag"
const docTemplateadmin = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/admin/address_book/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "批量创建地址簿",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "批量创建地址簿",
"parameters": [
{
"description": "地址簿信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.AddressBookForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBook"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "地址簿删除",
"parameters": [
{
"description": "地址簿信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.AddressBookForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "地址簿详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBook"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "地址簿列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "地址簿列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
},
{
"type": "integer",
"description": "是否是我的",
"name": "is_my",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBookList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book/share": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿分享",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "地址簿分享",
"parameters": [
{
"description": "地址簿信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.ShareByWebClientForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/address_book/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "地址簿编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址簿"
],
"summary": "地址簿编辑",
"parameters": [
{
"description": "地址簿信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.AddressBookForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AddressBook"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/app-config": {
"get": {
"security": [
{
"token": []
}
],
"description": "APP服务配置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"summary": "APP服务配置",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/audit_conn/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "链接日志删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"链接日志"
],
"summary": "链接日志删除",
"parameters": [
{
"description": "链接日志信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AuditConn"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/audit_conn/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "链接日志列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"链接日志"
],
"summary": "链接日志列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "目标设备",
"name": "peer_id",
"in": "query"
},
{
"type": "integer",
"description": "来源设备",
"name": "from_peer",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.AuditConnList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/file/oss_token": {
"get": {
"security": [
{
"token": []
}
],
"description": "获取ossToken",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"文件"
],
"summary": "获取ossToken",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/file/upload": {
"post": {
"security": [
{
"token": []
}
],
"description": "上传文件到本地",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"文件"
],
"summary": "上传文件到本地",
"parameters": [
{
"type": "file",
"description": "上传文件示例",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/group/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建群组",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"群组"
],
"summary": "创建群组",
"parameters": [
{
"description": "群组信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.GroupForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Group"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/group/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "群组删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"群组"
],
"summary": "群组删除",
"parameters": [
{
"description": "群组信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.GroupForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/group/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "群组详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"群组"
],
"summary": "群组详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Group"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/group/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "群组列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"群组"
],
"summary": "群组列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.GroupList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/group/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "群组编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"群组"
],
"summary": "群组编辑",
"parameters": [
{
"description": "群组信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.GroupForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Group"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/login": {
"post": {
"security": [
{
"token": []
}
],
"description": "登录",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录"
],
"summary": "登录",
"parameters": [
{
"description": "登录信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Gwen_http_request_admin.Login"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/admin.LoginPayload"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "登录日志删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志删除",
"parameters": [
{
"description": "登录日志信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.LoginLog"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLog"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "用户ID",
"name": "user_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLogList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/logout": {
"post": {
"description": "登出",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录"
],
"summary": "登出",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建Oauth",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "创建Oauth",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth删除",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth编辑",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建设备",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "创建设备",
"parameters": [
{
"description": "设备信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.PeerForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Peer"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "批量设备删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "批量设备删除",
"parameters": [
{
"description": "设备id",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.PeerBatchDeleteForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "设备详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "设备详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Peer"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "设备列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "设备列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "时间",
"name": "time_ago",
"in": "query"
},
{
"type": "string",
"description": "ID",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "主机名",
"name": "hostname",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.PeerList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "设备编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "设备编辑",
"parameters": [
{
"description": "设备信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.PeerForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Peer"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/server-config": {
"get": {
"security": [
{
"token": []
}
],
"description": "服务配置,给webclient提供api-server",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"summary": "RUSTDESK服务配置",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/tag/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"标签"
],
"summary": "创建标签",
"parameters": [
{
"description": "标签信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.TagForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Tag"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/tag/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "标签删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"标签"
],
"summary": "标签删除",
"parameters": [
{
"description": "标签信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.TagForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/tag/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "标签详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"标签"
],
"summary": "标签详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Tag"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/tag/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "标签列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"标签"
],
"summary": "标签列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "是否是我的",
"name": "is_my",
"in": "query"
},
{
"type": "integer",
"description": "用户id",
"name": "user_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.TagList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/tag/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "标签编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"标签"
],
"summary": "标签编辑",
"parameters": [
{
"description": "标签信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.TagForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Tag"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/changeCurPwd": {
"post": {
"security": [
{
"token": []
}
],
"description": "修改当前用户密码",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "修改当前用户密码",
"parameters": [
{
"description": "用户信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.ChangeCurPasswordForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建管理员",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "创建管理员",
"parameters": [
{
"description": "管理员信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UserForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.User"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/current": {
"get": {
"security": [
{
"token": []
}
],
"description": "当前用户",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "当前用户",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/admin.LoginPayload"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "管理员编删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "管理员删除",
"parameters": [
{
"description": "用户信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UserForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "管理员详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "管理员详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.User"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "管理员列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "管理员列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "账户",
"name": "username",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.UserList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/myOauth": {
"get": {
"security": [
{
"token": []
}
],
"description": "我的授权",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "我的授权",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/admin.UserOauthItem"
}
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "管理员编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "管理员编辑",
"parameters": [
{
"description": "用户信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UserForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.User"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/updatePassword": {
"post": {
"security": [
{
"token": []
}
],
"description": "修改密码",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "修改密码",
"parameters": [
{
"description": "用户信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UserPasswordForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
}
},
"definitions": {
"Gwen_http_request_admin.Login": {
"type": "object",
"required": [
"password",
"username"
],
"properties": {
"password": {
"type": "string"
},
"platform": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"admin.AddressBookForm": {
"type": "object",
"required": [
"id"
],
"properties": {
"alias": {
"type": "string"
},
"forceAlwaysRelay": {
"type": "boolean"
},
"hash": {
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "string"
},
"loginName": {
"type": "string"
},
"online": {
"type": "boolean"
},
"password": {
"type": "string"
},
"platform": {
"type": "string"
},
"rdpPort": {
"type": "string"
},
"rdpUsername": {
"type": "string"
},
"row_id": {
"type": "integer"
},
"sameServer": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"user_id": {
"type": "integer"
},
"user_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"username": {
"type": "string"
}
}
},
"admin.ChangeCurPasswordForm": {
"type": "object",
"required": [
"new_password",
"old_password"
],
"properties": {
"new_password": {
"type": "string",
"maxLength": 20,
"minLength": 4
},
"old_password": {
"type": "string",
"maxLength": 20,
"minLength": 4
}
}
},
"admin.GroupForm": {
"type": "object",
"required": [
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"admin.LoginPayload": {
"type": "object",
"properties": {
"nickname": {
"type": "string"
},
"route_names": {
"type": "array",
"items": {
"type": "string"
}
},
"token": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"admin.OauthForm": {
"type": "object",
"required": [
"client_id",
"client_secret",
"op",
"redirect_url"
],
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
}
}
},
"admin.PeerBatchDeleteForm": {
"type": "object",
"required": [
"row_ids"
],
"properties": {
"row_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"admin.PeerForm": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "string"
},
"memory": {
"type": "string"
},
"os": {
"type": "string"
},
"row_id": {
"type": "integer"
},
"username": {
"type": "string"
},
"uuid": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"admin.ShareByWebClientForm": {
"type": "object",
"required": [
"id",
"password",
"password_type"
],
"properties": {
"expire": {
"type": "integer"
},
"id": {
"type": "string"
},
"password": {
"type": "string"
},
"password_type": {
"description": "只能是once,fixed",
"type": "string",
"enum": [
"once",
"fixed"
]
}
}
},
"admin.TagForm": {
"type": "object",
"required": [
"color",
"name"
],
"properties": {
"color": {
"type": "integer"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
},
"admin.UserForm": {
"type": "object",
"required": [
"group_id",
"status",
"username"
],
"properties": {
"avatar": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"is_admin": {
"type": "boolean"
},
"nickname": {
"description": "Password string ` + "`" + `json:\"password\" validate:\"required,gte=4,lte=20\"` + "`" + `",
"type": "string"
},
"status": {
"minimum": 0,
"allOf": [
{
"$ref": "#/definitions/model.StatusCode"
}
]
},
"username": {
"type": "string",
"maxLength": 10,
"minLength": 4
}
}
},
"admin.UserOauthItem": {
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"third_type": {
"type": "string"
}
}
},
"admin.UserPasswordForm": {
"type": "object",
"required": [
"id",
"password"
],
"properties": {
"id": {
"type": "integer"
},
"password": {
"type": "string",
"maxLength": 20,
"minLength": 4
}
}
},
"model.AddressBook": {
"type": "object",
"properties": {
"alias": {
"type": "string"
},
"created_at": {
"type": "string"
},
"forceAlwaysRelay": {
"type": "boolean"
},
"hash": {
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "string"
},
"loginName": {
"type": "string"
},
"online": {
"type": "boolean"
},
"password": {
"type": "string"
},
"platform": {
"type": "string"
},
"rdpPort": {
"type": "string"
},
"rdpUsername": {
"type": "string"
},
"row_id": {
"type": "integer"
},
"sameServer": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"username": {
"type": "string"
}
}
},
"model.AddressBookList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.AddressBook"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.AuditConn": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"close_time": {
"type": "integer"
},
"conn_id": {
"type": "integer"
},
"created_at": {
"type": "string"
},
"from_name": {
"type": "string"
},
"from_peer": {
"type": "string"
},
"id": {
"type": "integer"
},
"ip": {
"type": "string"
},
"peer_id": {
"type": "string"
},
"session_id": {
"type": "string"
},
"type": {
"type": "integer"
},
"updated_at": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
},
"model.AuditConnList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.AuditConn"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Group": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
}
},
"model.GroupList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Group"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.LoginLog": {
"type": "object",
"properties": {
"client": {
"description": "webadmin,webclient,app,",
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"ip": {
"type": "string"
},
"platform": {
"description": "windows,linux,mac,android,ios",
"type": "string"
},
"type": {
"description": "account,oauth",
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"uuid": {
"type": "string"
}
}
},
"model.LoginLogList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.LoginLog"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Oauth": {
"type": "object",
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"model.OauthList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Oauth"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Peer": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"created_at": {
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "string"
},
"last_online_time": {
"type": "integer"
},
"memory": {
"type": "string"
},
"os": {
"type": "string"
},
"row_id": {
"type": "integer"
},
"updated_at": {
"type": "string"
},
"user": {
"$ref": "#/definitions/model.User"
},
"user_id": {
"type": "integer"
},
"username": {
"type": "string"
},
"uuid": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"model.PeerList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Peer"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.StatusCode": {
"type": "integer",
"enum": [
1,
2
],
"x-enum-comments": {
"COMMON_STATUS_DISABLED": "通用状态 禁用",
"COMMON_STATUS_ENABLE": "通用状态 启用"
},
"x-enum-varnames": [
"COMMON_STATUS_ENABLE",
"COMMON_STATUS_DISABLED"
]
},
"model.Tag": {
"type": "object",
"properties": {
"color": {
"description": "color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度后面6位表示颜色, 可以转成rgba",
"type": "integer"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
},
"model.TagList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Tag"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.User": {
"type": "object",
"properties": {
"avatar": {
"type": "string"
},
"created_at": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"is_admin": {
"type": "boolean"
},
"nickname": {
"type": "string"
},
"status": {
"$ref": "#/definitions/model.StatusCode"
},
"updated_at": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"model.UserList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.User"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"response.Response": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"data": {},
"message": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"token": {
"type": "apiKey",
"name": "api-token",
"in": "header"
}
}
}`
// SwaggerInfoadmin holds exported Swagger Info so clients can modify it
var SwaggerInfoadmin = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/api",
Schemes: []string{},
Title: "管理系统API",
Description: "接口",
InfoInstanceName: "admin",
SwaggerTemplate: docTemplateadmin,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfoadmin.InstanceName(), SwaggerInfoadmin)
}