// 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": { "/api/access-logs/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "AccessLogs" ], "summary": "List access logs", "parameters": [ { "type": "string", "description": "Node ID", "name": "node_id", "in": "query" }, { "type": "string", "description": "Remote address", "name": "remote_addr", "in": "query" }, { "type": "string", "description": "Host", "name": "host", "in": "query" }, { "type": "string", "description": "Path", "name": "path", "in": "query" }, { "type": "integer", "description": "Page index", "name": "p", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order", "name": "sort_order", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/access-logs/cleanup": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessLogs" ], "summary": "Cleanup access logs by retention days", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/access-logs/folds": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "AccessLogs" ], "summary": "List folded access logs", "parameters": [ { "type": "string", "description": "Node ID", "name": "node_id", "in": "query" }, { "type": "string", "description": "Remote address", "name": "remote_addr", "in": "query" }, { "type": "string", "description": "Host", "name": "host", "in": "query" }, { "type": "string", "description": "Path", "name": "path", "in": "query" }, { "type": "integer", "description": "Page index", "name": "p", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order", "name": "sort_order", "in": "query" }, { "type": "integer", "description": "Fold minutes", "name": "fold_minutes", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/access-logs/ip-summary": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "AccessLogs" ], "summary": "List access log IP summaries", "parameters": [ { "type": "string", "description": "Node ID", "name": "node_id", "in": "query" }, { "type": "string", "description": "Remote address", "name": "remote_addr", "in": "query" }, { "type": "string", "description": "Host", "name": "host", "in": "query" }, { "type": "integer", "description": "Page index", "name": "p", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "Sort by", "name": "sort_by", "in": "query" }, { "type": "string", "description": "Sort order", "name": "sort_order", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/access-logs/ip-summary/trend": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "AccessLogs" ], "summary": "Get access log IP trend", "parameters": [ { "type": "string", "description": "Node ID", "name": "node_id", "in": "query" }, { "type": "string", "description": "Remote address", "name": "remote_addr", "in": "query", "required": true }, { "type": "string", "description": "Host", "name": "host", "in": "query" }, { "type": "integer", "description": "Hours", "name": "hours", "in": "query" }, { "type": "integer", "description": "Bucket minutes", "name": "bucket_minutes", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/agent/apply-logs": { "post": { "security": [ { "AgentTokenAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Agent" ], "summary": "Report agent apply result", "parameters": [ { "description": "Apply log payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.ApplyLogPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/agent/config-versions/active": { "get": { "security": [ { "AgentTokenAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Agent" ], "summary": "Get active config for agent", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/agent/nodes/heartbeat": { "post": { "security": [ { "AgentTokenAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Agent" ], "summary": "Report agent heartbeat", "parameters": [ { "description": "Agent heartbeat payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.AgentNodePayload" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/agent/nodes/register": { "post": { "security": [ { "AgentTokenAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Agent" ], "summary": "Register or discover agent node", "parameters": [ { "description": "Agent node payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.AgentNodePayload" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/apply-logs/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ApplyLogs" ], "summary": "List apply logs", "parameters": [ { "type": "string", "description": "Node ID", "name": "node_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/apply-logs/cleanup": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ApplyLogs" ], "summary": "Cleanup apply logs", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "List config versions", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/active": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Get active config version", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/diff": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Diff current draft against active version", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/preview": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Preview config rendering", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/publish": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Publish a new config version", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Get config version detail", "parameters": [ { "type": "integer", "description": "Version ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/config-versions/{id}/activate": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ConfigVersions" ], "summary": "Activate an existing config version", "parameters": [ { "type": "integer", "description": "Version ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/dashboard/overview": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Dashboard" ], "summary": "Get dashboard overview", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/managed-domains/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ManagedDomains" ], "summary": "List managed domains", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ManagedDomains" ], "summary": "Create managed domain", "parameters": [ { "description": "Managed domain payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.ManagedDomainInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/managed-domains/match": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ManagedDomains" ], "summary": "Match certificate for domain", "parameters": [ { "type": "string", "description": "Domain", "name": "domain", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/managed-domains/{id}/delete": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ManagedDomains" ], "summary": "Delete managed domain", "parameters": [ { "type": "integer", "description": "Managed domain ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/managed-domains/{id}/update": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ManagedDomains" ], "summary": "Update managed domain", "parameters": [ { "type": "integer", "description": "Managed domain ID", "name": "id", "in": "path", "required": true }, { "description": "Managed domain payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.ManagedDomainInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "List nodes", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Create node", "parameters": [ { "description": "Node payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.NodeInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/bootstrap-token": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Get global discovery token", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/bootstrap-token/rotate": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Rotate global discovery token", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/agent-release": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Check latest agent release for node", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "stable or preview", "name": "channel", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/agent-update": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Request agent self-update on node", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/delete": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Delete node", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/observability": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Get node observability details", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "Lookback window in hours", "name": "hours", "in": "query" }, { "type": "integer", "description": "Max records per section", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/observability/cleanup": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Cleanup node health events", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/openresty-restart": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Request openresty restart on node", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/nodes/{id}/update": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Nodes" ], "summary": "Update node", "parameters": [ { "type": "integer", "description": "Node ID", "name": "id", "in": "path", "required": true }, { "description": "Node payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.NodeInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/option/": { "get": { "produces": [ "application/json" ], "tags": [ "Options" ], "summary": "List editable options", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/option/geoip/lookup": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Options" ], "summary": "Test GeoIP lookup", "parameters": [ { "description": "GeoIP lookup payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.geoIPLookupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/option/update": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Options" ], "summary": "Update option", "parameters": [ { "description": "Option payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.Option" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/proxy-routes/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ProxyRoutes" ], "summary": "List proxy routes", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ProxyRoutes" ], "summary": "Create proxy route", "parameters": [ { "description": "Proxy route payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.ProxyRouteInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/proxy-routes/{id}/delete": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "ProxyRoutes" ], "summary": "Delete proxy route", "parameters": [ { "type": "integer", "description": "Route ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/proxy-routes/{id}/update": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ProxyRoutes" ], "summary": "Update proxy route", "parameters": [ { "type": "integer", "description": "Route ID", "name": "id", "in": "path", "required": true }, { "description": "Proxy route payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.ProxyRouteInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/status": { "get": { "produces": [ "application/json" ], "tags": [ "Public" ], "summary": "Get server status", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "List TLS certificates", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Create TLS certificate from PEM", "parameters": [ { "description": "TLS certificate payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.TLSCertificateInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/import-file": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Import TLS certificate from files", "parameters": [ { "type": "string", "description": "Certificate name", "name": "name", "in": "formData", "required": true }, { "type": "string", "description": "Remark", "name": "remark", "in": "formData" }, { "type": "file", "description": "Certificate file", "name": "cert_file", "in": "formData", "required": true }, { "type": "file", "description": "Private key file", "name": "key_file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Get TLS certificate detail", "parameters": [ { "type": "integer", "description": "Certificate ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/{id}/content": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Get TLS certificate PEM content", "parameters": [ { "type": "integer", "description": "Certificate ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/{id}/delete": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Delete TLS certificate", "parameters": [ { "type": "integer", "description": "Certificate ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/tls-certificates/{id}/update": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "TLSCertificates" ], "summary": "Update TLS certificate from PEM", "parameters": [ { "type": "integer", "description": "Certificate ID", "name": "id", "in": "path", "required": true }, { "description": "TLS certificate payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/service.TLSCertificateInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/update/latest-release": { "get": { "produces": [ "application/json" ], "tags": [ "Update" ], "summary": "Get latest GitHub release", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/update/logs/ws": { "get": { "tags": [ "Update" ], "summary": "Stream server upgrade logs over websocket", "responses": {} } }, "/api/update/manual-upgrade": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Update" ], "summary": "Confirm upgrade with previously uploaded server binary", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/update/manual-upload": { "post": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Update" ], "summary": "Upload server binary and inspect version before upgrade", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/update/upgrade": { "post": { "produces": [ "application/json" ], "tags": [ "Update" ], "summary": "Upgrade server binary from latest GitHub release", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } } }, "definitions": { "controller.geoIPLookupRequest": { "type": "object", "properties": { "ip": { "type": "string" }, "provider": { "type": "string" } } }, "model.Option": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "service.AgentBufferedObservabilityRecord": { "type": "object", "properties": { "access_logs": { "type": "array", "items": { "$ref": "#/definitions/service.AgentNodeAccessLog" } }, "snapshot": { "$ref": "#/definitions/service.AgentNodeMetricSnapshot" }, "traffic_report": { "$ref": "#/definitions/service.AgentNodeTrafficReport" }, "window_started_at_unix": { "type": "integer" } } }, "service.AgentNodeAccessLog": { "type": "object", "properties": { "host": { "type": "string" }, "logged_at_unix": { "type": "integer" }, "path": { "type": "string" }, "remote_addr": { "type": "string" }, "status_code": { "type": "integer" } } }, "service.AgentNodeHealthEvent": { "type": "object", "properties": { "event_type": { "type": "string" }, "message": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "severity": { "type": "string" }, "triggered_at_unix": { "type": "integer" } } }, "service.AgentNodeMetricSnapshot": { "type": "object", "properties": { "captured_at_unix": { "type": "integer" }, "cpu_usage_percent": { "type": "number" }, "disk_read_bytes": { "type": "integer" }, "disk_write_bytes": { "type": "integer" }, "memory_total_bytes": { "type": "integer" }, "memory_used_bytes": { "type": "integer" }, "network_rx_bytes": { "type": "integer" }, "network_tx_bytes": { "type": "integer" }, "openresty_connections": { "type": "integer" }, "openresty_rx_bytes": { "type": "integer" }, "openresty_tx_bytes": { "type": "integer" }, "storage_total_bytes": { "type": "integer" }, "storage_used_bytes": { "type": "integer" } } }, "service.AgentNodePayload": { "type": "object", "properties": { "access_logs": { "type": "array", "items": { "$ref": "#/definitions/service.AgentNodeAccessLog" } }, "agent_version": { "type": "string" }, "buffered_observability": { "type": "array", "items": { "$ref": "#/definitions/service.AgentBufferedObservabilityRecord" } }, "current_version": { "type": "string" }, "health_events": { "type": "array", "items": { "$ref": "#/definitions/service.AgentNodeHealthEvent" } }, "ip": { "type": "string" }, "last_error": { "type": "string" }, "name": { "type": "string" }, "nginx_version": { "type": "string" }, "node_id": { "type": "string" }, "openresty_message": { "type": "string" }, "openresty_status": { "type": "string" }, "profile": { "$ref": "#/definitions/service.AgentNodeSystemProfile" }, "snapshot": { "$ref": "#/definitions/service.AgentNodeMetricSnapshot" }, "traffic_report": { "$ref": "#/definitions/service.AgentNodeTrafficReport" } } }, "service.AgentNodeSystemProfile": { "type": "object", "properties": { "architecture": { "type": "string" }, "cpu_cores": { "type": "integer" }, "cpu_model": { "type": "string" }, "hostname": { "type": "string" }, "kernel_version": { "type": "string" }, "os_name": { "type": "string" }, "os_version": { "type": "string" }, "reported_at_unix": { "type": "integer" }, "total_disk_bytes": { "type": "integer" }, "total_memory_bytes": { "type": "integer" }, "uptime_seconds": { "type": "integer" } } }, "service.AgentNodeTrafficReport": { "type": "object", "properties": { "error_count": { "type": "integer" }, "request_count": { "type": "integer" }, "source_countries": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "status_codes": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "top_domains": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "unique_visitor_count": { "type": "integer" }, "window_ended_at_unix": { "type": "integer" }, "window_started_at_unix": { "type": "integer" } } }, "service.ApplyLogPayload": { "type": "object", "properties": { "checksum": { "type": "string" }, "main_config_checksum": { "type": "string" }, "message": { "type": "string" }, "node_id": { "type": "string" }, "result": { "type": "string" }, "route_config_checksum": { "type": "string" }, "support_file_count": { "type": "integer" }, "version": { "type": "string" } } }, "service.ManagedDomainInput": { "type": "object", "properties": { "cert_id": { "type": "integer" }, "domain": { "type": "string" }, "enabled": { "type": "boolean" }, "remark": { "type": "string" } } }, "service.NodeInput": { "type": "object", "properties": { "auto_update_enabled": { "type": "boolean" }, "geo_latitude": { "type": "number" }, "geo_longitude": { "type": "number" }, "geo_manual_override": { "type": "boolean" }, "geo_name": { "type": "string" }, "ip": { "type": "string" }, "name": { "type": "string" } } }, "service.ProxyRouteCustomHeaderInput": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "service.ProxyRouteInput": { "type": "object", "properties": { "cache_enabled": { "type": "boolean" }, "cache_policy": { "type": "string" }, "cache_rules": { "type": "array", "items": { "type": "string" } }, "cert_id": { "type": "integer" }, "custom_headers": { "type": "array", "items": { "$ref": "#/definitions/service.ProxyRouteCustomHeaderInput" } }, "domain": { "type": "string" }, "enable_https": { "type": "boolean" }, "enabled": { "type": "boolean" }, "origin_host": { "type": "string" }, "origin_url": { "type": "string" }, "redirect_http": { "type": "boolean" }, "remark": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "service.TLSCertificateInput": { "type": "object", "properties": { "cert_pem": { "type": "string" }, "key_pem": { "type": "string" }, "name": { "type": "string" }, "remark": { "type": "string" } } } }, "securityDefinitions": { "AgentTokenAuth": { "description": "Agent API 使用节点专属 Agent Token 或全局 Discovery Token", "type": "apiKey", "name": "X-Agent-Token", "in": "header" }, "BearerAuth": { "description": "管理端可使用 Bearer Token,例如:Bearer \u003ctoken\u003e", "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "3.0", Host: "", BasePath: "/", Schemes: []string{"http", "https"}, Title: "OpenFlare Server API", Description: "OpenFlare Server 管理端与 Agent API 文档。", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }