erp_server/tools/config/jwt.go

20 lines
261 B
Go
Raw Normal View History

2023-09-16 03:11:36 +00:00
package config
import (
"github.com/spf13/viper"
)
type Jwt struct {
Secret string
Timeout int64
}
func InitJwt(cfg *viper.Viper) *Jwt {
return &Jwt{
Secret: cfg.GetString("secret"),
Timeout: cfg.GetInt64("timeout"),
}
}
var JwtConfig = new(Jwt)