statuserror

package
v0.0.0-...-1be23ea Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Overview

Package statuserror GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(err error) iter.Seq[error]

func Wrap

func Wrap(err error, statusCode int, key string) error

Types

type BadGateway

type BadGateway struct{}

func (BadGateway) StatusCode

func (BadGateway) StatusCode() int

type BadRequest

type BadRequest struct{}

func (BadRequest) StatusCode

func (BadRequest) StatusCode() int

type ClientClosedRequest

type ClientClosedRequest struct{}

func (ClientClosedRequest) StatusCode

func (ClientClosedRequest) StatusCode() int

type Conflict

type Conflict struct{}

func (Conflict) StatusCode

func (Conflict) StatusCode() int

type ErrorResponse

type ErrorResponse struct {
	Code int    `json:"code,omitempty"`
	Key  string `json:"key"`
	Msg  string `json:"msg"`

	Location string           `json:"location,omitzero"`
	Pointer  jsontext.Pointer `json:"pointer,omitzero"`
	Source   string           `json:"source,omitzero"`

	Errors []*ErrorResponse `json:"errors,omitzero"`
}

func AsErrorResponse

func AsErrorResponse(err error, source string) *ErrorResponse

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

func (ErrorResponse) RuntimeDoc

func (v ErrorResponse) RuntimeDoc(names ...string) ([]string, bool)

func (*ErrorResponse) StatusCode

func (e *ErrorResponse) StatusCode() int

func (*ErrorResponse) UnmarshalErrorResponse

func (e *ErrorResponse) UnmarshalErrorResponse(statusCode int, raw []byte) error

func (*ErrorResponse) Unwrap

func (e *ErrorResponse) Unwrap() []error

type ExpectationFailed

type ExpectationFailed struct{}

func (ExpectationFailed) StatusCode

func (ExpectationFailed) StatusCode() int

type FailedDependency

type FailedDependency struct{}

func (FailedDependency) StatusCode

func (FailedDependency) StatusCode() int

type Forbidden

type Forbidden struct{}

func (Forbidden) StatusCode

func (Forbidden) StatusCode() int

type GatewayTimeout

type GatewayTimeout struct{}

func (GatewayTimeout) StatusCode

func (GatewayTimeout) StatusCode() int

type Gone

type Gone struct{}

func (Gone) StatusCode

func (Gone) StatusCode() int

type HTTPVersionNotSupported

type HTTPVersionNotSupported struct{}

func (HTTPVersionNotSupported) StatusCode

func (HTTPVersionNotSupported) StatusCode() int

type InsufficientStorage

type InsufficientStorage struct{}

func (InsufficientStorage) StatusCode

func (InsufficientStorage) StatusCode() int

type InternalServerError

type InternalServerError struct{}

func (InternalServerError) StatusCode

func (InternalServerError) StatusCode() int

type LengthRequired

type LengthRequired struct{}

func (LengthRequired) StatusCode

func (LengthRequired) StatusCode() int

type Locked

type Locked struct{}

func (Locked) StatusCode

func (Locked) StatusCode() int

type LoopDetected

type LoopDetected struct{}

func (LoopDetected) StatusCode

func (LoopDetected) StatusCode() int

type MethodNotAllowed

type MethodNotAllowed struct{}

func (MethodNotAllowed) StatusCode

func (MethodNotAllowed) StatusCode() int

type MisdirectedRequest

type MisdirectedRequest struct{}

func (MisdirectedRequest) StatusCode

func (MisdirectedRequest) StatusCode() int

type NetworkAuthenticationRequired

type NetworkAuthenticationRequired struct{}

func (NetworkAuthenticationRequired) StatusCode

func (NetworkAuthenticationRequired) StatusCode() int

type NotAcceptable

type NotAcceptable struct{}

func (NotAcceptable) StatusCode

func (NotAcceptable) StatusCode() int

type NotExtended

type NotExtended struct{}

func (NotExtended) StatusCode

func (NotExtended) StatusCode() int

type NotFound

type NotFound struct{}

func (NotFound) StatusCode

func (NotFound) StatusCode() int

type NotImplemented

type NotImplemented struct{}

func (NotImplemented) StatusCode

func (NotImplemented) StatusCode() int

type PaymentRequired

type PaymentRequired struct{}

func (PaymentRequired) StatusCode

func (PaymentRequired) StatusCode() int

type PreconditionFailed

type PreconditionFailed struct{}

func (PreconditionFailed) StatusCode

func (PreconditionFailed) StatusCode() int

type PreconditionRequired

type PreconditionRequired struct{}

func (PreconditionRequired) StatusCode

func (PreconditionRequired) StatusCode() int

type ProxyAuthRequired

type ProxyAuthRequired struct{}

func (ProxyAuthRequired) StatusCode

func (ProxyAuthRequired) StatusCode() int

type RequestEntityTooLarge

type RequestEntityTooLarge struct{}

func (RequestEntityTooLarge) StatusCode

func (RequestEntityTooLarge) StatusCode() int

type RequestHeaderFieldsTooLarge

type RequestHeaderFieldsTooLarge struct{}

func (RequestHeaderFieldsTooLarge) StatusCode

func (RequestHeaderFieldsTooLarge) StatusCode() int

type RequestTimeout

type RequestTimeout struct{}

func (RequestTimeout) StatusCode

func (RequestTimeout) StatusCode() int

type RequestURITooLong

type RequestURITooLong struct{}

func (RequestURITooLong) StatusCode

func (RequestURITooLong) StatusCode() int

type RequestedRangeNotSatisfiable

type RequestedRangeNotSatisfiable struct{}

func (RequestedRangeNotSatisfiable) StatusCode

func (RequestedRangeNotSatisfiable) StatusCode() int

type ServiceUnavailable

type ServiceUnavailable struct{}

func (ServiceUnavailable) StatusCode

func (ServiceUnavailable) StatusCode() int

type Teapot

type Teapot struct{}

func (Teapot) StatusCode

func (Teapot) StatusCode() int

type TooEarly

type TooEarly struct{}

func (TooEarly) StatusCode

func (TooEarly) StatusCode() int

type TooManyRequests

type TooManyRequests struct{}

func (TooManyRequests) StatusCode

func (TooManyRequests) StatusCode() int

type Unauthorized

type Unauthorized struct{}

func (Unauthorized) StatusCode

func (Unauthorized) StatusCode() int

type UnavailableForLegalReasons

type UnavailableForLegalReasons struct{}

func (UnavailableForLegalReasons) StatusCode

func (UnavailableForLegalReasons) StatusCode() int

type UnprocessableEntity

type UnprocessableEntity struct{}

func (UnprocessableEntity) StatusCode

func (UnprocessableEntity) StatusCode() int

type UnsupportedMediaType

type UnsupportedMediaType struct{}

func (UnsupportedMediaType) StatusCode

func (UnsupportedMediaType) StatusCode() int

type UpgradeRequired

type UpgradeRequired struct{}

func (UpgradeRequired) StatusCode

func (UpgradeRequired) StatusCode() int

type VariantAlsoNegotiates

type VariantAlsoNegotiates struct{}

func (VariantAlsoNegotiates) StatusCode

func (VariantAlsoNegotiates) StatusCode() int

type WithErrKey

type WithErrKey interface {
	ErrKey() string
}

type WithJSONPointer

type WithJSONPointer interface {
	JSONPointer() jsontext.Pointer
}

type WithLocation

type WithLocation interface {
	Location() string
}

type WithStatusCode

type WithStatusCode interface {
	StatusCode() int
}

Jump to

Keyboard shortcuts

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