chore: rm useless swagger api docs
This commit is contained in:
@@ -18,19 +18,6 @@ func NewAppLogController() *AppLogController {
|
||||
}
|
||||
|
||||
// GetLogs 获取应用日志列表
|
||||
// @Summary 获取应用日志列表
|
||||
// @Tags 应用日志
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param category query string false "日志分类"
|
||||
// @Param status query string false "状态"
|
||||
// @Param level query string false "级别"
|
||||
// @Param keyword query string false "搜索关键词"
|
||||
// @Param page query int false "页码"
|
||||
// @Param page_size query int false "每页数量"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Router /app-logs [get]
|
||||
func (ac *AppLogController) GetLogs(c *gin.Context) {
|
||||
p := utils.ParsePagination(c)
|
||||
category := c.Query("category")
|
||||
@@ -47,14 +34,6 @@ func (ac *AppLogController) GetLogs(c *gin.Context) {
|
||||
}
|
||||
|
||||
// MarkAsRead 标记已读
|
||||
// @Summary 标记已读
|
||||
// @Tags 应用日志
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param body body object true "请求体"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Router /app-logs/read [post]
|
||||
func (ac *AppLogController) MarkAsRead(c *gin.Context) {
|
||||
var req struct {
|
||||
ID string `json:"id"`
|
||||
@@ -83,14 +62,6 @@ func (ac *AppLogController) MarkAsRead(c *gin.Context) {
|
||||
}
|
||||
|
||||
// ClearLogs 清理日志
|
||||
// @Summary 清理日志
|
||||
// @Tags 应用日志
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param body body object true "请求体"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Router /app-logs/clear [post]
|
||||
func (ac *AppLogController) ClearLogs(c *gin.Context) {
|
||||
var req struct {
|
||||
Category string `json:"category"`
|
||||
|
||||
@@ -18,16 +18,6 @@ func NewEnvController(envService *services.EnvService) *EnvController {
|
||||
}
|
||||
|
||||
// CreateEnvVar 创建环境变量
|
||||
// @Summary 创建环境变量
|
||||
// @Description 创建新的环境变量
|
||||
// @Tags 环境变量
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param body body object true "环境变量信息"
|
||||
// @Success 200 {object} utils.Response{data=vo.EnvVO}
|
||||
// @Failure 400 {object} utils.Response
|
||||
// @Router /env [post]
|
||||
func (ec *EnvController) CreateEnvVar(c *gin.Context) {
|
||||
userID := c.GetString("userID")
|
||||
|
||||
@@ -115,17 +105,6 @@ func (ec *EnvController) GetEnvVar(c *gin.Context) {
|
||||
}
|
||||
|
||||
// UpdateEnvVar 更新环境变量
|
||||
// @Summary 更新环境变量
|
||||
// @Description 根据 ID 更新环境变量信息
|
||||
// @Tags 环境变量
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param id path string true "环境变量ID"
|
||||
// @Param body body object true "更新信息"
|
||||
// @Success 200 {object} utils.Response{data=vo.EnvVO}
|
||||
// @Failure 404 {object} utils.Response
|
||||
// @Router /env/{id} [put]
|
||||
func (ec *EnvController) UpdateEnvVar(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
if id == "" {
|
||||
@@ -166,17 +145,6 @@ func (ec *EnvController) UpdateEnvVar(c *gin.Context) {
|
||||
}
|
||||
|
||||
// DeleteEnvVar 删除环境变量
|
||||
// @Summary 删除环境变量
|
||||
// @Description 根据 ID 删除环境变量,支持强制删除
|
||||
// @Tags 环境变量
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param id path string true "环境变量ID"
|
||||
// @Param force query bool false "是否强制删除"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Failure 409 {object} utils.Response{data=[]vo.TaskVO} "引用冲突"
|
||||
// @Router /env/{id} [delete]
|
||||
func (ec *EnvController) DeleteEnvVar(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
if id == "" {
|
||||
|
||||
@@ -55,16 +55,6 @@ func (ec *ExecutorController) ExecuteTask(c *gin.Context) {
|
||||
}
|
||||
|
||||
// ExecuteCommand 执行命令
|
||||
// @Summary 执行命令
|
||||
// @Description 临时执行单次命令
|
||||
// @Tags 任务执行
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param body body object true "命令内容 (需包含 command 字段)"
|
||||
// @Success 200 {object} utils.Response{data=vo.ExecutionResultVO}
|
||||
// @Failure 400 {object} utils.Response
|
||||
// @Router /execute/command [post]
|
||||
func (ec *ExecutorController) ExecuteCommand(c *gin.Context) {
|
||||
var req struct {
|
||||
Command string `json:"command" binding:"required"`
|
||||
|
||||
@@ -127,16 +127,6 @@ func (lc *LogController) GetLogDetail(c *gin.Context) {
|
||||
}
|
||||
|
||||
// ClearLogs 清空日志
|
||||
// @Summary 清空日志
|
||||
// @Description 清空所有日志或指定任务的日志
|
||||
// @Tags 日志
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param body body object false "清空范围信息"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Failure 500 {object} utils.Response
|
||||
// @Router /logs/clear [post]
|
||||
func (lc *LogController) ClearLogs(c *gin.Context) {
|
||||
var req struct {
|
||||
TaskID *string `json:"task_id"`
|
||||
@@ -163,16 +153,6 @@ func (lc *LogController) ClearLogs(c *gin.Context) {
|
||||
}
|
||||
|
||||
// DeleteLog 删除日志
|
||||
// @Summary 删除日志
|
||||
// @Description 根据 ID 删除单条任务日志
|
||||
// @Tags 日志
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param id path string true "日志ID"
|
||||
// @Success 200 {object} utils.Response
|
||||
// @Failure 500 {object} utils.Response
|
||||
// @Router /logs/{id} [delete]
|
||||
func (lc *LogController) DeleteLog(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
if id == "" {
|
||||
|
||||
@@ -24,147 +24,6 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/app-logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "获取应用日志列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "日志分类",
|
||||
"name": "category",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "状态",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "级别",
|
||||
"name": "level",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "搜索关键词",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页码",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页数量",
|
||||
"name": "page_size",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/app-logs/clear": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "清理日志",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/app-logs/read": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "标记已读",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -238,61 +97,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "创建新的环境变量",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "创建环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "环境变量信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.EnvVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env/all": {
|
||||
@@ -391,130 +195,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 更新环境变量信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "更新环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "环境变量ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "更新信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.EnvVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 删除环境变量,支持强制删除",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "删除环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "环境变量ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "是否强制删除",
|
||||
"name": "force",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "引用冲突",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/vo.TaskVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env/{id}/tasks": {
|
||||
@@ -569,63 +249,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/execute/command": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "临时执行单次命令",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"任务执行"
|
||||
],
|
||||
"summary": "执行命令",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "命令内容 (需包含 command 字段)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.ExecutionResultVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/execute/results": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -827,50 +450,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logs/clear": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "清空所有日志或指定任务的日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"日志"
|
||||
],
|
||||
"summary": "清空日志",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "清空范围信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logs/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -924,47 +503,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 删除单条任务日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"日志"
|
||||
],
|
||||
"summary": "删除日志",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "日志ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks": {
|
||||
|
||||
@@ -18,147 +18,6 @@
|
||||
"host": "localhost:8052",
|
||||
"basePath": "/open2api/v1",
|
||||
"paths": {
|
||||
"/app-logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "获取应用日志列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "日志分类",
|
||||
"name": "category",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "状态",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "级别",
|
||||
"name": "level",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "搜索关键词",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页码",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "每页数量",
|
||||
"name": "page_size",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/app-logs/clear": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "清理日志",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/app-logs/read": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"应用日志"
|
||||
],
|
||||
"summary": "标记已读",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -232,61 +91,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "创建新的环境变量",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "创建环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "环境变量信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.EnvVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env/all": {
|
||||
@@ -385,130 +189,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 更新环境变量信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "更新环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "环境变量ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "更新信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.EnvVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 删除环境变量,支持强制删除",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"环境变量"
|
||||
],
|
||||
"summary": "删除环境变量",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "环境变量ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "是否强制删除",
|
||||
"name": "force",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "引用冲突",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/vo.TaskVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/env/{id}/tasks": {
|
||||
@@ -563,63 +243,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/execute/command": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "临时执行单次命令",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"任务执行"
|
||||
],
|
||||
"summary": "执行命令",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "命令内容 (需包含 command 字段)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/vo.ExecutionResultVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/execute/results": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -821,50 +444,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logs/clear": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "清空所有日志或指定任务的日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"日志"
|
||||
],
|
||||
"summary": "清空日志",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "清空范围信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logs/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -918,47 +497,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "根据 ID 删除单条任务日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"日志"
|
||||
],
|
||||
"summary": "删除日志",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "日志ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_engigu_baihu-panel_internal_utils.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks": {
|
||||
|
||||
@@ -154,93 +154,6 @@ info:
|
||||
title: Baihu Panel API
|
||||
version: "1.0"
|
||||
paths:
|
||||
/app-logs:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 日志分类
|
||||
in: query
|
||||
name: category
|
||||
type: string
|
||||
- description: 状态
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
- description: 级别
|
||||
in: query
|
||||
name: level
|
||||
type: string
|
||||
- description: 搜索关键词
|
||||
in: query
|
||||
name: keyword
|
||||
type: string
|
||||
- description: 页码
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: 每页数量
|
||||
in: query
|
||||
name: page_size
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 获取应用日志列表
|
||||
tags:
|
||||
- 应用日志
|
||||
/app-logs/clear:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 清理日志
|
||||
tags:
|
||||
- 应用日志
|
||||
/app-logs/read:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 标记已读
|
||||
tags:
|
||||
- 应用日志
|
||||
/env:
|
||||
get:
|
||||
consumes:
|
||||
@@ -283,76 +196,7 @@ paths:
|
||||
summary: 获取环境变量列表
|
||||
tags:
|
||||
- 环境变量
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 创建新的环境变量
|
||||
parameters:
|
||||
- description: 环境变量信息
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/vo.EnvVO'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 创建环境变量
|
||||
tags:
|
||||
- 环境变量
|
||||
/env/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 根据 ID 删除环境变量,支持强制删除
|
||||
parameters:
|
||||
- description: 环境变量ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: 是否强制删除
|
||||
in: query
|
||||
name: force
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
"409":
|
||||
description: 引用冲突
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/vo.TaskVO'
|
||||
type: array
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除环境变量
|
||||
tags:
|
||||
- 环境变量
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -384,43 +228,6 @@ paths:
|
||||
summary: 获取环境变量详情
|
||||
tags:
|
||||
- 环境变量
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 根据 ID 更新环境变量信息
|
||||
parameters:
|
||||
- description: 环境变量ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: 更新信息
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/vo.EnvVO'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 更新环境变量
|
||||
tags:
|
||||
- 环境变量
|
||||
/env/{id}/tasks:
|
||||
get:
|
||||
consumes:
|
||||
@@ -475,39 +282,6 @@ paths:
|
||||
summary: 获取所有环境变量
|
||||
tags:
|
||||
- 环境变量
|
||||
/execute/command:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 临时执行单次命令
|
||||
parameters:
|
||||
- description: 命令内容 (需包含 command 字段)
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/vo.ExecutionResultVO'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 执行命令
|
||||
tags:
|
||||
- 任务执行
|
||||
/execute/results:
|
||||
get:
|
||||
consumes:
|
||||
@@ -625,32 +399,6 @@ paths:
|
||||
tags:
|
||||
- 日志管理
|
||||
/logs/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 根据 ID 删除单条任务日志
|
||||
parameters:
|
||||
- description: 日志ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除日志
|
||||
tags:
|
||||
- 日志
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -682,33 +430,6 @@ paths:
|
||||
summary: 获取日志详情
|
||||
tags:
|
||||
- 日志管理
|
||||
/logs/clear:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 清空所有日志或指定任务的日志
|
||||
parameters:
|
||||
- description: 清空范围信息
|
||||
in: body
|
||||
name: body
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_engigu_baihu-panel_internal_utils.Response'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 清空日志
|
||||
tags:
|
||||
- 日志
|
||||
/tasks:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user