Documentation
¶
Index ¶
- func GetSourceEvent(ctx context.Context) any
- func NewAPIGatewayV1Handler(adapter AdapterFunc) ...
- func NewAPIGatewayV2Handler(adapter AdapterFunc) ...
- func NewFunctionURLHandler(adapter AdapterFunc) ...
- func NewHandler[In any, W http.ResponseWriter, Out any](reqConverter RequestConverterFunc[In], ...) func(context.Context, In) (Out, error)
- func WithSourceEvent(ctx context.Context, event any) context.Context
- func WrapWithRecover[In any, Out any](handler func(context.Context, In) (Out, error), ...) func(context.Context, In) (Out, error)
- type AdapterFunc
- type RecoverFunc
- type RequestConverterFunc
- type ResponseFinalizerFunc
- type ResponseInitializerFunc
- type ResponseWriterProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSourceEvent ¶
func NewAPIGatewayV1Handler ¶
func NewAPIGatewayV1Handler(adapter AdapterFunc) func(context.Context, events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func NewAPIGatewayV2Handler ¶
func NewAPIGatewayV2Handler(adapter AdapterFunc) func(context.Context, events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)
func NewFunctionURLHandler ¶
func NewFunctionURLHandler(adapter AdapterFunc) func(context.Context, events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error)
func NewHandler ¶
func NewHandler[In any, W http.ResponseWriter, Out any](reqConverter RequestConverterFunc[In], resInitializer ResponseInitializerFunc[W], resFinalizer ResponseFinalizerFunc[W, Out], adapter AdapterFunc) func(context.Context, In) (Out, error)
Types ¶
type AdapterFunc ¶
type RecoverFunc ¶
type RequestConverterFunc ¶
type ResponseFinalizerFunc ¶
type ResponseInitializerFunc ¶
type ResponseInitializerFunc[W http.ResponseWriter] func(ctx context.Context) W
type ResponseWriterProxy ¶
func NewResponseWriterProxy ¶
func NewResponseWriterProxy() *ResponseWriterProxy
func (*ResponseWriterProxy) Header ¶
func (w *ResponseWriterProxy) Header() http.Header
func (*ResponseWriterProxy) WriteHeader ¶
func (w *ResponseWriterProxy) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.