mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 20:02:15 +00:00
fix: add requests
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var _ AuthServiceServer = (*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()
|
||||
RegisterAuthServiceServer(gs, s)
|
||||
return gs, nil
|
||||
}
|
||||
Reference in New Issue
Block a user