28 lines
800 B
Go
28 lines
800 B
Go
package config
|
|
|
|
import (
|
|
"github.com/saas-mingyang/mingyang-admin-common/config"
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"time"
|
|
)
|
|
|
|
type Config struct {
|
|
zrpc.RpcServerConf
|
|
DatabaseConf config.DatabaseConf
|
|
JWTConf JWTConfig
|
|
RedisConf config.RedisConf
|
|
RedisRedisConf config.RedisConf
|
|
AppRpc zrpc.RpcClientConf
|
|
IP2Location struct {
|
|
DBPath string `json:",default=./data/IP2LOCATION-LITE-DB.BIN"`
|
|
}
|
|
}
|
|
|
|
type JWTConfig struct {
|
|
AccessTokenSecret string `mapstructure:"access_token_secret"`
|
|
RefreshTokenSecret string `mapstructure:"refresh_token_secret"`
|
|
AccessTokenExpiry time.Duration `mapstructure:"access_token_expiry"`
|
|
RefreshTokenExpiry time.Duration `mapstructure:"refresh_token_expiry"`
|
|
Issuer string `mapstructure:"issuer"`
|
|
}
|