From 108876348f44d7f9dca2db634ace8066115857f7 Mon Sep 17 00:00:00 2001 From: Fabiennne Date: Mon, 30 Mar 2020 17:51:25 +0200 Subject: [PATCH] feat: merge master --- go.mod | 3 ++- go.sum | 1 + pkg/admin/api/config.go | 7 ------- pkg/admin/api/grpc/gateway.go | 2 +- pkg/admin/api/grpc/server.go | 2 +- pkg/auth/api/api.go | 2 +- pkg/auth/api/config.go | 7 ------- pkg/auth/api/grpc/gateway.go | 2 +- pkg/auth/api/grpc/server.go | 2 +- pkg/management/api/config.go | 7 ------- pkg/management/api/grpc/gateway.go | 2 +- pkg/management/api/grpc/server.go | 2 +- 12 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 pkg/admin/api/config.go delete mode 100644 pkg/auth/api/config.go delete mode 100644 pkg/management/api/config.go diff --git a/go.mod b/go.mod index 4f7af60649..6951ede648 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/aws/aws-sdk-go v1.29.16 // indirect github.com/caos/logging v0.0.1 + github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/ghodss/yaml v1.0.0 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.4.3 @@ -34,7 +35,7 @@ require ( golang.org/x/text v0.3.2 golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56 google.golang.org/api v0.20.0 // indirect - google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c // indirect + google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c google.golang.org/grpc v1.28.0 gopkg.in/yaml.v2 v2.2.8 // indirect ) diff --git a/go.sum b/go.sum index f253cef29c..e8bca6a47d 100644 --- a/go.sum +++ b/go.sum @@ -47,6 +47,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= diff --git a/pkg/admin/api/config.go b/pkg/admin/api/config.go deleted file mode 100644 index 8fce0aca62..0000000000 --- a/pkg/admin/api/config.go +++ /dev/null @@ -1,7 +0,0 @@ -package api - -import "github.com/caos/zitadel/internal/api/grpc" - -type Config struct { - GRPC grpc.Config -} diff --git a/pkg/admin/api/grpc/gateway.go b/pkg/admin/api/grpc/gateway.go index bd88fbbe56..0eaa3c6ae8 100644 --- a/pkg/admin/api/grpc/gateway.go +++ b/pkg/admin/api/grpc/gateway.go @@ -13,7 +13,7 @@ type Gateway struct { cutomHeaders []string } -func StartGateway(conf *grpc_util.GatewayConfig) *Gateway { +func StartGateway(conf grpc_util.GatewayConfig) *Gateway { return &Gateway{ grpcEndpoint: conf.GRPCEndpoint, port: conf.Port, diff --git a/pkg/admin/api/grpc/server.go b/pkg/admin/api/grpc/server.go index e463dea1d8..895d75e7f8 100644 --- a/pkg/admin/api/grpc/server.go +++ b/pkg/admin/api/grpc/server.go @@ -20,7 +20,7 @@ type Server struct { searchLimit int } -func StartServer(conf *grpc_util.ServerConfig) *Server { +func StartServer(conf grpc_util.ServerConfig) *Server { return &Server{ port: conf.Port, } diff --git a/pkg/auth/api/api.go b/pkg/auth/api/api.go index 204b3a331f..dcdb4f2672 100644 --- a/pkg/auth/api/api.go +++ b/pkg/auth/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/auth/api/config.go b/pkg/auth/api/config.go deleted file mode 100644 index 8fce0aca62..0000000000 --- a/pkg/auth/api/config.go +++ /dev/null @@ -1,7 +0,0 @@ -package api - -import "github.com/caos/zitadel/internal/api/grpc" - -type Config struct { - GRPC grpc.Config -} diff --git a/pkg/auth/api/grpc/gateway.go b/pkg/auth/api/grpc/gateway.go index 14958b8a7b..7bdea9d1f6 100644 --- a/pkg/auth/api/grpc/gateway.go +++ b/pkg/auth/api/grpc/gateway.go @@ -15,7 +15,7 @@ type Gateway struct { cutomHeaders []string } -func StartGateway(conf *grpc_util.GatewayConfig) *Gateway { +func StartGateway(conf grpc_util.GatewayConfig) *Gateway { return &Gateway{ grpcEndpoint: conf.GRPCEndpoint, port: conf.Port, diff --git a/pkg/auth/api/grpc/server.go b/pkg/auth/api/grpc/server.go index 214e4445c9..5af9cad064 100644 --- a/pkg/auth/api/grpc/server.go +++ b/pkg/auth/api/grpc/server.go @@ -15,7 +15,7 @@ type Server struct { searchLimit int } -func StartServer(conf *grpc_util.ServerConfig) *Server { +func StartServer(conf grpc_util.ServerConfig) *Server { return &Server{ port: conf.Port, } diff --git a/pkg/management/api/config.go b/pkg/management/api/config.go deleted file mode 100644 index 8fce0aca62..0000000000 --- a/pkg/management/api/config.go +++ /dev/null @@ -1,7 +0,0 @@ -package api - -import "github.com/caos/zitadel/internal/api/grpc" - -type Config struct { - GRPC grpc.Config -} diff --git a/pkg/management/api/grpc/gateway.go b/pkg/management/api/grpc/gateway.go index 77b5486165..82e595331a 100644 --- a/pkg/management/api/grpc/gateway.go +++ b/pkg/management/api/grpc/gateway.go @@ -13,7 +13,7 @@ type Gateway struct { cutomHeaders []string } -func StartGateway(conf *grpc_util.GatewayConfig) *Gateway { +func StartGateway(conf grpc_util.GatewayConfig) *Gateway { return &Gateway{ grpcEndpoint: conf.GRPCEndpoint, port: conf.Port, diff --git a/pkg/management/api/grpc/server.go b/pkg/management/api/grpc/server.go index 4ed734c79e..33af61d559 100644 --- a/pkg/management/api/grpc/server.go +++ b/pkg/management/api/grpc/server.go @@ -13,7 +13,7 @@ type Server struct { port string } -func StartServer(conf *grpc_util.ServerConfig) *Server { +func StartServer(conf grpc_util.ServerConfig) *Server { return &Server{ port: conf.Port, }