2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

feat: 数据库同步及fail2ban重构

This commit is contained in:
耗子
2024-11-22 22:46:26 +08:00
parent e1f074f116
commit 214b804062
38 changed files with 287 additions and 230 deletions

View File

@@ -3,6 +3,7 @@ package data
import (
"errors"
"github.com/samber/do/v2"
"gorm.io/gorm"
"github.com/TheTNB/panel/internal/app"
@@ -12,7 +13,7 @@ import (
type cacheRepo struct{}
func NewCacheRepo() biz.CacheRepo {
return &cacheRepo{}
return do.MustInvoke[biz.CacheRepo](injector)
}
func (r *cacheRepo) Get(key biz.CacheKey, defaultValue ...string) (string, error) {