整理配置文件,jwt过期时间和缓冲时间支持1d2h3m4s事件类型 (#1218)

* feat: human duration

* Update config.yaml

* 调整配置文件结构

Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
奇淼(piexlmax
2022-09-13 16:26:02 +08:00
committed by GitHub
parent ee7b9b0cff
commit b5c79be625
10 changed files with 143 additions and 94 deletions

View File

@@ -7,14 +7,12 @@ import (
"github.com/gin-gonic/gin"
"os"
"path/filepath"
"time"
"github.com/songzhibin97/gkit/cache/local_cache"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
"github.com/flipped-aurora/gin-vue-admin/server/global"
_ "github.com/flipped-aurora/gin-vue-admin/server/packfile"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
)
// Viper //
@@ -72,8 +70,5 @@ func Viper(path ...string) *viper.Viper {
// root 适配性 根据root位置去找到对应迁移位置,保证root路径有效
global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..")
global.BlackCache = local_cache.NewCache(
local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)),
)
return v
}