fix: start grpc gateway/server

This commit is contained in:
Fabiennne 2020-03-30 18:08:54 +02:00
parent 108876348f
commit 9900e53afa
7 changed files with 16 additions and 9 deletions

1
google-credentials/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
key.json

View File

@ -2,10 +2,10 @@ package admin
import ( import (
"context" "context"
"github.com/caos/logging"
app "github.com/caos/zitadel/internal/admin" app "github.com/caos/zitadel/internal/admin"
"github.com/caos/zitadel/internal/api/auth" "github.com/caos/zitadel/internal/api/auth"
"github.com/caos/zitadel/internal/errors"
"github.com/caos/zitadel/pkg/admin/api" "github.com/caos/zitadel/pkg/admin/api"
) )
@ -15,5 +15,7 @@ type Config struct {
} }
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 err := api.Start(ctx, config.API)
logging.Log("MAIN-lfo5h").OnError(err).Panic("unable to start api")
return err
} }

View File

@ -16,7 +16,7 @@ type Config struct {
GRPC grpc_util.Config GRPC grpc_util.Config
} }
func Start(ctx context.Context, conf *Config) error { func Start(ctx context.Context, conf Config) error {
api := &API{ api := &API{
grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()), grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()),
gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()), gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()),

View File

@ -2,10 +2,10 @@ package auth
import ( import (
"context" "context"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/api/auth" "github.com/caos/zitadel/internal/api/auth"
app "github.com/caos/zitadel/internal/auth" app "github.com/caos/zitadel/internal/auth"
"github.com/caos/zitadel/internal/errors"
"github.com/caos/zitadel/pkg/auth/api" "github.com/caos/zitadel/pkg/auth/api"
) )
@ -15,5 +15,7 @@ type Config struct {
} }
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 err := api.Start(ctx, config.API)
logging.Log("MAIN-udjed").OnError(err).Panic("unable to start api")
return err
} }

View File

@ -17,7 +17,7 @@ type Config struct {
GRPC grpc_util.Config GRPC grpc_util.Config
} }
func Start(ctx context.Context, conf *Config) error { func Start(ctx context.Context, conf Config) error {
api := &API{ api := &API{
grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()), grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()),
gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()), gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()),

View File

@ -2,9 +2,9 @@ package management
import ( import (
"context" "context"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/api/auth" "github.com/caos/zitadel/internal/api/auth"
"github.com/caos/zitadel/internal/errors"
app "github.com/caos/zitadel/internal/management" app "github.com/caos/zitadel/internal/management"
"github.com/caos/zitadel/pkg/management/api" "github.com/caos/zitadel/pkg/management/api"
) )
@ -15,5 +15,7 @@ type Config struct {
} }
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 err := api.Start(ctx, config.API)
logging.Log("MAIN-6dhRs").OnError(err).Panic("unable to start api")
return err
} }