zrok/rest_server_zrok/embedded_spec.go

499 lines
10 KiB
Go
Raw Normal View History

2022-07-22 16:52:36 +02:00
// Code generated by go-swagger; DO NOT EDIT.
package rest_server_zrok
2022-07-22 16:52:36 +02:00
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
2022-07-22 17:45:37 +02:00
"application/zrok.v1+json"
2022-07-22 16:52:36 +02:00
],
"produces": [
2022-07-22 17:45:37 +02:00
"application/zrok.v1+json"
2022-07-22 16:52:36 +02:00
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"description": "zrok client access",
"title": "zrok",
2022-07-22 16:52:36 +02:00
"version": "1.0.0"
},
"paths": {
"/account": {
"post": {
"tags": [
"identity"
],
"operationId": "createAccount",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/accountRequest"
}
}
],
"responses": {
"201": {
"description": "account created",
"schema": {
"$ref": "#/definitions/accountResponse"
}
2022-07-25 22:23:55 +02:00
},
"400": {
2022-07-27 19:38:35 +02:00
"description": "account not created (already exists)",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-25 22:23:55 +02:00
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
}
}
}
2022-07-25 17:51:23 +02:00
},
2022-07-25 23:05:44 +02:00
"/enable": {
"post": {
"security": [
{
"key": []
}
],
2022-07-25 23:05:44 +02:00
"tags": [
"identity"
],
"operationId": "enable",
"responses": {
"201": {
"description": "environment enabled",
"schema": {
"$ref": "#/definitions/enableResponse"
}
},
2022-07-27 20:50:46 +02:00
"401": {
"description": "invalid api key"
},
"404": {
"description": "account not found"
},
2022-07-25 23:05:44 +02:00
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-25 23:05:44 +02:00
}
}
}
},
2022-07-26 21:38:35 +02:00
"/tunnel": {
"post": {
"tags": [
"tunnel"
],
"operationId": "tunnel",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/tunnelRequest"
}
}
],
"responses": {
"201": {
"description": "tunnel created",
"schema": {
"$ref": "#/definitions/tunnelResponse"
}
2022-07-27 19:17:47 +02:00
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-26 21:38:35 +02:00
}
}
}
},
2022-07-27 17:35:28 +02:00
"/untunnel": {
"delete": {
"tags": [
"tunnel"
],
"operationId": "untunnel",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/untunnelRequest"
}
}
],
"responses": {
"200": {
"description": "tunnel removed"
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-27 17:35:28 +02:00
}
}
}
},
2022-07-25 17:51:23 +02:00
"/version": {
"get": {
"tags": [
"metadata"
],
"operationId": "version",
"responses": {
"200": {
"description": "retrieve the current server version",
"schema": {
"$ref": "#/definitions/version"
}
}
}
}
2022-07-22 16:52:36 +02:00
}
},
"definitions": {
"accountRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"accountResponse": {
"type": "object",
"properties": {
2022-07-25 22:42:06 +02:00
"token": {
"type": "string"
}
}
},
"enableResponse": {
"type": "object",
"properties": {
"cfg": {
"type": "string"
},
2022-07-25 22:42:06 +02:00
"identity": {
"type": "string"
}
}
},
2022-07-27 19:38:35 +02:00
"errorMessage": {
"type": "string"
},
"principal": {
"type": "string"
},
2022-07-26 21:38:35 +02:00
"tunnelRequest": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
2022-07-26 23:17:37 +02:00
"identity": {
2022-07-26 21:38:35 +02:00
"type": "string"
}
}
},
"tunnelResponse": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
}
},
2022-07-27 17:35:28 +02:00
"untunnelRequest": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
}
},
2022-07-22 16:52:36 +02:00
"version": {
"type": "string"
}
},
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-token",
"in": "header"
2022-07-22 16:52:36 +02:00
}
}
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
2022-07-22 17:45:37 +02:00
"application/zrok.v1+json"
2022-07-22 16:52:36 +02:00
],
"produces": [
2022-07-22 17:45:37 +02:00
"application/zrok.v1+json"
2022-07-22 16:52:36 +02:00
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"description": "zrok client access",
"title": "zrok",
2022-07-22 16:52:36 +02:00
"version": "1.0.0"
},
"paths": {
"/account": {
"post": {
"tags": [
"identity"
],
"operationId": "createAccount",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/accountRequest"
}
}
],
"responses": {
"201": {
"description": "account created",
"schema": {
"$ref": "#/definitions/accountResponse"
}
2022-07-25 22:23:55 +02:00
},
"400": {
2022-07-27 19:38:35 +02:00
"description": "account not created (already exists)",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-25 22:23:55 +02:00
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
}
}
}
2022-07-25 17:51:23 +02:00
},
2022-07-25 23:05:44 +02:00
"/enable": {
"post": {
"security": [
{
"key": []
}
],
2022-07-25 23:05:44 +02:00
"tags": [
"identity"
],
"operationId": "enable",
"responses": {
"201": {
"description": "environment enabled",
"schema": {
"$ref": "#/definitions/enableResponse"
}
},
2022-07-27 20:50:46 +02:00
"401": {
"description": "invalid api key"
},
"404": {
"description": "account not found"
},
2022-07-25 23:05:44 +02:00
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-25 23:05:44 +02:00
}
}
}
},
2022-07-26 21:38:35 +02:00
"/tunnel": {
"post": {
"tags": [
"tunnel"
],
"operationId": "tunnel",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/tunnelRequest"
}
}
],
"responses": {
"201": {
"description": "tunnel created",
"schema": {
"$ref": "#/definitions/tunnelResponse"
}
2022-07-27 19:17:47 +02:00
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-26 21:38:35 +02:00
}
}
}
},
2022-07-27 17:35:28 +02:00
"/untunnel": {
"delete": {
"tags": [
"tunnel"
],
"operationId": "untunnel",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/untunnelRequest"
}
}
],
"responses": {
"200": {
"description": "tunnel removed"
},
"500": {
2022-07-27 19:38:35 +02:00
"description": "internal server error",
"schema": {
"$ref": "#/definitions/errorMessage"
}
2022-07-27 17:35:28 +02:00
}
}
}
},
2022-07-25 17:51:23 +02:00
"/version": {
"get": {
"tags": [
"metadata"
],
"operationId": "version",
"responses": {
"200": {
"description": "retrieve the current server version",
"schema": {
"$ref": "#/definitions/version"
}
}
}
}
2022-07-22 16:52:36 +02:00
}
},
"definitions": {
"accountRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"accountResponse": {
"type": "object",
"properties": {
2022-07-25 22:42:06 +02:00
"token": {
"type": "string"
}
}
},
"enableResponse": {
"type": "object",
"properties": {
"cfg": {
"type": "string"
},
2022-07-25 22:42:06 +02:00
"identity": {
"type": "string"
}
}
},
2022-07-27 19:38:35 +02:00
"errorMessage": {
"type": "string"
},
"principal": {
"type": "string"
},
2022-07-26 21:38:35 +02:00
"tunnelRequest": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
2022-07-26 23:17:37 +02:00
"identity": {
2022-07-26 21:38:35 +02:00
"type": "string"
}
}
},
"tunnelResponse": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
}
},
2022-07-27 17:35:28 +02:00
"untunnelRequest": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
}
},
2022-07-22 16:52:36 +02:00
"version": {
"type": "string"
}
},
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-token",
"in": "header"
2022-07-22 16:52:36 +02:00
}
}
}`))
}