Files
PandaX/pkg/config/jwt.go
PandaX-Go 77ac18c21b [优化]
2024-08-25 19:58:05 +08:00

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] 不能为空")
}