diff --git a/.gitignore b/.gitignore index 192669f97e..2a82aba2e2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ debug # IDE .idea -.vscode \ No newline at end of file +.vscode diff --git a/google-credentials/.gitignore b/google-credentials/.gitignore new file mode 100644 index 0000000000..3f62406e6a --- /dev/null +++ b/google-credentials/.gitignore @@ -0,0 +1 @@ +key.json diff --git a/pkg/admin/admin.go b/pkg/admin/admin.go index 0a18a4b145..8d2d89d75f 100644 --- a/pkg/admin/admin.go +++ b/pkg/admin/admin.go @@ -2,10 +2,10 @@ package admin import ( "context" + "github.com/caos/logging" app "github.com/caos/zitadel/internal/admin" "github.com/caos/zitadel/internal/api/auth" - "github.com/caos/zitadel/internal/errors" "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 { - 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 } diff --git a/pkg/admin/api/api.go b/pkg/admin/api/api.go index bebc1ce5ab..8b163bff39 100644 --- a/pkg/admin/api/api.go +++ b/pkg/admin/api/api.go @@ -16,7 +16,7 @@ type Config struct { GRPC grpc_util.Config } -func Start(ctx context.Context, conf *Config) error { +func Start(ctx context.Context, conf Config) error { api := &API{ grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()), gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()), diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index f8838f83c0..52929e11a9 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -2,10 +2,10 @@ package auth import ( "context" + "github.com/caos/logging" "github.com/caos/zitadel/internal/api/auth" app "github.com/caos/zitadel/internal/auth" - "github.com/caos/zitadel/internal/errors" "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 { - 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 } diff --git a/pkg/management/api/api.go b/pkg/management/api/api.go index 92b494410a..3a95803f05 100644 --- a/pkg/management/api/api.go +++ b/pkg/management/api/api.go @@ -17,7 +17,7 @@ type Config struct { GRPC grpc_util.Config } -func Start(ctx context.Context, conf *Config) error { +func Start(ctx context.Context, conf Config) error { api := &API{ grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()), gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()), diff --git a/pkg/management/management.go b/pkg/management/management.go index 9f6af48229..4defc40c9d 100644 --- a/pkg/management/management.go +++ b/pkg/management/management.go @@ -2,9 +2,9 @@ package management import ( "context" + "github.com/caos/logging" "github.com/caos/zitadel/internal/api/auth" - "github.com/caos/zitadel/internal/errors" app "github.com/caos/zitadel/internal/management" "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 { - 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 }