mirror of
https://github.com/veops/oneterm.git
synced 2025-09-26 19:31:14 +08:00
2705 lines
93 KiB
Go
2705 lines
93 KiB
Go
// Package docs 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": {
|
|
"/account": {
|
|
"get": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "name or account",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account type",
|
|
"name": "type",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "account",
|
|
"name": "account",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/account/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "account",
|
|
"name": "account",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "name or ip",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset's parent id",
|
|
"name": "parent_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset ip",
|
|
"name": "ip",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "asset",
|
|
"name": "asset",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "asset",
|
|
"name": "asset",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset/query_by_server": {
|
|
"get": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset/update_by_server": {
|
|
"put": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "asset update request",
|
|
"name": "req",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command": {
|
|
"get": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "name or cmds",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command enable",
|
|
"name": "enable",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or cmds",
|
|
"name": "search",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "command",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "command",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/config": {
|
|
"get": {
|
|
"tags": [
|
|
"config"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"config"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "config",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/:asset_id/:account_id/:protocol": {
|
|
"post": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "width",
|
|
"name": "w",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "height",
|
|
"name": "h",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.Session"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/:session_id": {
|
|
"get": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/close/:session_id": {
|
|
"post": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/monitor/:session_id": {
|
|
"get": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gateway": {
|
|
"get": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "name or host or account or port",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "gateway ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "gateway name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account type",
|
|
"name": "type",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "gateway",
|
|
"name": "gateway",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gateway/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "gateway",
|
|
"name": "gateway",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/history": {
|
|
"get": {
|
|
"tags": [
|
|
"history"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"account",
|
|
"asset",
|
|
"command",
|
|
"gateway",
|
|
"node",
|
|
"public_key"
|
|
],
|
|
"type": "string",
|
|
"description": "type",
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "target_id",
|
|
"name": "target_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "uid",
|
|
"name": "uid",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "create=1 delete=2 update=3",
|
|
"name": "action_type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start time, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end time, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.History"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/history/type/mapping": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/node": {
|
|
"get": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "node ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node's parent id",
|
|
"name": "parent_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "node name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "exclude itself and its child",
|
|
"name": "no_self_child",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "include itself and its parent",
|
|
"name": "self_parent",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "node",
|
|
"name": "node",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/node/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "node",
|
|
"name": "node",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_key": {
|
|
"get": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "name or mac",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "publicKey name",
|
|
"name": "name",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "publicKey",
|
|
"name": "publicKey",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_key/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "publicKey",
|
|
"name": "publicKey",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_key/auth": {
|
|
"post": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "method 1password 2publickey",
|
|
"name": "req",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.ReqAuth"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "status, online=1, offline=2",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "uid",
|
|
"name": "uid",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "asset_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "client_ip",
|
|
"name": "client_ip",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Session"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "session",
|
|
"name": "sessino",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Session"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/:session_id/cmd": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SessionCmd"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/cmd": {
|
|
"post": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "SessionCmd",
|
|
"name": "sessioncmd",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SessionCmd"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/option/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SessionOptionAsset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/option/clientip": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/replay/:session_id": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/account": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month"
|
|
],
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAccount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month"
|
|
],
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAsset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/assettype": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAssetType"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/count": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.StatCount"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/count/ofuser": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.StatCountOfUser"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/rank/ofuser": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAsset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controller.HttpResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.ListData": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {}
|
|
}
|
|
}
|
|
},
|
|
"model.AccessAuth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allow": {
|
|
"type": "boolean"
|
|
},
|
|
"cmd_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"end": {
|
|
"type": "string"
|
|
},
|
|
"ranges": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Range"
|
|
}
|
|
},
|
|
"start": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Account": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"account_type": {
|
|
"type": "integer"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phrase": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Asset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_auth": {
|
|
"$ref": "#/definitions/model.AccessAuth"
|
|
},
|
|
"authorization": {
|
|
"$ref": "#/definitions/model.Map-int-model_Slice-int"
|
|
},
|
|
"ci_id": {
|
|
"type": "integer"
|
|
},
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"connectable": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_chain": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer"
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Command": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"enable": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"timeout": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Gateway": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"account_type": {
|
|
"type": "integer"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phrase": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.History": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_type": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"new": {
|
|
"$ref": "#/definitions/model.Map-string-any"
|
|
},
|
|
"old": {
|
|
"$ref": "#/definitions/model.Map-string-any"
|
|
},
|
|
"remote_ip": {
|
|
"type": "string"
|
|
},
|
|
"target_id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Map-int-model_Slice-int": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Map-string-any": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
},
|
|
"model.Map-string-string": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"model.Node": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_auth": {
|
|
"$ref": "#/definitions/model.AccessAuth"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"authorization": {
|
|
"$ref": "#/definitions/model.Map-int-model_Slice-int"
|
|
},
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"description": "ResourceId int ` + "`" + `json:\"resource_id\"` + "`" + `",
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"has_child": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer"
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"sync": {
|
|
"$ref": "#/definitions/model.Sync"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.PublicKey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"description": "ResourceId int ` + "`" + `json:\"resource_id\"` + "`" + `",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"mac": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Range": {
|
|
"type": "object",
|
|
"properties": {
|
|
"times": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"week": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.ReqAuth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"method": {
|
|
"type": "integer"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Session": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer"
|
|
},
|
|
"account_info": {
|
|
"type": "string"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_info": {
|
|
"type": "string"
|
|
},
|
|
"client_ip": {
|
|
"type": "string"
|
|
},
|
|
"closed_at": {
|
|
"type": "string"
|
|
},
|
|
"cmd_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"duration": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_info": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"protocol": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
},
|
|
"session_type": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"uid": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SessionCmd": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"level": {
|
|
"type": "integer"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SessionOptionAsset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAsset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"time": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAssetType": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatCount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"gateway": {
|
|
"description": "TotalUser int64 ` + "`" + `json:\"total_user\"` + "`" + `",
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"total_asset": {
|
|
"type": "integer"
|
|
},
|
|
"total_gateway": {
|
|
"type": "integer"
|
|
},
|
|
"user": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StatCountOfUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"total_asset": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Sync": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enable": {
|
|
"type": "boolean"
|
|
},
|
|
"filters": {
|
|
"type": "string"
|
|
},
|
|
"frequency": {
|
|
"type": "number"
|
|
},
|
|
"mapping": {
|
|
"$ref": "#/definitions/model.Map-string-string"
|
|
},
|
|
"type_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "",
|
|
Description: "",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|