Files
godoxy-yusing/internal/api/v1/docs/docs.go
yusing 4941e9ec32 feat(docker): implement container management endpoints for start, stop, and restart
- Added Restart, Start, and Stop functions to manage Docker containers by ID.
- Introduced corresponding request structs (StartRequest, StopRequest) for handling input.
- Updated Swagger documentation to include new endpoints and request/response schemas.
2025-09-04 07:30:51 +08:00

4145 lines
135 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}}",
"termsOfService": "https://github.com/yusing/godoxy/blob/main/LICENSE",
"contact": {
"name": "Yusing",
"url": "https://github.com/yusing/godoxy/issues"
},
"license": {
"name": "MIT",
"url": "https://github.com/yusing/godoxy/blob/main/LICENSE"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/agent/create": {
"post": {
"description": "Create a new agent and return the docker compose file, encrypted CA and client PEMs\nThe returned PEMs are encrypted with a random key and will be used for verification when adding a new agent",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent"
],
"summary": "Create a new agent",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NewAgentRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/NewAgentResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "create"
}
},
"/agent/list": {
"get": {
"description": "List agents",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent",
"websocket"
],
"summary": "List agents",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Agent"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "list"
}
},
"/agent/verify": {
"post": {
"description": "Verify a new agent and return the number of routes added",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent"
],
"summary": "Verify a new agent",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VerifyNewAgentRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "verify"
}
},
"/auth/callback": {
"post": {
"description": "Handles the callback from the provider after successful authentication",
"produces": [
"text/plain"
],
"tags": [
"auth"
],
"summary": "Auth Callback",
"parameters": [
{
"description": "Userpass only",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.UserPassAuthCallbackRequest"
}
}
],
"responses": {
"200": {
"description": "Userpass: OK",
"schema": {
"type": "string"
}
},
"302": {
"description": "OIDC: Redirects to home page",
"schema": {
"type": "string"
}
},
"400": {
"description": "Userpass: invalid request / credentials",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "string"
}
}
},
"x-id": "callback"
}
},
"/auth/check": {
"head": {
"description": "Checks if the user is authenticated by validating their token",
"produces": [
"text/plain"
],
"tags": [
"auth"
],
"summary": "Check authentication status",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"403": {
"description": "Forbidden: use X-Redirect-To header to redirect to login page",
"schema": {
"type": "string"
}
}
},
"x-id": "check"
}
},
"/auth/login": {
"post": {
"description": "Initiates the login process by redirecting the user to the provider's login page",
"produces": [
"text/plain"
],
"tags": [
"auth"
],
"summary": "Login",
"responses": {
"302": {
"description": "Redirects to login page or IdP",
"schema": {
"type": "string"
}
},
"403": {
"description": "Forbidden(webui): follow X-Redirect-To header",
"schema": {
"type": "string"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"type": "string"
}
}
},
"x-id": "login"
}
},
"/auth/logout": {
"post": {
"description": "Logs out the user by invalidating the token",
"produces": [
"text/plain"
],
"tags": [
"auth"
],
"summary": "Logout",
"responses": {
"302": {
"description": "Redirects to home page",
"schema": {
"type": "string"
}
}
},
"x-id": "logout"
}
},
"/cert/info": {
"get": {
"description": "Get cert info",
"produces": [
"application/json"
],
"tags": [
"cert"
],
"summary": "Get cert info",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CertInfo"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "info"
}
},
"/cert/renew": {
"get": {
"description": "Renew cert",
"produces": [
"text/plain"
],
"tags": [
"cert",
"websocket"
],
"summary": "Renew cert",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "renew"
}
},
"/docker/container/{id}": {
"get": {
"description": "Get container by container id",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Get container",
"parameters": [
{
"type": "string",
"description": "Container ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ContainerResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "container"
}
},
"/docker/containers": {
"get": {
"description": "Get containers",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Get containers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ContainerResponse"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "containers"
}
},
"/docker/info": {
"get": {
"description": "Get docker info",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Get docker info",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ServerInfo"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "info"
}
},
"/docker/logs/{id}": {
"get": {
"description": "Get docker container logs by container id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"docker",
"websocket"
],
"summary": "Get docker container logs",
"parameters": [
{
"type": "string",
"description": "container id",
"name": "id",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "show stdout",
"name": "stdout",
"in": "query"
},
{
"type": "boolean",
"description": "show stderr",
"name": "stderr",
"in": "query"
},
{
"type": "string",
"description": "from timestamp",
"name": "from",
"in": "query"
},
{
"type": "string",
"description": "to timestamp",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "levels",
"name": "levels",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "logs"
}
},
"/docker/restart": {
"post": {
"description": "Restart container by container id",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Restart container",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dockerapi.StopRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "restart"
}
},
"/docker/start": {
"post": {
"description": "Start container by container id",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Start container",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dockerapi.StartRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "start"
}
},
"/docker/stop": {
"post": {
"description": "Stop container by container id",
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Stop container",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dockerapi.StopRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "stop"
}
},
"/favicon": {
"get": {
"description": "Get favicon",
"consumes": [
"application/json"
],
"produces": [
"image/svg+xml",
"image/x-icon",
"image/png",
"image/webp"
],
"tags": [
"v1"
],
"summary": "Get favicon",
"parameters": [
{
"type": "string",
"description": "URL of the route",
"name": "url",
"in": "query"
},
{
"type": "string",
"description": "Alias of the route",
"name": "alias",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/homepage.FetchResult"
}
}
},
"400": {
"description": "Bad Request: alias is empty or route is not HTTPRoute",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden: unauthorized",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "Not Found: route or icon not found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error: internal error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "favicon"
}
},
"/file/content": {
"get": {
"description": "Get file content",
"consumes": [
"application/json"
],
"produces": [
"application/json",
"application/godoxy+yaml"
],
"tags": [
"file"
],
"summary": "Get file content",
"parameters": [
{
"type": "string",
"format": "filename",
"name": "filename",
"in": "query",
"required": true
},
{
"enum": [
"config",
"provider",
"middleware"
],
"type": "string",
"x-enum-varnames": [
"FileTypeConfig",
"FileTypeProvider",
"FileTypeMiddleware"
],
"name": "type",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "get"
},
"put": {
"description": "Set file content",
"consumes": [
"text/plain"
],
"produces": [
"application/json"
],
"tags": [
"file"
],
"summary": "Set file content",
"parameters": [
{
"enum": [
"config",
"provider",
"middleware"
],
"type": "string",
"description": "Type",
"name": "type",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Filename",
"name": "filename",
"in": "query",
"required": true
},
{
"description": "File",
"name": "file",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set"
}
},
"/file/list": {
"get": {
"description": "List files",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"file"
],
"summary": "List files",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListFilesResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "list"
}
},
"/file/validate": {
"post": {
"description": "Validate file",
"consumes": [
"text/plain"
],
"produces": [
"application/json"
],
"tags": [
"file"
],
"summary": "Validate file",
"parameters": [
{
"enum": [
"config",
"provider",
"middleware"
],
"type": "string",
"description": "Type",
"name": "type",
"in": "query",
"required": true
},
{
"description": "File content",
"name": "file",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "File validated",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"417": {
"description": "Validation failed",
"schema": {}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "validate"
}
},
"/health": {
"get": {
"description": "Get health info by route name",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1",
"websocket"
],
"summary": "Get routes health info",
"responses": {
"200": {
"description": "Health info by route name",
"schema": {
"$ref": "#/definitions/HealthMap"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "health"
}
},
"/homepage/categories": {
"get": {
"description": "List homepage categories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "List homepage categories",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "categories"
}
},
"/homepage/items": {
"get": {
"description": "Homepage items",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Homepage items",
"parameters": [
{
"type": "string",
"description": "Search query",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Category filter",
"name": "category",
"in": "query"
},
{
"type": "string",
"description": "Provider filter",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/HomepageCategory"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "items"
}
},
"/homepage/set/category_order": {
"post": {
"description": "Set homepage category order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage category order",
"parameters": [
{
"description": "Override category order",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideCategoryOrderParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-category-order"
}
},
"/homepage/set/item": {
"post": {
"description": "Override single homepage item.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Override single homepage item",
"parameters": [
{
"description": "Override single item",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item"
}
},
"/homepage/set/item_all_sort_order": {
"post": {
"description": "Set homepage item all sort order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage item all sort order",
"parameters": [
{
"description": "Set item all sort order",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemAllSortOrderParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item-all-sort-order"
}
},
"/homepage/set/item_fav_sort_order": {
"post": {
"description": "Set homepage item fav sort order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage item fav sort order",
"parameters": [
{
"description": "Set item fav sort order",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemFavSortOrderParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item-fav-sort-order"
}
},
"/homepage/set/item_favorite": {
"post": {
"description": "Set homepage item favorite.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage item favorite",
"parameters": [
{
"description": "Set item favorite",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemFavoriteParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item-favorite"
}
},
"/homepage/set/item_sort_order": {
"post": {
"description": "Set homepage item sort order.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage item sort order",
"parameters": [
{
"description": "Set item sort order",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemSortOrderParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item-sort-order"
}
},
"/homepage/set/item_visible": {
"post": {
"description": "POST list of item ids and visibility value.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Set homepage item visibility",
"parameters": [
{
"description": "Set item visibility",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemVisibleParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-item-visible"
}
},
"/homepage/set/items_batch": {
"post": {
"description": "Override multiple homepage items.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"homepage"
],
"summary": "Override multiple homepage items",
"parameters": [
{
"description": "Override multiple items",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/HomepageOverrideItemsBatchParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "set-items-batch"
}
},
"/icons": {
"get": {
"description": "List icons",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1"
],
"summary": "List icons",
"parameters": [
{
"type": "integer",
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Keyword",
"name": "keyword",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/homepage.IconMetaSearch"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "icons"
}
},
"/metrics/all_system_info": {
"get": {
"description": "Get system info",
"produces": [
"application/json"
],
"tags": [
"metrics",
"websocket"
],
"summary": "Get system info",
"parameters": [
{
"enum": [
"cpu_average",
"memory_usage",
"memory_usage_percent",
"disks_read_speed",
"disks_write_speed",
"disks_iops",
"disk_usage",
"network_speed",
"network_transfer",
"sensor_temperature"
],
"type": "string",
"x-enum-varnames": [
"SystemInfoAggregateModeCPUAverage",
"SystemInfoAggregateModeMemoryUsage",
"SystemInfoAggregateModeMemoryUsagePercent",
"SystemInfoAggregateModeDisksReadSpeed",
"SystemInfoAggregateModeDisksWriteSpeed",
"SystemInfoAggregateModeDisksIOPS",
"SystemInfoAggregateModeDiskUsage",
"SystemInfoAggregateModeNetworkSpeed",
"SystemInfoAggregateModeNetworkTransfer",
"SystemInfoAggregateModeSensorTemperature"
],
"name": "aggregate",
"in": "query"
},
{
"type": "string",
"format": "duration",
"name": "interval",
"in": "query"
},
{
"enum": [
"5m",
"15m",
"1h",
"1d",
"1mo"
],
"type": "string",
"x-enum-varnames": [
"MetricsPeriod5m",
"MetricsPeriod15m",
"MetricsPeriod1h",
"MetricsPeriod1d",
"MetricsPeriod1mo"
],
"name": "period",
"in": "query"
}
],
"responses": {
"200": {
"description": "period specified, aggregated system info by agent name",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SystemInfoAggregate"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "all_system_info"
}
},
"/metrics/system_info": {
"get": {
"description": "Get system info",
"produces": [
"application/json"
],
"tags": [
"metrics",
"websocket"
],
"summary": "Get system info",
"parameters": [
{
"type": "string",
"name": "agentAddr",
"in": "query"
},
{
"type": "string",
"name": "agentName",
"in": "query"
},
{
"enum": [
"cpu_average",
"memory_usage",
"memory_usage_percent",
"disks_read_speed",
"disks_write_speed",
"disks_iops",
"disk_usage",
"network_speed",
"network_transfer",
"sensor_temperature"
],
"type": "string",
"x-enum-varnames": [
"SystemInfoAggregateModeCPUAverage",
"SystemInfoAggregateModeMemoryUsage",
"SystemInfoAggregateModeMemoryUsagePercent",
"SystemInfoAggregateModeDisksReadSpeed",
"SystemInfoAggregateModeDisksWriteSpeed",
"SystemInfoAggregateModeDisksIOPS",
"SystemInfoAggregateModeDiskUsage",
"SystemInfoAggregateModeNetworkSpeed",
"SystemInfoAggregateModeNetworkTransfer",
"SystemInfoAggregateModeSensorTemperature"
],
"name": "aggregate",
"in": "query"
},
{
"enum": [
"5m",
"15m",
"1h",
"1d",
"1mo"
],
"type": "string",
"x-enum-varnames": [
"MetricsPeriod5m",
"MetricsPeriod15m",
"MetricsPeriod1h",
"MetricsPeriod1d",
"MetricsPeriod1mo"
],
"name": "period",
"in": "query"
}
],
"responses": {
"200": {
"description": "period specified",
"schema": {
"$ref": "#/definitions/SystemInfoAggregate"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "system_info"
}
},
"/metrics/uptime": {
"get": {
"description": "Get uptime",
"produces": [
"application/json"
],
"tags": [
"metrics",
"websocket"
],
"summary": "Get uptime",
"parameters": [
{
"enum": [
"5m",
"15m",
"1h",
"1d",
"1mo"
],
"type": "string",
"example": "1m",
"x-enum-varnames": [
"MetricsPeriod5m",
"MetricsPeriod15m",
"MetricsPeriod1h",
"MetricsPeriod1d",
"MetricsPeriod1mo"
],
"name": "interval",
"in": "query"
},
{
"type": "string",
"example": "",
"name": "keyword",
"in": "query"
},
{
"type": "integer",
"default": 0,
"example": 10,
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"example": 10,
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "period specified",
"schema": {
"$ref": "#/definitions/UptimeAggregate"
}
},
"204": {
"description": "No Content",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "uptime"
}
},
"/reload": {
"post": {
"description": "Reload config",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1"
],
"summary": "Reload config",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SuccessResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "reload"
}
},
"/route/by_provider": {
"get": {
"description": "List routes by provider",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"route"
],
"summary": "List routes by provider",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/routeApi.RoutesByProvider"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "byProvider"
}
},
"/route/list": {
"get": {
"description": "List routes",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"route",
"websocket"
],
"summary": "List routes",
"parameters": [
{
"type": "string",
"description": "Provider",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Route"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "routes"
}
},
"/route/providers": {
"get": {
"description": "List route providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"route",
"websocket"
],
"summary": "List route providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RouteProvider"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "providers"
}
},
"/route/{which}": {
"get": {
"description": "List route",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"route"
],
"summary": "List route",
"parameters": [
{
"type": "string",
"description": "Route name",
"name": "which",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Route"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "route"
}
},
"/stats": {
"get": {
"description": "Get stats",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1",
"websocket"
],
"summary": "Get GoDoxy stats",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/StatsResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "stats"
}
},
"/version": {
"get": {
"description": "Get the version of the GoDoxy",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"tags": [
"v1"
],
"summary": "Get version",
"responses": {
"200": {
"description": "version",
"schema": {
"type": "string"
}
}
},
"x-id": "version"
}
}
},
"definitions": {
"Agent": {
"type": "object",
"properties": {
"addr": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"CIDR": {
"type": "object",
"properties": {
"ip": {
"description": "network number",
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
},
"mask": {
"description": "network mask",
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
}
}
},
"CertInfo": {
"type": "object",
"properties": {
"dns_names": {
"type": "array",
"items": {
"type": "string"
}
},
"email_addresses": {
"type": "array",
"items": {
"type": "string"
}
},
"issuer": {
"type": "string"
},
"not_after": {
"type": "integer"
},
"not_before": {
"type": "integer"
},
"subject": {
"type": "string"
}
}
},
"Container": {
"type": "object",
"properties": {
"agent": {
"$ref": "#/definitions/Agent"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"container_id": {
"type": "string"
},
"container_name": {
"type": "string"
},
"docker_host": {
"type": "string"
},
"errors": {
"type": "string"
},
"idlewatcher_config": {
"$ref": "#/definitions/IdlewatcherConfig"
},
"image": {
"$ref": "#/definitions/ContainerImage"
},
"is_excluded": {
"type": "boolean"
},
"is_explicit": {
"type": "boolean"
},
"is_host_network_mode": {
"type": "boolean"
},
"labels": {
"description": "for displaying in UI",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"mounts": {
"description": "source:destination",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"network": {
"type": "string"
},
"private_hostname": {
"type": "string"
},
"private_ports": {
"description": "privatePort:types.Port",
"allOf": [
{
"$ref": "#/definitions/types.PortMapping"
}
]
},
"public_hostname": {
"type": "string"
},
"public_ports": {
"description": "non-zero publicPort:types.Port",
"allOf": [
{
"$ref": "#/definitions/types.PortMapping"
}
]
},
"running": {
"type": "boolean"
},
"state": {
"$ref": "#/definitions/container.ContainerState"
}
}
},
"ContainerImage": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"name": {
"type": "string"
},
"sha256": {
"type": "string"
},
"tag": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"ContainerResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"name": {
"type": "string"
},
"server": {
"type": "string"
},
"state": {
"allOf": [
{
"$ref": "#/definitions/ContainerState"
}
],
"x-nullable": true
}
}
},
"ContainerState": {
"type": "string",
"enum": [
"created",
"running",
"paused",
"restarting",
"removing",
"exited",
"dead"
],
"x-enum-comments": {
"StateCreated": "StateCreated indicates the container is created, but not (yet) started.",
"StateDead": "StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts.",
"StateExited": "StateExited indicates that the container exited.",
"StatePaused": "StatePaused indicates that the container's current state is paused.",
"StateRemoving": "StateRemoving indicates that the container is being removed.",
"StateRestarting": "StateRestarting indicates that the container is currently restarting.",
"StateRunning": "StateRunning indicates that the container is running."
},
"x-enum-descriptions": [
"StateCreated indicates the container is created, but not (yet) started.",
"StateRunning indicates that the container is running.",
"StatePaused indicates that the container's current state is paused.",
"StateRestarting indicates that the container is currently restarting.",
"StateRemoving indicates that the container is being removed.",
"StateExited indicates that the container exited.",
"StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts."
],
"x-enum-varnames": [
"StateCreated",
"StateRunning",
"StatePaused",
"StateRestarting",
"StateRemoving",
"StateExited",
"StateDead"
]
},
"ContainerStats": {
"type": "object",
"properties": {
"paused": {
"type": "integer"
},
"running": {
"type": "integer"
},
"stopped": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"ContainerStopMethod": {
"type": "string",
"enum": [
"pause",
"stop",
"kill"
],
"x-enum-varnames": [
"ContainerStopMethodPause",
"ContainerStopMethodStop",
"ContainerStopMethodKill"
]
},
"DockerConfig": {
"type": "object",
"required": [
"container_id",
"container_name",
"docker_host"
],
"properties": {
"container_id": {
"type": "string"
},
"container_name": {
"type": "string"
},
"docker_host": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string",
"x-nullable": true
},
"message": {
"type": "string"
}
}
},
"FileType": {
"type": "string",
"enum": [
"config",
"provider",
"middleware"
],
"x-enum-varnames": [
"FileTypeConfig",
"FileTypeProvider",
"FileTypeMiddleware"
]
},
"HTTPHeader": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"HealthCheckConfig": {
"type": "object",
"properties": {
"disable": {
"type": "boolean"
},
"interval": {
"type": "integer"
},
"path": {
"type": "string"
},
"retries": {
"description": "\u003c0: immediate, \u003e=0: threshold",
"type": "integer"
},
"timeout": {
"type": "integer"
},
"use_get": {
"type": "boolean"
}
}
},
"HealthExtra": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/LoadBalancerConfig"
},
"pool": {
"type": "object",
"additionalProperties": {}
}
}
},
"HealthJSON": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/HealthCheckConfig"
},
"detail": {
"type": "string"
},
"extra": {
"allOf": [
{
"$ref": "#/definitions/HealthExtra"
}
],
"x-nullable": true
},
"lastSeen": {
"type": "integer"
},
"lastSeenStr": {
"type": "string"
},
"latency": {
"type": "number"
},
"latencyStr": {
"type": "string"
},
"name": {
"type": "string"
},
"started": {
"type": "integer"
},
"startedStr": {
"type": "string"
},
"status": {
"type": "string"
},
"uptime": {
"type": "number"
},
"uptimeStr": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"HealthMap": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/routes.HealthInfo"
}
},
"HomepageCategory": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/HomepageItem"
}
},
"name": {
"type": "string"
}
}
},
"HomepageItem": {
"type": "object",
"properties": {
"alias": {
"type": "string"
},
"all_sort_order": {
"description": "sort order in all",
"type": "integer"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"fav_sort_order": {
"description": "sort order in favorite",
"type": "integer"
},
"favorite": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"name": {
"description": "display name",
"type": "string"
},
"origin_url": {
"type": "string"
},
"provider": {
"type": "string"
},
"show": {
"type": "boolean"
},
"sort_order": {
"description": "sort order in category",
"type": "integer"
},
"url": {
"type": "string"
},
"widget_config": {
"allOf": [
{
"$ref": "#/definitions/widgets.Config"
}
],
"x-nullable": true
},
"widgets": {
"type": "array",
"items": {
"$ref": "#/definitions/HomepageItemWidget"
}
}
}
},
"HomepageItemConfig": {
"type": "object",
"properties": {
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"favorite": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"name": {
"description": "display name",
"type": "string"
},
"show": {
"type": "boolean"
},
"url": {
"type": "string"
},
"widget_config": {
"allOf": [
{
"$ref": "#/definitions/widgets.Config"
}
],
"x-nullable": true
}
}
},
"HomepageItemWidget": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"HomepageOverrideCategoryOrderParams": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemAllSortOrderParams": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemFavSortOrderParams": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemFavoriteParams": {
"type": "object",
"properties": {
"value": {
"type": "boolean"
},
"which": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"HomepageOverrideItemParams": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/HomepageItemConfig"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemSortOrderParams": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemVisibleParams": {
"type": "object",
"properties": {
"value": {
"type": "boolean"
},
"which": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"HomepageOverrideItemsBatchParams": {
"type": "object",
"properties": {
"value": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/HomepageItemConfig"
}
}
}
},
"IdlewatcherConfig": {
"type": "object",
"properties": {
"depends_on": {
"type": "array",
"items": {
"type": "string"
}
},
"docker": {
"$ref": "#/definitions/DockerConfig"
},
"idle_timeout": {
"description": "0: no idle watcher.\nPositive: idle watcher with idle timeout.\nNegative: idle watcher as a dependency.\tIdleTimeout time.Duration ` + "`" + `json:\"idle_timeout\" json_ext:\"duration\"` + "`" + `",
"allOf": [
{
"$ref": "#/definitions/time.Duration"
}
]
},
"proxmox": {
"$ref": "#/definitions/ProxmoxConfig"
},
"start_endpoint": {
"description": "Optional path that must be hit to start container",
"type": "string"
},
"stop_method": {
"$ref": "#/definitions/ContainerStopMethod"
},
"stop_signal": {
"type": "string"
},
"stop_timeout": {
"$ref": "#/definitions/time.Duration"
},
"wake_timeout": {
"$ref": "#/definitions/time.Duration"
}
}
},
"ListFilesResponse": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "string"
}
},
"middleware": {
"type": "array",
"items": {
"type": "string"
}
},
"provider": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"LoadBalancerConfig": {
"type": "object",
"properties": {
"link": {
"type": "string"
},
"mode": {
"$ref": "#/definitions/LoadBalancerMode"
},
"options": {
"type": "object",
"additionalProperties": {}
},
"weight": {
"type": "integer"
}
}
},
"LoadBalancerMode": {
"type": "string",
"enum": [
"",
"roundrobin",
"leastconn",
"iphash"
],
"x-enum-varnames": [
"LoadbalanceModeUnset",
"LoadbalanceModeRoundRobin",
"LoadbalanceModeLeastConn",
"LoadbalanceModeIPHash"
]
},
"LogFilter-CIDR": {
"type": "object",
"properties": {
"negative": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/CIDR"
}
}
}
},
"LogFilter-HTTPHeader": {
"type": "object",
"properties": {
"negative": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/HTTPHeader"
}
}
}
},
"LogFilter-HTTPMethod": {
"type": "object",
"properties": {
"negative": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"LogFilter-Host": {
"type": "object",
"properties": {
"negative": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"LogFilter-StatusCodeRange": {
"type": "object",
"properties": {
"negative": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/StatusCodeRange"
}
}
}
},
"LogRetention": {
"type": "object",
"properties": {
"days": {
"type": "integer"
},
"keep_size": {
"type": "integer"
},
"last": {
"type": "integer"
}
}
},
"MetricsPeriod": {
"type": "string",
"enum": [
"5m",
"15m",
"1h",
"1d",
"1mo"
],
"x-enum-varnames": [
"MetricsPeriod5m",
"MetricsPeriod15m",
"MetricsPeriod1h",
"MetricsPeriod1d",
"MetricsPeriod1mo"
]
},
"NewAgentRequest": {
"type": "object",
"required": [
"host",
"name",
"port",
"type"
],
"properties": {
"host": {
"type": "string"
},
"name": {
"type": "string"
},
"nightly": {
"type": "boolean"
},
"port": {
"type": "integer",
"maximum": 65535,
"minimum": 1
},
"type": {
"type": "string",
"enum": [
"docker",
"system"
]
}
}
},
"NewAgentResponse": {
"type": "object",
"properties": {
"ca": {
"$ref": "#/definitions/PEMPairResponse"
},
"client": {
"$ref": "#/definitions/PEMPairResponse"
},
"compose": {
"type": "string"
}
}
},
"PEMPairResponse": {
"type": "object",
"properties": {
"cert": {
"type": "string",
"format": "base64"
},
"key": {
"type": "string",
"format": "base64"
}
}
},
"ProviderStats": {
"type": "object",
"properties": {
"reverse_proxies": {
"$ref": "#/definitions/RouteStats"
},
"streams": {
"$ref": "#/definitions/RouteStats"
},
"total": {
"type": "integer"
},
"type": {
"$ref": "#/definitions/ProviderType"
}
}
},
"ProviderType": {
"type": "string",
"enum": [
"docker",
"file",
"agent"
],
"x-enum-varnames": [
"ProviderTypeDocker",
"ProviderTypeFile",
"ProviderTypeAgent"
]
},
"ProxmoxConfig": {
"type": "object",
"required": [
"node",
"vmid"
],
"properties": {
"node": {
"type": "string"
},
"vmid": {
"type": "integer"
}
}
},
"ProxyStats": {
"type": "object",
"properties": {
"providers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ProviderStats"
}
},
"reverse_proxies": {
"$ref": "#/definitions/RouteStats"
},
"streams": {
"$ref": "#/definitions/RouteStats"
},
"total": {
"type": "integer"
}
}
},
"RequestLoggerConfig": {
"type": "object",
"properties": {
"buffer_size": {
"description": "Deprecated: buffer size is adjusted dynamically",
"type": "integer"
},
"fields": {
"$ref": "#/definitions/accesslog.Fields"
},
"filters": {
"$ref": "#/definitions/accesslog.Filters"
},
"format": {
"type": "string",
"enum": [
"common",
"combined",
"json"
]
},
"path": {
"type": "string"
},
"retention": {
"$ref": "#/definitions/LogRetention"
},
"rotate_interval": {
"type": "integer"
},
"stdout": {
"type": "boolean"
}
}
},
"Route": {
"type": "object",
"properties": {
"access_log": {
"allOf": [
{
"$ref": "#/definitions/RequestLoggerConfig"
}
],
"x-nullable": true
},
"agent": {
"type": "string"
},
"alias": {
"type": "string"
},
"container": {
"description": "Docker only",
"allOf": [
{
"$ref": "#/definitions/Container"
}
],
"x-nullable": true
},
"disable_compression": {
"type": "boolean"
},
"excluded": {
"type": "boolean",
"x-nullable": true
},
"excluded_reason": {
"type": "string",
"x-nullable": true
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
"homepage": {
"$ref": "#/definitions/HomepageItemConfig"
},
"host": {
"type": "string"
},
"idlewatcher": {
"allOf": [
{
"$ref": "#/definitions/IdlewatcherConfig"
}
],
"x-nullable": true
},
"load_balance": {
"allOf": [
{
"$ref": "#/definitions/LoadBalancerConfig"
}
],
"x-nullable": true
},
"lurl": {
"description": "private fields",
"type": "string",
"x-nullable": true
},
"middlewares": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/types.LabelMap"
},
"x-nullable": true
},
"no_tls_verify": {
"type": "boolean"
},
"path_patterns": {
"type": "array",
"items": {
"type": "string"
},
"x-nullable": true
},
"port": {
"$ref": "#/definitions/route.Port"
},
"provider": {
"description": "for backward compatibility",
"type": "string",
"x-nullable": true
},
"purl": {
"type": "string"
},
"response_header_timeout": {
"type": "integer"
},
"root": {
"type": "string"
},
"rules": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/rules.Rule"
}
},
"scheme": {
"$ref": "#/definitions/route.Scheme"
}
}
},
"RouteProvider": {
"type": "object",
"properties": {
"full_name": {
"type": "string"
},
"short_name": {
"type": "string"
}
}
},
"RouteStats": {
"type": "object",
"properties": {
"error": {
"type": "integer"
},
"healthy": {
"type": "integer"
},
"napping": {
"type": "integer"
},
"total": {
"type": "integer"
},
"unhealthy": {
"type": "integer"
},
"unknown": {
"type": "integer"
}
}
},
"RouteStatus": {
"type": "object",
"properties": {
"latency": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"healthy",
"unhealthy",
"unknown",
"napping",
"starting"
]
},
"timestamp": {
"type": "integer"
}
}
},
"RouteStatusesByAlias": {
"type": "object",
"properties": {
"statuses": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/routes.HealthInfo"
}
},
"timestamp": {
"type": "integer"
}
}
},
"RouteUptimeAggregate": {
"type": "object",
"properties": {
"alias": {
"type": "string"
},
"avg_latency": {
"type": "number"
},
"current_status": {
"type": "string",
"enum": [
"healthy",
"unhealthy",
"unknown",
"napping",
"starting"
]
},
"display_name": {
"type": "string"
},
"downtime": {
"type": "number"
},
"idle": {
"type": "number"
},
"is_docker": {
"type": "boolean"
},
"statuses": {
"type": "array",
"items": {
"$ref": "#/definitions/RouteStatus"
}
},
"uptime": {
"type": "number"
}
}
},
"ServerInfo": {
"type": "object",
"properties": {
"containers": {
"$ref": "#/definitions/ContainerStats"
},
"images": {
"type": "integer"
},
"memory": {
"type": "string"
},
"n_cpu": {
"type": "integer"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"StatsResponse": {
"type": "object",
"properties": {
"proxies": {
"$ref": "#/definitions/ProxyStats"
},
"uptime": {
"type": "string"
}
}
},
"StatusCodeRange": {
"type": "object",
"properties": {
"end": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
},
"SuccessResponse": {
"type": "object",
"properties": {
"details": {
"type": "object",
"additionalProperties": {},
"x-nullable": true
},
"message": {
"type": "string"
}
}
},
"SystemInfo": {
"type": "object",
"properties": {
"cpu_average": {
"type": "number"
},
"disks": {
"description": "disk usage by partition",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/disk.UsageStat"
}
},
"disks_io": {
"description": "disk IO by device",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/disk.IOCountersStat"
}
},
"memory": {
"$ref": "#/definitions/mem.VirtualMemoryStat"
},
"network": {
"$ref": "#/definitions/net.IOCountersStat"
},
"sensors": {
"description": "sensor temperature by key",
"type": "array",
"items": {
"$ref": "#/definitions/sensors.TemperatureStat"
}
},
"timestamp": {
"type": "integer"
}
}
},
"SystemInfoAggregate": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"total": {
"type": "integer"
}
}
},
"SystemInfoAggregateMode": {
"type": "string",
"enum": [
"cpu_average",
"memory_usage",
"memory_usage_percent",
"disks_read_speed",
"disks_write_speed",
"disks_iops",
"disk_usage",
"network_speed",
"network_transfer",
"sensor_temperature"
],
"x-enum-varnames": [
"SystemInfoAggregateModeCPUAverage",
"SystemInfoAggregateModeMemoryUsage",
"SystemInfoAggregateModeMemoryUsagePercent",
"SystemInfoAggregateModeDisksReadSpeed",
"SystemInfoAggregateModeDisksWriteSpeed",
"SystemInfoAggregateModeDisksIOPS",
"SystemInfoAggregateModeDiskUsage",
"SystemInfoAggregateModeNetworkSpeed",
"SystemInfoAggregateModeNetworkTransfer",
"SystemInfoAggregateModeSensorTemperature"
]
},
"UptimeAggregate": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/RouteUptimeAggregate"
}
},
"total": {
"type": "integer"
}
}
},
"VerifyNewAgentRequest": {
"type": "object",
"properties": {
"ca": {
"$ref": "#/definitions/PEMPairResponse"
},
"client": {
"$ref": "#/definitions/PEMPairResponse"
},
"host": {
"type": "string"
}
}
},
"accesslog.FieldConfig": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/accesslog.FieldMode"
}
},
"default": {
"enum": [
"keep",
"drop",
"redact"
],
"allOf": [
{
"$ref": "#/definitions/accesslog.FieldMode"
}
]
}
}
},
"accesslog.FieldMode": {
"type": "string",
"enum": [
"keep",
"drop",
"redact"
],
"x-enum-varnames": [
"FieldModeKeep",
"FieldModeDrop",
"FieldModeRedact"
]
},
"accesslog.Fields": {
"type": "object",
"properties": {
"cookies": {
"$ref": "#/definitions/accesslog.FieldConfig"
},
"headers": {
"$ref": "#/definitions/accesslog.FieldConfig"
},
"query": {
"$ref": "#/definitions/accesslog.FieldConfig"
}
}
},
"accesslog.Filters": {
"type": "object",
"properties": {
"cidr": {
"$ref": "#/definitions/LogFilter-CIDR"
},
"headers": {
"description": "header exists or header == value",
"allOf": [
{
"$ref": "#/definitions/LogFilter-HTTPHeader"
}
]
},
"host": {
"$ref": "#/definitions/LogFilter-Host"
},
"method": {
"$ref": "#/definitions/LogFilter-HTTPMethod"
},
"status_codes": {
"$ref": "#/definitions/LogFilter-StatusCodeRange"
}
}
},
"auth.UserPassAuthCallbackRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"container.ContainerState": {
"type": "string",
"enum": [
"created",
"running",
"paused",
"restarting",
"removing",
"exited",
"dead"
],
"x-enum-comments": {
"StateCreated": "StateCreated indicates the container is created, but not (yet) started.",
"StateDead": "StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts.",
"StateExited": "StateExited indicates that the container exited.",
"StatePaused": "StatePaused indicates that the container's current state is paused.",
"StateRemoving": "StateRemoving indicates that the container is being removed.",
"StateRestarting": "StateRestarting indicates that the container is currently restarting.",
"StateRunning": "StateRunning indicates that the container is running."
},
"x-enum-descriptions": [
"StateCreated indicates the container is created, but not (yet) started.",
"StateRunning indicates that the container is running.",
"StatePaused indicates that the container's current state is paused.",
"StateRestarting indicates that the container is currently restarting.",
"StateRemoving indicates that the container is being removed.",
"StateExited indicates that the container exited.",
"StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts."
],
"x-enum-varnames": [
"StateCreated",
"StateRunning",
"StatePaused",
"StateRestarting",
"StateRemoving",
"StateExited",
"StateDead"
]
},
"container.Port": {
"type": "object",
"properties": {
"IP": {
"description": "Host IP address that the container's port is mapped to",
"type": "string"
},
"PrivatePort": {
"description": "Port on the container\nRequired: true",
"type": "integer"
},
"PublicPort": {
"description": "Port exposed on the host",
"type": "integer"
},
"Type": {
"description": "type\nRequired: true",
"type": "string"
}
}
},
"disk.IOCountersStat": {
"type": "object",
"properties": {
"iops": {
"description": "godoxy",
"type": "integer"
},
"name": {
"description": "ReadCount uint64 ` + "`" + `json:\"readCount\"` + "`" + `\nMergedReadCount uint64 ` + "`" + `json:\"mergedReadCount\"` + "`" + `\nWriteCount uint64 ` + "`" + `json:\"writeCount\"` + "`" + `\nMergedWriteCount uint64 ` + "`" + `json:\"mergedWriteCount\"` + "`" + `\nReadBytes uint64 ` + "`" + `json:\"readBytes\"` + "`" + `\nWriteBytes uint64 ` + "`" + `json:\"writeBytes\"` + "`" + `\nReadTime uint64 ` + "`" + `json:\"readTime\"` + "`" + `\nWriteTime uint64 ` + "`" + `json:\"writeTime\"` + "`" + `\nIopsInProgress uint64 ` + "`" + `json:\"iopsInProgress\"` + "`" + `\nIoTime uint64 ` + "`" + `json:\"ioTime\"` + "`" + `\nWeightedIO uint64 ` + "`" + `json:\"weightedIO\"` + "`" + `",
"type": "string"
},
"read_bytes": {
"description": "SerialNumber string ` + "`" + `json:\"serialNumber\"` + "`" + `\nLabel string ` + "`" + `json:\"label\"` + "`" + `",
"type": "integer"
},
"read_count": {
"type": "integer"
},
"read_speed": {
"description": "godoxy",
"type": "number"
},
"write_bytes": {
"type": "integer"
},
"write_count": {
"type": "integer"
},
"write_speed": {
"description": "godoxy",
"type": "number"
}
}
},
"disk.UsageStat": {
"type": "object",
"properties": {
"free": {
"type": "integer"
},
"fstype": {
"type": "string"
},
"path": {
"type": "string"
},
"total": {
"type": "integer"
},
"used": {
"type": "integer"
},
"used_percent": {
"type": "number"
}
}
},
"dockerapi.StartRequest": {
"type": "object",
"required": [
"id"
],
"properties": {
"checkpointDir": {
"type": "string"
},
"checkpointID": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"dockerapi.StopRequest": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"signal": {
"description": "Signal (optional) is the signal to send to the container to (gracefully)\nstop it before forcibly terminating the container with SIGKILL after the\ntimeout expires. If not value is set, the default (SIGTERM) is used.",
"type": "string"
},
"timeout": {
"description": "Timeout (optional) is the timeout (in seconds) to wait for the container\nto stop gracefully before forcibly terminating it with SIGKILL.\n\n- Use nil to use the default timeout (10 seconds).\n- Use '-1' to wait indefinitely.\n- Use '0' to not wait for the container to exit gracefully, and\n immediately proceeds to forcibly terminating the container.\n- Other positive values are used as timeout (in seconds).",
"type": "integer"
}
}
},
"homepage.FetchResult": {
"type": "object",
"properties": {
"errMsg": {
"type": "string"
},
"icon": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
},
"statusCode": {
"type": "integer"
}
}
},
"homepage.IconMetaSearch": {
"type": "object",
"properties": {
"Dark": {
"type": "boolean"
},
"Light": {
"type": "boolean"
},
"PNG": {
"type": "boolean"
},
"Ref": {
"type": "string"
},
"SVG": {
"type": "boolean"
},
"Source": {
"$ref": "#/definitions/homepage.IconSource"
},
"WebP": {
"type": "boolean"
}
}
},
"homepage.IconSource": {
"type": "string",
"enum": [
"https://",
"@target",
"@walkxcode",
"@selfhst"
],
"x-enum-varnames": [
"IconSourceAbsolute",
"IconSourceRelative",
"IconSourceWalkXCode",
"IconSourceSelfhSt"
]
},
"mem.VirtualMemoryStat": {
"type": "object",
"properties": {
"available": {
"description": "RAM available for programs to allocate\n\nThis value is computed from the kernel specific values.",
"type": "integer"
},
"free": {
"description": "This is the kernel's notion of free memory; RAM chips whose bits nobody\ncares about the value of right now. For a human consumable number,\nAvailable is what you really want.",
"type": "integer"
},
"total": {
"description": "Total amount of RAM on this system",
"type": "integer"
},
"used": {
"description": "RAM used by programs\n\nThis value is computed from the kernel specific values.",
"type": "integer"
},
"used_percent": {
"description": "Percentage of RAM used by programs\n\nThis value is computed from the kernel specific values.",
"type": "number"
}
}
},
"net.IOCountersStat": {
"type": "object",
"properties": {
"bytes_recv": {
"description": "number of bytes received",
"type": "integer"
},
"bytes_sent": {
"description": "Name string ` + "`" + `json:\"name\"` + "`" + ` // interface name",
"type": "integer"
},
"download_speed": {
"description": "godoxy",
"type": "number"
},
"upload_speed": {
"description": "godoxy",
"type": "number"
}
}
},
"route.Port": {
"type": "object",
"properties": {
"listening": {
"type": "integer"
},
"proxy": {
"type": "integer"
}
}
},
"route.Route": {
"type": "object",
"properties": {
"access_log": {
"allOf": [
{
"$ref": "#/definitions/RequestLoggerConfig"
}
],
"x-nullable": true
},
"agent": {
"type": "string"
},
"alias": {
"type": "string"
},
"container": {
"description": "Docker only",
"allOf": [
{
"$ref": "#/definitions/Container"
}
],
"x-nullable": true
},
"disable_compression": {
"type": "boolean"
},
"excluded": {
"type": "boolean",
"x-nullable": true
},
"excluded_reason": {
"type": "string",
"x-nullable": true
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
"homepage": {
"$ref": "#/definitions/HomepageItemConfig"
},
"host": {
"type": "string"
},
"idlewatcher": {
"allOf": [
{
"$ref": "#/definitions/IdlewatcherConfig"
}
],
"x-nullable": true
},
"load_balance": {
"allOf": [
{
"$ref": "#/definitions/LoadBalancerConfig"
}
],
"x-nullable": true
},
"lurl": {
"description": "private fields",
"type": "string",
"x-nullable": true
},
"middlewares": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/types.LabelMap"
},
"x-nullable": true
},
"no_tls_verify": {
"type": "boolean"
},
"path_patterns": {
"type": "array",
"items": {
"type": "string"
},
"x-nullable": true
},
"port": {
"$ref": "#/definitions/route.Port"
},
"provider": {
"description": "for backward compatibility",
"type": "string",
"x-nullable": true
},
"purl": {
"type": "string"
},
"response_header_timeout": {
"type": "integer"
},
"root": {
"type": "string"
},
"rules": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/rules.Rule"
}
},
"scheme": {
"$ref": "#/definitions/route.Scheme"
}
}
},
"route.Scheme": {
"type": "string",
"enum": [
"http",
"https",
"tcp",
"udp",
"fileserver"
],
"x-enum-varnames": [
"SchemeHTTP",
"SchemeHTTPS",
"SchemeTCP",
"SchemeUDP",
"SchemeFileServer"
]
},
"routeApi.RoutesByProvider": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/route.Route"
}
}
},
"routes.HealthInfo": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"latency": {
"description": "latency in microseconds",
"type": "number"
},
"status": {
"type": "string",
"enum": [
"healthy",
"unhealthy",
"napping",
"starting",
"error",
"unknown"
]
},
"uptime": {
"description": "uptime in milliseconds",
"type": "number"
}
}
},
"rules.Rule": {
"type": "object",
"properties": {
"do": {
"type": "string"
},
"name": {
"type": "string"
},
"on": {
"type": "string"
}
}
},
"sensors.TemperatureStat": {
"type": "object",
"properties": {
"critical": {
"type": "number"
},
"high": {
"type": "number"
},
"name": {
"type": "string"
},
"temperature": {
"type": "number"
}
}
},
"time.Duration": {
"type": "integer",
"format": "int64",
"enum": [
-9223372036854775808,
9223372036854775807,
1,
1000,
1000000,
1000000000,
60000000000,
3600000000000
],
"x-enum-varnames": [
"minDuration",
"maxDuration",
"Nanosecond",
"Microsecond",
"Millisecond",
"Second",
"Minute",
"Hour"
]
},
"types.LabelMap": {
"type": "object",
"additionalProperties": {}
},
"types.PortMapping": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/container.Port"
}
},
"widgets.Config": {
"type": "object",
"properties": {
"config": {},
"provider": {
"type": "string"
}
}
}
},
"externalDocs": {
"description": "GoDoxy Docs",
"url": "https://docs.godoxy.dev"
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/api/v1",
Schemes: []string{},
Title: "GoDoxy API",
Description: "GoDoxy API",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}