mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
* Initial plan * feat: 添加操作日志记录功能和前端日志查看页面 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: 修复 HttpLog 中 IP 字符串处理的类型安全问题 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: lint * feat: 完善面板内日志记录,添加网站/数据库/项目/计划任务/备份CRUD日志 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * feat: 完善更多模块的日志记录(证书/SSH/Webhook/用户/设置/安全) Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: 改进cert_dns删除方法,在删除前获取实体信息用于日志记录 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: lint * feat: 从session获取操作员ID并在前端显示用户名 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: lint --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> Co-authored-by: 耗子 <haozi@loli.email>
99 lines
4.1 KiB
Go
99 lines
4.1 KiB
Go
// Code generated by Wire. DO NOT EDIT.
|
|
|
|
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
|
|
//go:build !wireinject
|
|
// +build !wireinject
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/acepanel/panel/internal/app"
|
|
"github.com/acepanel/panel/internal/apps/codeserver"
|
|
"github.com/acepanel/panel/internal/apps/docker"
|
|
"github.com/acepanel/panel/internal/apps/fail2ban"
|
|
"github.com/acepanel/panel/internal/apps/frp"
|
|
"github.com/acepanel/panel/internal/apps/gitea"
|
|
"github.com/acepanel/panel/internal/apps/mariadb"
|
|
"github.com/acepanel/panel/internal/apps/memcached"
|
|
"github.com/acepanel/panel/internal/apps/minio"
|
|
"github.com/acepanel/panel/internal/apps/mysql"
|
|
"github.com/acepanel/panel/internal/apps/nginx"
|
|
"github.com/acepanel/panel/internal/apps/openresty"
|
|
"github.com/acepanel/panel/internal/apps/percona"
|
|
"github.com/acepanel/panel/internal/apps/phpmyadmin"
|
|
"github.com/acepanel/panel/internal/apps/podman"
|
|
"github.com/acepanel/panel/internal/apps/postgresql"
|
|
"github.com/acepanel/panel/internal/apps/pureftpd"
|
|
"github.com/acepanel/panel/internal/apps/redis"
|
|
"github.com/acepanel/panel/internal/apps/rsync"
|
|
"github.com/acepanel/panel/internal/apps/s3fs"
|
|
"github.com/acepanel/panel/internal/apps/supervisor"
|
|
"github.com/acepanel/panel/internal/bootstrap"
|
|
"github.com/acepanel/panel/internal/data"
|
|
"github.com/acepanel/panel/internal/route"
|
|
"github.com/acepanel/panel/internal/service"
|
|
)
|
|
|
|
import (
|
|
_ "time/tzdata"
|
|
)
|
|
|
|
// Injectors from wire.go:
|
|
|
|
// initCli init command line.
|
|
func initCli() (*app.Cli, error) {
|
|
config, err := bootstrap.NewConf()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
locale, err := bootstrap.NewT(config)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
db, err := bootstrap.NewDB(config)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
logger := bootstrap.NewLog(config)
|
|
cacheRepo := data.NewCacheRepo(db)
|
|
queue := bootstrap.NewQueue()
|
|
taskRepo := data.NewTaskRepo(locale, db, logger, queue)
|
|
appRepo := data.NewAppRepo(locale, config, db, logger, cacheRepo, taskRepo)
|
|
userRepo := data.NewUserRepo(locale, db, logger)
|
|
settingRepo := data.NewSettingRepo(locale, db, logger, config, taskRepo)
|
|
databaseServerRepo := data.NewDatabaseServerRepo(locale, db, logger)
|
|
databaseUserRepo := data.NewDatabaseUserRepo(locale, db, logger, databaseServerRepo)
|
|
databaseRepo := data.NewDatabaseRepo(locale, db, logger, databaseServerRepo, databaseUserRepo)
|
|
certRepo := data.NewCertRepo(locale, db, logger)
|
|
certAccountRepo := data.NewCertAccountRepo(locale, db, userRepo, logger)
|
|
websiteRepo := data.NewWebsiteRepo(locale, db, logger, cacheRepo, databaseRepo, databaseServerRepo, databaseUserRepo, certRepo, certAccountRepo, settingRepo)
|
|
backupRepo := data.NewBackupRepo(locale, config, db, logger, settingRepo, websiteRepo)
|
|
cliService := service.NewCliService(locale, config, db, appRepo, cacheRepo, userRepo, settingRepo, backupRepo, websiteRepo, databaseServerRepo, certRepo, certAccountRepo)
|
|
cli := route.NewCli(locale, cliService)
|
|
command := bootstrap.NewCli(locale, cli)
|
|
gormigrate := bootstrap.NewMigrate(db)
|
|
codeserverApp := codeserver.NewApp()
|
|
dockerApp := docker.NewApp()
|
|
fail2banApp := fail2ban.NewApp(locale, websiteRepo)
|
|
frpApp := frp.NewApp()
|
|
giteaApp := gitea.NewApp()
|
|
mariadbApp := mariadb.NewApp(locale, settingRepo)
|
|
memcachedApp := memcached.NewApp(locale)
|
|
minioApp := minio.NewApp()
|
|
mysqlApp := mysql.NewApp(locale, settingRepo)
|
|
nginxApp := nginx.NewApp(locale)
|
|
openrestyApp := openresty.NewApp(locale)
|
|
perconaApp := percona.NewApp(locale, settingRepo)
|
|
phpmyadminApp := phpmyadmin.NewApp(locale)
|
|
podmanApp := podman.NewApp()
|
|
postgresqlApp := postgresql.NewApp(locale)
|
|
pureftpdApp := pureftpd.NewApp(locale)
|
|
redisApp := redis.NewApp(locale)
|
|
rsyncApp := rsync.NewApp(locale)
|
|
s3fsApp := s3fs.NewApp(locale)
|
|
supervisorApp := supervisor.NewApp(locale)
|
|
loader := bootstrap.NewLoader(codeserverApp, dockerApp, fail2banApp, frpApp, giteaApp, mariadbApp, memcachedApp, minioApp, mysqlApp, nginxApp, openrestyApp, perconaApp, phpmyadminApp, podmanApp, postgresqlApp, pureftpdApp, redisApp, rsyncApp, s3fsApp, supervisorApp)
|
|
appCli := app.NewCli(command, gormigrate, loader)
|
|
return appCli, nil
|
|
}
|