zitadel/internal/api/grpc/config.go
2020-03-27 13:57:16 +01:00

32 lines
521 B
Go

package grpc
type Config struct {
ServerPort string
GatewayPort string
CustomHeaders []string
}
func (c Config) ToServerConfig() ServerConfig {
return ServerConfig{
Port: c.ServerPort,
}
}
func (c Config) ToGatewayConfig() GatewayConfig {
return GatewayConfig{
Port: c.GatewayPort,
GRPCEndpoint: c.ServerPort,
CustomHeaders: c.CustomHeaders,
}
}
type ServerConfig struct {
Port string
}
type GatewayConfig struct {
Port string
GRPCEndpoint string
CustomHeaders []string
}