Files
PandaX/base/config/jwt.go
feilong.teng@rheinchina.com cd824b7f0c 集成完成
2021-12-12 19:49:39 +08:00

16 lines
341 B
Go

package config
import (
"pandax/base/biz"
)
type Jwt struct {
Key string `yaml:"key"`
ExpireTime int64 `yaml:"expire-time"` // 过期时间,单位分钟
}
func (j *Jwt) Valid() {
biz.IsTrue(j.Key != "", "config.yml之 [jwt.key] 不能为空")
biz.IsTrue(j.ExpireTime != 0, "config.yml之 [jwt.expire-time] 不能为空")
}