Documentation
¶
Overview ¶
Package handler provides common utilities for HTTP handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindRequest ¶
BindRequest reads the request body, parses it into the target type using gopantic, and validates it. Returns the parsed value or a user-friendly error.
Usage:
req, bindErr := handler.BindRequest[CreateTransferRequest](r)
if bindErr != nil {
response.Error(w, bindErr)
return
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.