1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 22:18:07 +08:00
1Panel/core/global/global.go
ssongliu 78199a49ed
feat: Add usage scope for backup accounts (#7716)
* feat: Add usage scope for backup accounts

* fix: 解决计划任务列表不显示备份账号的问题

* feat: 统一备份文件大小获取接口
2025-01-14 14:27:51 +08:00

29 lines
573 B
Go

package global
import (
"github.com/1Panel-dev/1Panel/core/configs"
"github.com/1Panel-dev/1Panel/core/init/session/psession"
"github.com/go-playground/validator/v10"
"github.com/nicksnyder/go-i18n/v2/i18n"
"github.com/robfig/cron/v3"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gorm.io/gorm"
)
var (
DB *gorm.DB
TaskDB *gorm.DB
LOG *logrus.Logger
CONF configs.ServerConfig
VALID *validator.Validate
SESSION *psession.PSession
Viper *viper.Viper
I18n *i18n.Localizer
Cron *cron.Cron
)
type DBOption func(*gorm.DB) *gorm.DB