Versions in this module Expand all Collapse all v0 v0.2.0 May 16, 2026 Changes in this version + const CodeBadRequest + const CodeConflict + const CodeForbidden + const CodeInternalError + const CodeNotFound + const CodeRateLimitExceeded + const CodeServiceUnavailable + const CodeUnauthorized + const CodeUnprocessableEntity + const CodeValidationError + func RequestID(r *http.Request) string + func RespondError(w http.ResponseWriter, r *http.Request, err *APIError) + func RespondJSON(w http.ResponseWriter, r *http.Request, statusCode int, data interface{}, ...) + func RespondNoContent(w http.ResponseWriter) + type APIError struct + Code string + Details []ErrorDetail + Message string + StatusCode int + func (e *APIError) Error() string + type ErrorDetail struct + Field string + Message string + type ErrorEnvelope struct + Error ErrorPayload + type ErrorPayload struct + Code string + Details []ErrorDetail + Message string + RequestID string + type Meta struct + RequestID string + type SuccessEnvelope struct + Data interface{} + Meta *Meta