mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-05-03 17:45:20 +08:00
feat: 完善数据库信息保存以及项目、redis相关操作
This commit is contained in:
13
base/config/jwt.go
Normal file
13
base/config/jwt.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package config
|
||||
|
||||
import "mayfly-go/base/utils/assert"
|
||||
|
||||
type Jwt struct {
|
||||
Key string `yaml:"key"`
|
||||
ExpireTime uint64 `yaml:"expire-time"` // 过期时间,单位分钟
|
||||
}
|
||||
|
||||
func (j *Jwt) Valid() {
|
||||
assert.IsTrue(j.Key != "", "config.yml之 [jwt.key] 不能为空")
|
||||
assert.IsTrue(j.ExpireTime != 0, "config.yml之 [jwt.expire-time] 不能为空")
|
||||
}
|
||||
Reference in New Issue
Block a user