mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-24 08:41:33 +00:00
32 lines
521 B
Go
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
|
|
}
|