Versions in this module Expand all Collapse all v0 v0.0.0 Jul 20, 2022 Changes in this version + var API_ERROR_FORMAT = "api-error: %s" + var DEBUG = false + func GetLogger(ctx context.Context) logger + func GetRequest(ctx context.Context) *http.Request + func Redirect(code int, location string) interface + func SetLogger(ctx context.Context, l logger) context.Context + func SetRequest(ctx context.Context, req *http.Request) context.Context + func StatusCodeOf(err error) int + func StatusCodeOfOrDefault(err error, code int) int + type APIError struct + func NewAPIError(err error, code int) *APIError + func (e *APIError) Error() string + func (e *APIError) StatusCode() int + func (e *APIError) Unwrap() error + type Empty struct + type ErrorResponse struct + Code int + Detail []string + Error string + type Redirector interface + Redirect func(http.ResponseWriter, *http.Request) + type StatusCoder interface + StatusCode func() int + func NoContent(code int) StatusCoder