grpc server added
This commit is contained in:
parent
5e1017df69
commit
6867d2d74e
9 changed files with 294 additions and 28 deletions
|
|
@ -3,9 +3,10 @@ package config
|
|||
import "strings"
|
||||
|
||||
type Config struct {
|
||||
AppConf AppConfig
|
||||
DBConf DatabaseConfig
|
||||
JWTConf JWTConfig
|
||||
AppConf AppConfig
|
||||
DBConf DatabaseConfig
|
||||
JWTConf JWTConfig
|
||||
GrpcConf GrpcConfig
|
||||
}
|
||||
|
||||
type AppConfig struct {
|
||||
|
|
@ -34,6 +35,11 @@ type JWTConfig struct {
|
|||
RefreshExpire string
|
||||
}
|
||||
|
||||
type GrpcConfig struct {
|
||||
GrpcServerPort string
|
||||
GrpcClientPort string
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
return &Config{
|
||||
AppConf: AppConfig{
|
||||
|
|
@ -61,5 +67,10 @@ func NewConfig() *Config {
|
|||
AccessExpire: getEnv("JWT_ACCESS_EXPIRE", ""),
|
||||
RefreshExpire: getEnv("JWT_REFRESH_EXPIRE", ""),
|
||||
},
|
||||
|
||||
GrpcConf: GrpcConfig{
|
||||
GrpcServerPort: getEnv("GRPC_SERVER_PORT", ""),
|
||||
GrpcClientPort: getEnv("GRPC_CLIENT_PORT", ""),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue