mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
add basic config and change i18n pkg
This commit is contained in:
34
internal/api/grpc/config.go
Normal file
34
internal/api/grpc/config.go
Normal file
@@ -0,0 +1,34 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user