responses

package
v1.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accepted

func Accepted() huma.Response

Accepted HTTP 202 response.

func BadGateway

func BadGateway() huma.Response

BadGateway HTTP 502 response with a structured error body (e.g. JSON).

func BadRequest

func BadRequest() huma.Response

BadRequest HTTP 400 response with a structured error body (e.g. JSON).

func ClientClosedRequest added in v1.10.0

func ClientClosedRequest() huma.Response

ClientClosedRequest HTTP 499 response with a structured error body (e.g. JSON). 499 is not currently registered with IANA and is unavailable in the net/http lib. See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

func Conflict

func Conflict() huma.Response

Conflict HTTP 409 response with a structured error body (e.g. JSON).

func Created

func Created() huma.Response

Created HTTP 201 response.

func Forbidden

func Forbidden() huma.Response

Forbidden HTTP 403 response with a structured error body (e.g. JSON).

func Found

func Found() huma.Response

Found HTTP 302 response.

func GatewayTimeout

func GatewayTimeout() huma.Response

GatewayTimeout HTTP 504 response with a structured error body (e.g. JSON).

func InternalServerError

func InternalServerError() huma.Response

InternalServerError HTTP 500 response with a structured error body (e.g. JSON).

func MovedPermanently

func MovedPermanently() huma.Response

MovedPermanently HTTP 301 response.

func NoContent

func NoContent() huma.Response

NoContent HTTP 204 response.

func NotAcceptable

func NotAcceptable() huma.Response

NotAcceptable HTTP 406 response with a structured error body (e.g. JSON).

func NotFound

func NotFound() huma.Response

NotFound HTTP 404 response with a structured error body (e.g. JSON).

func NotImplemented

func NotImplemented() huma.Response

NotImplemented HTTP 501 response with a structured error body (e.g. JSON).

func NotModified

func NotModified() huma.Response

NotModified HTTP 304 response.

func OK

func OK() huma.Response

OK HTTP 200 response.

func PartialContent added in v1.4.0

func PartialContent() huma.Response

PartialContent HTTP 206 response

func PermanentRedirect

func PermanentRedirect() huma.Response

PermanentRedirect HTTP 308 response.

func PreconditionFailed

func PreconditionFailed() huma.Response

PreconditionFailed HTTP 412 response with a structured error body (e.g. JSON).

func PreconditionRequired

func PreconditionRequired() huma.Response

PreconditionRequired HTTP 428 response with a structured error body (e.g. JSON).

func RequestEntityTooLarge

func RequestEntityTooLarge() huma.Response

RequestEntityTooLarge HTTP 413 response with a structured error body (e.g. JSON).

func RequestTimeout

func RequestTimeout() huma.Response

RequestTimeout HTTP 408 response with a structured error body (e.g. JSON).

func ServiceUnavailable

func ServiceUnavailable() huma.Response

ServiceUnavailable HTTP 503 response with a structured error body (e.g. JSON).

func String

func String(status int) huma.Response

String HTTP response with the given status code and `text/plain` content type.

func TemporaryRedirect

func TemporaryRedirect() huma.Response

TemporaryRedirect HTTP 307 response.

func Unauthorized

func Unauthorized() huma.Response

Unauthorized HTTP 401 response with a structured error body (e.g. JSON).

func UnprocessableEntity added in v1.5.1

func UnprocessableEntity() huma.Response

UnprocessableEntity HTTP 422 response with a structured error body (e.g. JSON).

func UnsupportedMediaType added in v1.7.0

func UnsupportedMediaType() huma.Response

UnsupportedMediaType HTTP 415 response with a structured error body (e.g. JSON).

func WriteContent added in v1.4.1

func WriteContent() []huma.Response

WriteContent returns a slice containing all valid responses for context.WriteContent

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL