mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 23:37:23 +00:00
fix: add server
This commit is contained in:
parent
e55b137455
commit
46c3289ee3
22
pkg/admin/api/grpc/org.go
Normal file
22
pkg/admin/api/grpc/org.go
Normal file
@ -0,0 +1,22 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
func (s *Server) GetOrgByID(ctx context.Context, orgID *OrgID) (_ *Org, err error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) SearchOrgs(ctx context.Context, request *OrgSearchRequest) (_ *OrgSearchResponse, err error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) IsOrgUnique(ctx context.Context, request *UniqueOrgRequest) (org *UniqueOrgResponse, err error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) SetUpOrg(ctx context.Context, orgSetUp *OrgSetUpRequest) (_ *OrgSetUpResponse, err error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
20
pkg/admin/api/grpc/probes.go
Normal file
20
pkg/admin/api/grpc/probes.go
Normal file
@ -0,0 +1,20 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
pb_struct "github.com/golang/protobuf/ptypes/struct"
|
||||
)
|
||||
|
||||
func (s *Server) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) Validate(ctx context.Context, _ *empty.Empty) (*pb_struct.Struct, error) {
|
||||
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
|
||||
}
|
34
pkg/admin/api/grpc/server.go
Normal file
34
pkg/admin/api/grpc/server.go
Normal file
@ -0,0 +1,34 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var _ AdminServiceServer = (*Server)(nil)
|
||||
|
||||
type Config struct {
|
||||
Port string
|
||||
SearchLimit int
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
port string
|
||||
searchLimit int
|
||||
}
|
||||
|
||||
func StartServer(conf Config) *Server {
|
||||
return &Server{
|
||||
port: conf.Port,
|
||||
searchLimit: conf.SearchLimit,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) GRPCPort() string {
|
||||
return s.port
|
||||
}
|
||||
|
||||
func (s *Server) GRPCServer() (*grpc.Server, error) {
|
||||
gs := grpc.NewServer()
|
||||
RegisterAdminServiceServer(gs, s)
|
||||
return gs, nil
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user