20 lines
261 B
Go
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)
|