Files
godoxy-yusing/internal/api/v1/docs/docs.go
2025-08-17 01:50:38 +08:00

3456 lines
113 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": {
"/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": "Post 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",
"consumes": [
"application/json"
],
"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": {
"post": {
"description": "Renew cert",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cert"
],
"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/containers": {
"get": {
"description": "Get containers",
"consumes": [
"application/json"
],
"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",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"docker"
],
"summary": "Get docker info",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ServerInfo"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-id": "info"
}
},
"/docker/logs/{server}/{container}": {
"get": {
"description": "Get docker container logs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"docker",
"websocket"
],
"summary": "Get docker container logs",
"parameters": [
{
"type": "string",
"description": "server name",
"name": "server",
"in": "path",
"required": true
},
{
"type": "string",
"description": "container id",
"name": "container",
"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"
}
},
"/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-comments": {
"FileTypeConfig": "@name FileTypeConfig",
"FileTypeMiddleware": "@name FileTypeMiddleware",
"FileTypeProvider": "@name FileTypeProvider"
},
"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": "Category filter",
"name": "category",
"in": "query"
},
{
"type": "string",
"description": "Provider filter",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/HomepageItems"
}
},
"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_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/system_info": {
"get": {
"description": "Get system info",
"produces": [
"application/json"
],
"tags": [
"metrics",
"websocket"
],
"summary": "Get system info",
"parameters": [
{
"type": "string",
"name": "agentAddr",
"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-comments": {
"SystemInfoAggregateModeCPUAverage": "@name SystemInfoAggregateModeCPUAverage",
"SystemInfoAggregateModeDiskUsage": "@name SystemInfoAggregateModeDiskUsage",
"SystemInfoAggregateModeDisksIOPS": "@name SystemInfoAggregateModeDisksIOPS",
"SystemInfoAggregateModeDisksReadSpeed": "@name SystemInfoAggregateModeDisksReadSpeed",
"SystemInfoAggregateModeDisksWriteSpeed": "@name SystemInfoAggregateModeDisksWriteSpeed",
"SystemInfoAggregateModeMemoryUsage": "@name SystemInfoAggregateModeMemoryUsage",
"SystemInfoAggregateModeMemoryUsagePercent": "@name SystemInfoAggregateModeMemoryUsagePercent",
"SystemInfoAggregateModeNetworkSpeed": "@name SystemInfoAggregateModeNetworkSpeed",
"SystemInfoAggregateModeNetworkTransfer": "@name SystemInfoAggregateModeNetworkTransfer",
"SystemInfoAggregateModeSensorTemperature": "@name SystemInfoAggregateModeSensorTemperature"
},
"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-comments": {
"MetricsPeriod15m": "@name MetricsPeriod15m",
"MetricsPeriod1d": "@name MetricsPeriod1d",
"MetricsPeriod1h": "@name MetricsPeriod1h",
"MetricsPeriod1mo": "@name MetricsPeriod1mo",
"MetricsPeriod5m": "@name MetricsPeriod5m"
},
"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"
}
},
"404": {
"description": "Not Found",
"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-comments": {
"MetricsPeriod15m": "@name MetricsPeriod15m",
"MetricsPeriod1d": "@name MetricsPeriod1d",
"MetricsPeriod1h": "@name MetricsPeriod1h",
"MetricsPeriod1mo": "@name MetricsPeriod1mo",
"MetricsPeriod5m": "@name MetricsPeriod5m"
},
"x-enum-varnames": [
"MetricsPeriod5m",
"MetricsPeriod15m",
"MetricsPeriod1h",
"MetricsPeriod1d",
"MetricsPeriod1mo"
],
"name": "interval",
"in": "query"
},
{
"type": "string",
"example": "",
"name": "keyword",
"in": "query"
},
{
"type": "integer",
"example": 10,
"name": "limit",
"in": "query"
},
{
"type": "string",
"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"
}
},
"mask": {
"description": "network mask",
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"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"
}
}
},
"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": {
"$ref": "#/definitions/ContainerState"
}
}
},
"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-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-comments": {
"FileTypeConfig": "@name FileTypeConfig",
"FileTypeMiddleware": "@name FileTypeMiddleware",
"FileTypeProvider": "@name FileTypeProvider"
},
"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"
}
}
},
"HealthMap": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/routes.HealthInfo"
}
},
"HomepageItems": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/homepage.Item"
}
}
},
"HomepageOverrideCategoryOrderParams": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"which": {
"type": "string"
}
}
},
"HomepageOverrideItemParams": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/homepage.ItemConfig"
},
"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/homepage.ItemConfig"
}
}
}
},
"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-comments": {
"MetricsPeriod15m": "@name MetricsPeriod15m",
"MetricsPeriod1d": "@name MetricsPeriod1d",
"MetricsPeriod1h": "@name MetricsPeriod1h",
"MetricsPeriod1mo": "@name MetricsPeriod1mo",
"MetricsPeriod5m": "@name MetricsPeriod5m"
},
"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"
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
"homepage": {
"$ref": "#/definitions/homepage.ItemConfig"
},
"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"
},
"display_name": {
"type": "string"
},
"downtime": {
"type": "number"
},
"idle": {
"type": "number"
},
"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-comments": {
"SystemInfoAggregateModeCPUAverage": "@name SystemInfoAggregateModeCPUAverage",
"SystemInfoAggregateModeDiskUsage": "@name SystemInfoAggregateModeDiskUsage",
"SystemInfoAggregateModeDisksIOPS": "@name SystemInfoAggregateModeDisksIOPS",
"SystemInfoAggregateModeDisksReadSpeed": "@name SystemInfoAggregateModeDisksReadSpeed",
"SystemInfoAggregateModeDisksWriteSpeed": "@name SystemInfoAggregateModeDisksWriteSpeed",
"SystemInfoAggregateModeMemoryUsage": "@name SystemInfoAggregateModeMemoryUsage",
"SystemInfoAggregateModeMemoryUsagePercent": "@name SystemInfoAggregateModeMemoryUsagePercent",
"SystemInfoAggregateModeNetworkSpeed": "@name SystemInfoAggregateModeNetworkSpeed",
"SystemInfoAggregateModeNetworkTransfer": "@name SystemInfoAggregateModeNetworkTransfer",
"SystemInfoAggregateModeSensorTemperature": "@name SystemInfoAggregateModeSensorTemperature"
},
"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.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"
}
}
},
"homepage.FetchResult": {
"type": "object",
"properties": {
"errMsg": {
"type": "string"
},
"icon": {
"type": "array",
"items": {
"type": "integer"
}
},
"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"
]
},
"homepage.Item": {
"type": "object",
"properties": {
"alias": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"icon": {
"type": "string"
},
"name": {
"description": "display name",
"type": "string"
},
"origin_url": {
"type": "string"
},
"provider": {
"type": "string"
},
"show": {
"type": "boolean"
},
"sort_order": {
"type": "integer"
},
"url": {
"type": "string"
},
"widget_config": {
"allOf": [
{
"$ref": "#/definitions/widgets.Config"
}
],
"x-nullable": true
}
}
},
"homepage.ItemConfig": {
"type": "object",
"properties": {
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"icon": {
"type": "string"
},
"name": {
"description": "display name",
"type": "string"
},
"show": {
"type": "boolean"
},
"sort_order": {
"type": "integer"
},
"url": {
"type": "string"
}
}
},
"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"
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
"homepage": {
"$ref": "#/definitions/homepage.ItemConfig"
},
"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.Command": {
"type": "object"
},
"rules.Rule": {
"type": "object",
"properties": {
"do": {
"$ref": "#/definitions/rules.Command"
},
"name": {
"type": "string"
},
"on": {
"$ref": "#/definitions/rules.RuleOn"
}
}
},
"rules.RuleOn": {
"type": "object"
},
"sensors.TemperatureStat": {
"type": "object",
"properties": {
"critical": {
"type": "number"
},
"high": {
"type": "number"
},
"name": {
"type": "string"
},
"temperature": {
"type": "number"
}
}
},
"time.Duration": {
"type": "integer",
"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"
}
}
}
}
}`
// 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)
}