Documentation
¶
Index ¶
- func ServeAWSLambda(svc Service)
- func ServeFastHTTP(svc Service)
- func ServeNetHTTP(svc Service)
- type Handler
- type HandlerFactory
- type HandlerSet
- type Service
- func (svc Service) HTTPEngine() string
- func (svc *Service) HandleAnyRequest(aRes anyhttp.Response, aReq anyhttp.Request)
- func (svc *Service) HandleAwsLambda(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func (svc *Service) HandleHomeAnyRequest(aRes anyhttp.Response, aReq anyhttp.Request)
- func (svc *Service) HandleHomeFastHTTP(ctx *fasthttp.RequestCtx)
- func (svc *Service) HandleHomeNetHTTP(res http.ResponseWriter, req *http.Request)
- func (svc *Service) HandleHookFastHTTP(ctx *fasthttp.RequestCtx)
- func (svc *Service) HandleHookNetHTTP(res http.ResponseWriter, req *http.Request)
- func (svc Service) PortInt() int
- func (svc Service) Router() http.Handler
- func (svc Service) RouterFast() *fasthttprouter.Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeAWSLambda ¶ added in v0.8.0
func ServeAWSLambda(svc Service)
func ServeFastHTTP ¶ added in v0.8.0
func ServeFastHTTP(svc Service)
func ServeNetHTTP ¶ added in v0.8.0
func ServeNetHTTP(svc Service)
Types ¶
type Handler ¶
type Handler interface {
HandleCanonical(hookData models.HookData) []models.ErrorInfo
HandleAwsLambda(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
HandleFastHTTP(ctx *fasthttp.RequestCtx)
HandleNetHTTP(res http.ResponseWriter, req *http.Request)
HandleAnyHTTP(aRes anyhttp.Response, aReq anyhttp.Request)
}
type HandlerFactory ¶
type HandlerFactory struct {
Config config.Configuration
AdapterSet adapters.AdapterSet
}
func (*HandlerFactory) InflateHandler ¶
func (hf *HandlerFactory) InflateHandler(handler handlers.Handler) handlers.Handler
func (*HandlerFactory) NewHandler ¶
func (hf *HandlerFactory) NewHandler(normalize handlers.Normalize) handlers.Handler
type HandlerSet ¶
type Service ¶
type Service struct {
Config config.Configuration
AdapterSet adapters.AdapterSet
HandlerSet HandlerSet
RequireToken bool
Tokens map[string]int
}
func NewService ¶
func NewService() Service
func (Service) HTTPEngine ¶ added in v0.8.0
func (*Service) HandleAnyRequest ¶
func (*Service) HandleAwsLambda ¶
func (svc *Service) HandleAwsLambda(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func (*Service) HandleHomeAnyRequest ¶
func (*Service) HandleHomeFastHTTP ¶
func (svc *Service) HandleHomeFastHTTP(ctx *fasthttp.RequestCtx)
func (*Service) HandleHomeNetHTTP ¶
func (svc *Service) HandleHomeNetHTTP(res http.ResponseWriter, req *http.Request)
func (*Service) HandleHookFastHTTP ¶
func (svc *Service) HandleHookFastHTTP(ctx *fasthttp.RequestCtx)
func (*Service) HandleHookNetHTTP ¶
func (svc *Service) HandleHookNetHTTP(res http.ResponseWriter, req *http.Request)
func (Service) RouterFast ¶
func (svc Service) RouterFast() *fasthttprouter.Router
Click to show internal directories.
Click to hide internal directories.