Versions in this module Expand all Collapse all v0 v0.1.3 Jul 12, 2023 v0.1.2 Jul 11, 2023 Changes in this version + type StreamRequest struct v0.1.1 Jul 6, 2023 Changes in this version type Endpoint + Roles []string v0.1.0 Jun 22, 2023 Changes in this version + const GatewayTypeAPI + const GatewayTypeEvents + type ContentGetter interface + Content func() io.ReadCloser + type ContentLengthGetter interface + ContentLength func() int + type ContentLengthSetter interface + SetContentLength func(int) + type ContentRangeGetter interface + ContentRange func() (start int, end int, size int) + type ContentRangeSetter interface + SetContentRange func(start int, end int, size int) + type ContentSetter interface + SetContent func(io.ReadCloser) + type ContentTypeGetter interface + ContentType func() string + type ContentTypeSetter interface + SetContentType func(string) + type Endpoint struct + Handler HandlerFunc + Name string + NewInput func() StructPointer + Routes []EndpointRoute + ServiceName string + func (end Endpoint) QualifiedName() string + type EndpointRoute struct + GatewayType GatewayType + Method string + Path string + Status int + type Gateway interface + Listen func() error + Register func(endpoint Endpoint, route EndpointRoute) + Shutdown func(ctx context.Context) error + Type func() GatewayType + type GatewayMiddleware interface + Middleware func() MiddlewareFuncs + type GatewayType string + func (t GatewayType) String() string + type HandlerFunc func(ctx context.Context, req any) (any, error) + type MiddlewareFunc func(ctx context.Context, req any, next HandlerFunc) (any, error) + type MiddlewareFuncs []MiddlewareFunc + func (funcs MiddlewareFuncs) Append(mw ...MiddlewareFunc) MiddlewareFuncs + func (funcs MiddlewareFuncs) Then(handler HandlerFunc) HandlerFunc + type Redirector interface + Redirect func() string + type RedirectorPermanent interface + RedirectPermanent func() string + type Server struct + func NewServer(options ...ServerOption) *Server + func (server *Server) Invoke(ctx context.Context, serviceName string, methodName string, req any) (any, error) + func (server *Server) Run() error + func (server *Server) Shutdown(ctx context.Context) error + func (server *Server) ShutdownOnInterrupt(gracefulTimeout time.Duration) + type ServerOption func(*Server) + func Listen(gw Gateway) ServerOption + func Register(services ...*Service) ServerOption + type Service struct + Endpoints []Endpoint + Handler any + Name string + Version string + func (svc Service) Endpoint(name string) (Endpoint, bool) + type StreamResponse struct + func (res *StreamResponse) Content() io.ReadCloser + func (res *StreamResponse) ContentLength() int + func (res *StreamResponse) ContentRange() (start int, end int, size int) + func (res *StreamResponse) ContentType() string + func (res *StreamResponse) SetContent(content io.ReadCloser) + func (res *StreamResponse) SetContentLength(contentLength int) + func (res *StreamResponse) SetContentRange(start int, end int, size int) + func (res *StreamResponse) SetContentType(contentType string) + type StructPointer any