mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
78199a49ed
* feat: Add usage scope for backup accounts * fix: 解决计划任务列表不显示备份账号的问题 * feat: 统一备份文件大小获取接口
37 lines
1.4 KiB
Go
37 lines
1.4 KiB
Go
package router
|
|
|
|
import (
|
|
v2 "github.com/1Panel-dev/1Panel/agent/app/api/v2"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type BackupRouter struct{}
|
|
|
|
func (s *BackupRouter) InitRouter(Router *gin.RouterGroup) {
|
|
backupRouter := Router.Group("backups")
|
|
baseApi := v2.ApiGroupApp.BaseApi
|
|
{
|
|
backupRouter.GET("/check/:id", baseApi.CheckBackupUsed)
|
|
backupRouter.POST("/sync", baseApi.SyncBackupAccount)
|
|
backupRouter.GET("/options", baseApi.LoadBackupOptions)
|
|
backupRouter.POST("/search", baseApi.SearchBackup)
|
|
|
|
backupRouter.GET("/local", baseApi.GetLocalDir)
|
|
backupRouter.POST("/refresh/token", baseApi.RefreshToken)
|
|
backupRouter.POST("/buckets", baseApi.ListBuckets)
|
|
backupRouter.POST("", baseApi.CreateBackup)
|
|
backupRouter.POST("/del", baseApi.DeleteBackup)
|
|
backupRouter.POST("/update", baseApi.UpdateBackup)
|
|
|
|
backupRouter.POST("/backup", baseApi.Backup)
|
|
backupRouter.POST("/recover", baseApi.Recover)
|
|
backupRouter.POST("/recover/byupload", baseApi.RecoverByUpload)
|
|
backupRouter.POST("/search/files", baseApi.LoadFilesFromBackup)
|
|
backupRouter.POST("/record/search", baseApi.SearchBackupRecords)
|
|
backupRouter.POST("/record/size", baseApi.LoadBackupRecordSize)
|
|
backupRouter.POST("/record/search/bycronjob", baseApi.SearchBackupRecordsByCronjob)
|
|
backupRouter.POST("/record/download", baseApi.DownloadRecord)
|
|
backupRouter.POST("/record/del", baseApi.DeleteBackupRecord)
|
|
}
|
|
}
|