mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
35 lines
607 B
Go
35 lines
607 B
Go
package grpc
|
|
|
|
type Config struct {
|
|
ServerPort string
|
|
GatewayPort string
|
|
SearchLimit int
|
|
CustomHeaders []string
|
|
}
|
|
|
|
func (c *Config) ToServerConfig() *ServerConfig {
|
|
return &ServerConfig{
|
|
Port: c.ServerPort,
|
|
SearchLimit: c.SearchLimit,
|
|
}
|
|
}
|
|
|
|
func (c *Config) ToGatewayConfig() *GatewayConfig {
|
|
return &GatewayConfig{
|
|
Port: c.GatewayPort,
|
|
GRPCEndpoint: c.ServerPort,
|
|
CustomHeaders: c.CustomHeaders,
|
|
}
|
|
}
|
|
|
|
type ServerConfig struct {
|
|
Port string
|
|
SearchLimit int
|
|
}
|
|
|
|
type GatewayConfig struct {
|
|
Port string
|
|
GRPCEndpoint string
|
|
CustomHeaders []string
|
|
}
|