Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcOptions ¶
type GrpcOptions struct {
// contains filtered or unexported fields
}
func NewGrpcOptions ¶
func NewGrpcOptions(logger loggerInterface, authMiddleware grpc.UnaryServerInterceptor) *GrpcOptions
type HandlerFunc ¶
func (HandlerFunc) ServeHTTP ¶
func (HandlerFunc) ServeHTTP(http.ResponseWriter, *http.Request)
ServeHTTP implements http.Handler.
type IHttpClient ¶
type IHttpClient interface { Run(ConnString string) error Get(relativePath string, handlerFunction ...http.HandlerFunc) Put(relativePath string, handlerFunction ...http.HandlerFunc) Patch(relativePath string, handlerFunction ...http.HandlerFunc) Delete(relativePath string, handlerFunction ...http.HandlerFunc) Post(relativePath string, handlerFunction ...http.HandlerFunc) NewSubGroup(path string, handleFunctions ...http.HandlerFunc) IHttpClient Any(relativePath string, handlerFunction ...gin.HandlerFunc) Use(handlerFunction ...http.HandlerFunc) GetGrpcServerInstanceForRegister() IgrpcGw Exit(ctx context.Context, errChannel chan error) }
func NewHttpServer ¶
func NewHttpServer(ioWriter io.Writer, grpcOptions *GrpcOptions) (IHttpClient, error)
type IgrpcGw ¶
type IgrpcGw interface { RegisterServer(registerServerFunc func(grpc.ServiceRegistrar, interface{}), serverInstance interface{}) RegisterFuncHandler(registerFuncHandlerFunc RegisterFuncHandlerFunc) error GetServerInstanceForRegister() *grpc.Server GetMuxInstanceForRegister() *runtime.ServeMux GetClientInstanceForRegister() *grpc.ClientConn StartGrpcServer(ctx context.Context, server IHttpClient) error ServerPort(serve net.Listener) ConnectClient(clientConnectionString string) error Exit(ctx context.Context, errChannel chan error) }
func NewGrpcGw ¶
func NewGrpcGw(opts *GrpcOptions) (IgrpcGw, error)
type RegisterFuncHandlerFunc ¶
type RegisterServerFunc ¶
type RegisterServerFunc func(s grpc.ServiceRegistrar, server interface{})
Click to show internal directories.
Click to hide internal directories.