YuleiLan cca0845f24 new
2020-07-13 20:33:20 +08:00

20 lines
261 B
Go

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)