init: initial commit

This commit is contained in:
Blizzard
2026-02-06 14:44:06 +08:00
commit 3115b58cb2
133 changed files with 25889 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package global
import (
"sundynix-go/config"
"sundynix-go/utils/timer"
"github.com/bsm/redislock"
"github.com/redis/go-redis/v9"
"github.com/spf13/viper"
"github.com/wechatpay-apiv3/wechatpay-go/core"
"go.uber.org/zap"
"golang.org/x/sync/singleflight"
"gorm.io/gorm"
)
// 全局变量 加载在内存中
var (
Viper *viper.Viper
Logger *zap.Logger
Config *config.Config
DB *gorm.DB
Redis redis.UniversalClient
Locker *redislock.Client // 分布式锁
ConcurrencyControl = &singleflight.Group{}
Timer timer.Timer = timer.NewTimerTask()
WxPayClient *core.Client
)