269 lines
7.6 KiB
Go
269 lines
7.6 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": {
|
||
|
"/config": {
|
||
|
"get": {
|
||
|
"security": [
|
||
|
{
|
||
|
"Bearer": []
|
||
|
}
|
||
|
],
|
||
|
"description": "Prints app configuration in JSON format.",
|
||
|
"consumes": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"produces": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"summary": "App configuration.",
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "OK",
|
||
|
"schema": {
|
||
|
"$ref": "#/definitions/config.Config"
|
||
|
}
|
||
|
},
|
||
|
"400": {
|
||
|
"description": "Bad Request"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"/status": {
|
||
|
"get": {
|
||
|
"security": [
|
||
|
{
|
||
|
"Bearer": []
|
||
|
}
|
||
|
],
|
||
|
"description": "Returns forwards in JSON format. Forwards without domain may be inactive or not active yet.",
|
||
|
"consumes": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"produces": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"summary": "Forwards \u0026 servers status.",
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "OK",
|
||
|
"schema": {
|
||
|
"type": "object",
|
||
|
"additionalProperties": {
|
||
|
"$ref": "#/definitions/server.ServerStatus"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"400": {
|
||
|
"description": "Bad Request"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"definitions": {
|
||
|
"config.API": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"plugin": {
|
||
|
"$ref": "#/definitions/config.PluginAPI"
|
||
|
},
|
||
|
"rest": {
|
||
|
"$ref": "#/definitions/config.WebAPI"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"config.Config": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"api": {
|
||
|
"$ref": "#/definitions/config.API"
|
||
|
},
|
||
|
"debug": {
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"default_server": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"docker": {
|
||
|
"$ref": "#/definitions/config.DockerConfig"
|
||
|
},
|
||
|
"servers": {
|
||
|
"type": "array",
|
||
|
"items": {
|
||
|
"$ref": "#/definitions/config.Server"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"config.DockerConfig": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"cert_path": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"from_env": {
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"host": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"tls_verify": {
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"version": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"config.DriverParams": {
|
||
|
"type": "object",
|
||
|
"additionalProperties": true
|
||
|
},
|
||
|
"config.DriverType": {
|
||
|
"type": "string",
|
||
|
"enum": [
|
||
|
"ssh",
|
||
|
"plugin",
|
||
|
"nil"
|
||
|
],
|
||
|
"x-enum-varnames": [
|
||
|
"DriverSSH",
|
||
|
"DriverPlugin",
|
||
|
"DriverNil"
|
||
|
]
|
||
|
},
|
||
|
"config.PluginAPI": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"port": {
|
||
|
"type": "integer",
|
||
|
"maximum": 65535,
|
||
|
"minimum": 0
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"config.Server": {
|
||
|
"type": "object",
|
||
|
"required": [
|
||
|
"name"
|
||
|
],
|
||
|
"properties": {
|
||
|
"driver": {
|
||
|
"$ref": "#/definitions/config.DriverType"
|
||
|
},
|
||
|
"name": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"params": {
|
||
|
"$ref": "#/definitions/config.DriverParams"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"config.WebAPI": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"port": {
|
||
|
"type": "integer",
|
||
|
"maximum": 65535,
|
||
|
"minimum": 0
|
||
|
},
|
||
|
"token": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"dto.Container": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"domain": {
|
||
|
"type": "string",
|
||
|
"example": "https://service.localhost.run"
|
||
|
},
|
||
|
"id": {
|
||
|
"type": "string",
|
||
|
"example": "49ec97b6a12560f98fe21a20a88c37d289c83b14cc0ada2a62b0e404512905ed"
|
||
|
},
|
||
|
"ip": {
|
||
|
"type": "string",
|
||
|
"format": "ipv4"
|
||
|
},
|
||
|
"names": {
|
||
|
"type": "array",
|
||
|
"items": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"example": [
|
||
|
"service-web-1"
|
||
|
]
|
||
|
},
|
||
|
"port": {
|
||
|
"type": "integer",
|
||
|
"example": 80
|
||
|
},
|
||
|
"remote_host": {
|
||
|
"type": "string",
|
||
|
"example": "hostname"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"server.Connections": {
|
||
|
"type": "object",
|
||
|
"additionalProperties": {
|
||
|
"$ref": "#/definitions/dto.Container"
|
||
|
}
|
||
|
},
|
||
|
"server.ServerStatus": {
|
||
|
"type": "object",
|
||
|
"properties": {
|
||
|
"connections": {
|
||
|
"$ref": "#/definitions/server.Connections"
|
||
|
},
|
||
|
"name": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"securityDefinitions": {
|
||
|
"Bearer": {
|
||
|
"description": "Rest API token (leave empty if it's not provided in config).",
|
||
|
"type": "apiKey",
|
||
|
"name": "Authorization",
|
||
|
"in": "header"
|
||
|
}
|
||
|
}
|
||
|
}`
|
||
|
|
||
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||
|
var SwaggerInfo = &swag.Spec{
|
||
|
Version: "1.0",
|
||
|
Host: "",
|
||
|
BasePath: "/api/v1",
|
||
|
Schemes: []string{},
|
||
|
Title: "sshpoke REST API",
|
||
|
Description: "",
|
||
|
InfoInstanceName: "swagger",
|
||
|
SwaggerTemplate: docTemplate,
|
||
|
LeftDelim: "{{",
|
||
|
RightDelim: "}}",
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||
|
}
|