Documentation ¶
Index ¶
- type HTTPResponse
- func (h HTTPResponse) BadRequest(err error) HTTPResponse
- func (h HTTPResponse) BadRequestf(format string, a ...any) HTTPResponse
- func (h HTTPResponse) Error(err error) HTTPResponse
- func (h HTTPResponse) Errorf(format string, a ...any) HTTPResponse
- func (h HTTPResponse) Header(key, value string) HTTPResponse
- func (h HTTPResponse) NotFound() HTTPResponse
- func (h HTTPResponse) Ok(message string, data interface{}) HTTPResponse
- func (h HTTPResponse) Response() (events.APIGatewayV2HTTPResponse, error)
- type HandlerFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPResponse ¶
type HTTPResponse struct { StatusCode int Headers map[string]string Message string Data interface{} }
func (HTTPResponse) BadRequest ¶
func (h HTTPResponse) BadRequest(err error) HTTPResponse
func (HTTPResponse) BadRequestf ¶
func (h HTTPResponse) BadRequestf(format string, a ...any) HTTPResponse
func (HTTPResponse) Error ¶
func (h HTTPResponse) Error(err error) HTTPResponse
func (HTTPResponse) Errorf ¶
func (h HTTPResponse) Errorf(format string, a ...any) HTTPResponse
func (HTTPResponse) Header ¶
func (h HTTPResponse) Header(key, value string) HTTPResponse
func (HTTPResponse) NotFound ¶
func (h HTTPResponse) NotFound() HTTPResponse
func (HTTPResponse) Ok ¶
func (h HTTPResponse) Ok(message string, data interface{}) HTTPResponse
func (HTTPResponse) Response ¶
func (h HTTPResponse) Response() (events.APIGatewayV2HTTPResponse, error)
type HandlerFn ¶
type HandlerFn func(context.Context, events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)
func LogMiddleware ¶
Click to show internal directories.
Click to hide internal directories.