refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,28 @@
package impl
import (
"bsm/full/module/base/passport/internal/config"
"git.apinb.com/bsm-sdk/core/cache/redis"
"git.apinb.com/bsm-sdk/core/with"
cache "github.com/patrickmn/go-cache"
clientv3 "go.etcd.io/etcd/client/v3"
"gorm.io/gorm"
)
var (
RedisService *redis.RedisClient
EtcdService *clientv3.Client
DBService *gorm.DB
MemoryService *cache.Cache
)
func NewImpl() {
// with memory cache
MemoryService = with.Memory(nil)
// with redis cache
RedisService = with.RedisCache(config.Spec.Cache)
// with databases
DBService = with.Databases(config.Spec.Databases, nil)
// with etcd
EtcdService = with.Etcd(config.Spec.Etcd)
}