mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-25 08:30:37 +00:00
fix configs
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/api/grpc/server"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type GatewayConfig struct {
|
||||
Port string
|
||||
GRPCEndpoint string
|
||||
CustomHeaders []string
|
||||
}
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
grpc_util "github.com/caos/zitadel/internal/api/grpc"
|
||||
"github.com/caos/zitadel/internal/api/grpc/server"
|
||||
)
|
||||
|
||||
type Gateway struct {
|
||||
grpcEndpoint string
|
||||
@@ -18,7 +15,7 @@ type Gateway struct {
|
||||
cutomHeaders []string
|
||||
}
|
||||
|
||||
func StartGateway(conf GatewayConfig) *Gateway {
|
||||
func StartGateway(conf *grpc_util.GatewayConfig) *Gateway {
|
||||
return &Gateway{
|
||||
grpcEndpoint: conf.GRPCEndpoint,
|
||||
port: conf.Port,
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/api/grpc/server/middleware"
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
grpc_util "github.com/caos/zitadel/internal/api/grpc"
|
||||
"github.com/caos/zitadel/internal/api/grpc/server/middleware"
|
||||
)
|
||||
|
||||
var _ AuthServiceServer = (*Server)(nil)
|
||||
|
||||
type Config struct {
|
||||
Port string
|
||||
SearchLimit int
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
port string
|
||||
searchLimit int
|
||||
}
|
||||
|
||||
func StartServer(conf Config) *Server {
|
||||
func StartServer(conf *grpc_util.ServerConfig) *Server {
|
||||
return &Server{
|
||||
port: conf.Port,
|
||||
searchLimit: conf.SearchLimit,
|
||||
port: conf.Port,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user