feat: 增加系统临时文件清理功能 (#2402)

This commit is contained in:
ssongliu
2023-09-28 07:40:17 +00:00
committed by GitHub
parent 2624238354
commit e8564f38ab
17 changed files with 1427 additions and 10 deletions
+94 -2
View File
@@ -1,5 +1,5 @@
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
// Code generated by swaggo/swag. DO NOT EDIT.
package docs
import "github.com/swaggo/swag"
@@ -8565,6 +8565,49 @@ const docTemplate = `{
}
}
},
"/settings/clean": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "清理系统垃圾文件",
"consumes": [
"application/json"
],
"tags": [
"System Setting"
],
"summary": "System clean",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.Clean"
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "Clean system junk files",
"formatZH": "清理系统垃圾文件",
"paramKeys": []
}
}
},
"/settings/expired/handle": {
"post": {
"security": [
@@ -8784,6 +8827,32 @@ const docTemplate = `{
}
}
},
"/settings/scan": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "扫描系统垃圾文件",
"tags": [
"System Setting"
],
"summary": "Scan system",
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "scan System Junk Files",
"formatZH": "扫描系统垃圾文件",
"paramKeys": []
}
}
},
"/settings/search": {
"post": {
"security": [
@@ -12132,6 +12201,20 @@ const docTemplate = `{
}
}
},
"dto.Clean": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"size": {
"type": "integer"
},
"treeType": {
"type": "string"
}
}
},
"dto.CleanLog": {
"type": "object",
"required": [
@@ -14904,6 +14987,15 @@ const docTemplate = `{
"language": {
"type": "string"
},
"lastCleanData": {
"type": "string"
},
"lastCleanSize": {
"type": "string"
},
"lastCleanTime": {
"type": "string"
},
"localTime": {
"type": "string"
},
+92
View File
@@ -8558,6 +8558,49 @@
}
}
},
"/settings/clean": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "清理系统垃圾文件",
"consumes": [
"application/json"
],
"tags": [
"System Setting"
],
"summary": "System clean",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.Clean"
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "Clean system junk files",
"formatZH": "清理系统垃圾文件",
"paramKeys": []
}
}
},
"/settings/expired/handle": {
"post": {
"security": [
@@ -8777,6 +8820,32 @@
}
}
},
"/settings/scan": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "扫描系统垃圾文件",
"tags": [
"System Setting"
],
"summary": "Scan system",
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [],
"formatEN": "scan System Junk Files",
"formatZH": "扫描系统垃圾文件",
"paramKeys": []
}
}
},
"/settings/search": {
"post": {
"security": [
@@ -12125,6 +12194,20 @@
}
}
},
"dto.Clean": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"size": {
"type": "integer"
},
"treeType": {
"type": "string"
}
}
},
"dto.CleanLog": {
"type": "object",
"required": [
@@ -14897,6 +14980,15 @@
"language": {
"type": "string"
},
"lastCleanData": {
"type": "string"
},
"lastCleanSize": {
"type": "string"
},
"lastCleanTime": {
"type": "string"
},
"localTime": {
"type": "string"
},
+60
View File
@@ -170,6 +170,15 @@ definitions:
required:
- value
type: object
dto.Clean:
properties:
name:
type: string
size:
type: integer
treeType:
type: string
type: object
dto.CleanLog:
properties:
logType:
@@ -2038,6 +2047,12 @@ definitions:
type: string
language:
type: string
lastCleanData:
type: string
lastCleanSize:
type: string
lastCleanTime:
type: string
localTime:
type: string
messageType:
@@ -9542,6 +9557,34 @@ paths:
summary: Load local backup dir
tags:
- System Setting
/settings/clean:
post:
consumes:
- application/json
description: 清理系统垃圾文件
parameters:
- description: request
in: body
name: request
required: true
schema:
items:
$ref: '#/definitions/dto.Clean'
type: array
responses:
"200":
description: OK
security:
- ApiKeyAuth: []
summary: System clean
tags:
- System Setting
x-panel-log:
BeforeFuntions: []
bodyKeys: []
formatEN: Clean system junk files
formatZH: 清理系统垃圾文件
paramKeys: []
/settings/expired/handle:
post:
consumes:
@@ -9683,6 +9726,23 @@ paths:
formatEN: update system port => [serverPort]
formatZH: 修改系统端口 => [serverPort]
paramKeys: []
/settings/scan:
post:
description: 扫描系统垃圾文件
responses:
"200":
description: OK
security:
- ApiKeyAuth: []
summary: Scan system
tags:
- System Setting
x-panel-log:
BeforeFuntions: []
bodyKeys: []
formatEN: scan System Junk Files
formatZH: 扫描系统垃圾文件
paramKeys: []
/settings/search:
post:
description: 加载系统配置信息