Versions in this module Expand all Collapse all v0 v0.1.1 Jun 11, 2026 Changes in this version + func Accepted(w http.ResponseWriter, data any) + func BadRequest(w http.ResponseWriter, data any) + func Conflict(w http.ResponseWriter, data any) + func Created(w http.ResponseWriter, data any) + func DecodeJSON[T any](r *http.Request) (T, error) + func Error(w http.ResponseWriter, statusCode int, code, message string) + func Forbidden(w http.ResponseWriter, data any) + func HandleErr(w http.ResponseWriter, r *http.Request, err error, extraCodes map[string]int) + func HandleValidationError(w http.ResponseWriter, r *http.Request, loc Location, ...) + func InternalServerError(w http.ResponseWriter, data any) + func IsJSONDecodeError(err error) bool + func NoContent(w http.ResponseWriter) + func NotFound(w http.ResponseWriter, data any) + func Ok(w http.ResponseWriter, data any) + func ParseCursorPager(r *http.Request, opts ...pagination.CursorOption) (pagination.CursorPager, error) + func ParseOffsetPager(r *http.Request, opts ...pagination.OffsetOption) (pagination.OffsetPager, error) + func ParseSort(r *http.Request, allowed map[string]string) (sorting.Sorts, error) + func Response(w http.ResponseWriter, statusCode int, data any) + func TooManyRequests(w http.ResponseWriter, data any) + func Unauthorized(w http.ResponseWriter, data any) + func UnprocessableEntity(w http.ResponseWriter, data any) + type ErrorResponse struct + Code string + Details string + Message string + TraceID string + type FieldErrorResponse struct + Code string + Field string + Location string + Message string + Params map[string]any + type Location string + const LocationBody + const LocationHeader + const LocationPath + const LocationQuery + type ValidationErrorResponse struct + Errors []FieldErrorResponse