mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-04-25 21:55:31 +08:00
refactor: 后端包结构重构、去除无用的文件
This commit is contained in:
13
server/pkg/config/jwt.go
Normal file
13
server/pkg/config/jwt.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package config
|
||||
|
||||
import "mayfly-go/pkg/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