remove pointers on configs

This commit is contained in:
Livio Amstutz 2020-03-27 13:57:16 +01:00
parent f280da5a76
commit f5af4461ad
8 changed files with 20 additions and 20 deletions

View File

@ -16,15 +16,15 @@ import (
) )
type Config struct { type Config struct {
Mgmt *management.Config Mgmt management.Config
Auth *auth.Config Auth auth.Config
Login *login.Config Login login.Config
Admin *admin.Config Admin admin.Config
Console *console.Config Console console.Config
//Log //TODO: add //Log //TODO: add
//Tracing tracing.TracingConfig //TODO: add //Tracing tracing.TracingConfig //TODO: add
AuthZ *authz.Config AuthZ authz.Config
} }
func main() { func main() {

View File

@ -6,14 +6,14 @@ type Config struct {
CustomHeaders []string CustomHeaders []string
} }
func (c *Config) ToServerConfig() *ServerConfig { func (c Config) ToServerConfig() ServerConfig {
return &ServerConfig{ return ServerConfig{
Port: c.ServerPort, Port: c.ServerPort,
} }
} }
func (c *Config) ToGatewayConfig() *GatewayConfig { func (c Config) ToGatewayConfig() GatewayConfig {
return &GatewayConfig{ return GatewayConfig{
Port: c.GatewayPort, Port: c.GatewayPort,
GRPCEndpoint: c.ServerPort, GRPCEndpoint: c.ServerPort,
CustomHeaders: c.CustomHeaders, CustomHeaders: c.CustomHeaders,

View File

@ -14,6 +14,6 @@ type Config struct {
API *api.Config API *api.Config
} }
func Start(ctx context.Context, config *Config, authZ *auth.Config) error { func Start(ctx context.Context, config Config, authZ auth.Config) error {
return errors.ThrowUnimplemented(nil, "ADMIN-n8vw5", "not implemented yet") //TODO: implement return errors.ThrowUnimplemented(nil, "ADMIN-n8vw5", "not implemented yet") //TODO: implement
} }

View File

@ -14,6 +14,6 @@ type Config struct {
API *api.Config API *api.Config
} }
func Start(ctx context.Context, config *Config, authZ *auth.Config) error { func Start(ctx context.Context, config Config, authZ auth.Config) error {
return errors.ThrowUnimplemented(nil, "AUTH-l7Hdx", "not implemented yet") //TODO: implement return errors.ThrowUnimplemented(nil, "AUTH-l7Hdx", "not implemented yet") //TODO: implement
} }

View File

@ -11,6 +11,6 @@ type Config struct {
StaticDir string StaticDir string
} }
func Start(ctx context.Context, config *Config) error { func Start(ctx context.Context, config Config) error {
return errors.ThrowUnimplemented(nil, "CONSO-4cT5D", "not implemented yet") //TODO: implement return errors.ThrowUnimplemented(nil, "CONSO-4cT5D", "not implemented yet") //TODO: implement
} }

View File

@ -9,10 +9,10 @@ import (
) )
type Config struct { type Config struct {
App *app.Config App app.Config
API *api.Config API api.Config
} }
func Start(ctx context.Context, config *Config) error { func Start(ctx context.Context, config Config) error {
return errors.ThrowUnimplemented(nil, "LOGIN-3fwvD", "not implemented yet") //TODO: implement return errors.ThrowUnimplemented(nil, "LOGIN-3fwvD", "not implemented yet") //TODO: implement
} }

View File

@ -3,5 +3,5 @@ package api
import "github.com/caos/zitadel/internal/api/grpc" import "github.com/caos/zitadel/internal/api/grpc"
type Config struct { type Config struct {
GRPC *grpc.Config GRPC grpc.Config
} }

View File

@ -10,10 +10,10 @@ import (
) )
type Config struct { type Config struct {
App *app.Config App app.Config
API *api.Config API api.Config
} }
func Start(ctx context.Context, config *Config, authZ *auth.Config) error { func Start(ctx context.Context, config Config, authZ auth.Config) error {
return errors.ThrowUnimplemented(nil, "MANAG-h3k3x", "not implemented yet") //TODO: implement return errors.ThrowUnimplemented(nil, "MANAG-h3k3x", "not implemented yet") //TODO: implement
} }