Documentation ¶
Index ¶
- func GetContext(r *http.Request) (lambdacontext.LambdaContext, bool)
- func GetEvent(r *http.Request) (events.APIGatewayProxyRequest, bool)
- func NewRequest(c context.Context, e events.APIGatewayProxyRequest) (*http.Request, error)
- func Start(h http.Handler)
- func WithEvent(r *http.Request, e events.APIGatewayProxyRequest) *http.Request
- type Handler
- type ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContext ¶
func GetContext(r *http.Request) (lambdacontext.LambdaContext, bool)
GetContext returns a copy of the lambda context if it exists
func GetEvent ¶
func GetEvent(r *http.Request) (events.APIGatewayProxyRequest, bool)
GetEvent returns a copy of the proxy integration event if it exists
func NewRequest ¶
NewRequest parses the integration event and returns a new HTTP request
Types ¶
type Handler ¶
Handler represents a proxy integration event handler
func (*Handler) Handle ¶
func (h *Handler) Handle(c context.Context, e events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
Handle dispatches the integration event as an HTTP request to the wrapped handler
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
ResponseWriter represents a proxy integration response writer
func NewResponseWriter ¶
func NewResponseWriter() *ResponseWriter
NewResponseWriter returns a new ResponseWriter
func (*ResponseWriter) Header ¶
func (w *ResponseWriter) Header() http.Header
Header returns the HTTP headers
func (*ResponseWriter) Result ¶
func (w *ResponseWriter) Result() events.APIGatewayProxyResponse
Result returns a proxy integration result for the response
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(code int)
WriteHeader writes the specified status if the header has not been written
Click to show internal directories.
Click to hide internal directories.