service

package
v0.8.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 49 Imported by: 0

Documentation

Index

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 HandlerSet struct {
	Handlers map[string]Handler
}

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 (svc Service) HTTPEngine() string

func (*Service) HandleAnyRequest

func (svc *Service) HandleAnyRequest(aRes anyhttp.Response, aReq anyhttp.Request)

func (*Service) HandleAwsLambda

func (*Service) HandleHomeAnyRequest

func (svc *Service) HandleHomeAnyRequest(aRes anyhttp.Response, aReq anyhttp.Request)

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) PortInt

func (svc Service) PortInt() int

func (Service) Router

func (svc Service) Router() http.Handler

func (Service) RouterFast

func (svc Service) RouterFast() *fasthttprouter.Router

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL