{ "swagger": "2.0", "info": { "description": "Wails AssetServer API 文档", "title": "Wails AssetServer API", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "Shikong", "email": "919411476@qq.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "basePath": "/s", "paths": { "/config/": { "post": { "description": "获取应用列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "获取应用列表", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/config.Config" } } } ] } }, "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } } }, "/error": { "get": { "description": "错误信息示例", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Error" ], "summary": "错误处理", "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } }, "put": { "description": "错误信息示例", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Error" ], "summary": "错误处理", "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } }, "post": { "description": "错误信息示例", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Error" ], "summary": "错误处理", "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } }, "delete": { "description": "错误信息示例", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Error" ], "summary": "错误处理", "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } }, "patch": { "description": "错误信息示例", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Error" ], "summary": "错误处理", "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } } }, "/file/": { "get": { "description": "获取文件", "consumes": [ "application/json" ], "produces": [ "application/octet-stream" ], "tags": [ "File" ], "summary": "获取文件", "parameters": [ { "type": "integer", "description": "区块大小", "name": "chunkSize", "in": "query" }, { "type": "integer", "description": "偏移量", "name": "offset", "in": "query" }, { "type": "string", "example": "C:\\Windows\\System32\\cmd.exe", "description": "路径", "name": "path", "in": "query", "required": true } ], "responses": {} } }, "/file/path": { "get": { "description": "获取文件路径", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "File" ], "summary": "获取文件路径", "parameters": [ { "type": "string", "example": "C:\\Windows\\System32\\cmd.exe", "description": "路径", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } } }, "/wol/wakeup": { "post": { "description": "wol 唤醒", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Wol" ], "summary": "wol 唤醒", "parameters": [ { "description": "局域网唤醒", "name": "vo", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controller.WakeupDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "default": { "description": "", "schema": { "$ref": "#/definitions/errorx.CodeErrorResponse" } } } } } }, "definitions": { "config.Config": { "type": "object", "properties": { "debug": { "$ref": "#/definitions/config.DebuggerConfig" }, "server": { "$ref": "#/definitions/config.ServerConfig" } } }, "config.DebuggerConfig": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "config.ServerConfig": { "type": "object", "properties": { "host": { "type": "string" }, "port": { "type": "integer" } } }, "controller.WakeupDTO": { "type": "object", "properties": { "mac": { "description": "mac 地址", "type": "string", "example": "FF-FF-FF-FF-FF-FF-FF" }, "port": { "description": "端口", "type": "integer", "example": 9 } } }, "errorx.CodeErrorResponse": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "data": {}, "msg": { "type": "string", "example": "OK" } } }, "response.Response": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "data": {}, "msg": { "type": "string", "example": "OK" } } } } }