mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
16 lines
358 B
Go
16 lines
358 B
Go
package config
|
|
|
|
import (
|
|
"github.com/PandaXGO/PandaKit/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] 不能为空")
|
|
}
|