1
0
mirror of https://github.com/zitadel/zitadel.git synced 2024-12-14 03:54:21 +00:00
zitadel/internal/api/grpc/config.go

32 lines
521 B
Go
Raw Normal View History

2020-03-25 06:58:58 +00:00
package grpc
type Config struct {
ServerPort string
GatewayPort string
CustomHeaders []string
}
2020-03-27 12:57:16 +00:00
func (c Config) ToServerConfig() ServerConfig {
return ServerConfig{
2020-03-25 09:41:17 +00:00
Port: c.ServerPort,
2020-03-25 06:58:58 +00:00
}
}
2020-03-27 12:57:16 +00:00
func (c Config) ToGatewayConfig() GatewayConfig {
return GatewayConfig{
2020-03-25 06:58:58 +00:00
Port: c.GatewayPort,
GRPCEndpoint: c.ServerPort,
CustomHeaders: c.CustomHeaders,
}
}
type ServerConfig struct {
2020-03-25 09:41:17 +00:00
Port string
2020-03-25 06:58:58 +00:00
}
type GatewayConfig struct {
Port string
GRPCEndpoint string
CustomHeaders []string
}