pf

package module
v0.0.0-...-ca4ff4f Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: MIT Imports: 2 Imported by: 0

README

Pretty Fail - pf

Generic library agnostic HTTP errors made to be displayed as JSON.

Usage

// just an error
pf.BadRequest()
// Error: HTTP 400: Bad Request
// Output:
// {
//   "code": "bad_request",
//   "message": "Bad Request"
// }

// with msg
pf.BadRequest("validation fail")
// Error: HTTP 400: validation fail
// Output:
// {
//   "code": "bad_request",
//   "message": "Bad Request"
// }


// with format
pf.BadRequestf("validation fail: %v", err)
// Error: HTTP 400: validation fail: err string
// Output:
// {
//   "code": "bad_request",
//   "message": "Bad Request"
// }

// with format for the public
pf.BadRequestf("bad input: %s", input).Safe()
// Error: HTTP 400: bad input: x
// Output:
// {
//   "code": "bad_request",
//   "message": "bad input: x"
// }


// with detailed error for the public
validations := []string{"fail one", "fail two"}
pf.BadRequestDetail(validations).Safe()
// Error: HTTP 400: Bad Request:[fail one fail two]
// Output:
// {
//   "code": "bad_request",
//   "message": "Bad Request",
//   "detail": [
//     "fail one",
//     "fail two"
//   ]
// }

Documentation

Overview

Package pf CODE GENERATED. DO NOT MODIFY

Package pf does pretty formatting of http errors

Index

Constants

View Source
const AcceptedSlug = "accepted"

AcceptedSlug ..

View Source
const AlreadyReportedSlug = "already_reported"

AlreadyReportedSlug ..

View Source
const BadGatewaySlug = "bad_gateway"

BadGatewaySlug ..

View Source
const BadRequestSlug = "bad_request"

BadRequestSlug ..

View Source
const ClientClosedRequestSlug = "client_closed_request"

ClientClosedRequestSlug ..

View Source
const ConflictSlug = "conflict"

ConflictSlug ..

View Source
const ConnectionClosedWithoutResponseSlug = "connection_closed_without_response"

ConnectionClosedWithoutResponseSlug ..

View Source
const ContinueSlug = "continue"

ContinueSlug ..

View Source
const CreatedSlug = "created"

CreatedSlug ..

View Source
const ExpectationFailedSlug = "expectation_failed"

ExpectationFailedSlug ..

View Source
const FailedDependencySlug = "failed_dependency"

FailedDependencySlug ..

View Source
const ForbiddenSlug = "forbidden"

ForbiddenSlug ..

View Source
const FoundSlug = "found"

FoundSlug ..

View Source
const GatewayTimeoutSlug = "gateway_timeout"

GatewayTimeoutSlug ..

View Source
const GoneSlug = "gone"

GoneSlug ..

View Source
const HTTPVersionNotSupportedSlug = "http_version_not_supported"

HTTPVersionNotSupportedSlug ..

View Source
const IMATeapotSlug = "i_m_a_teapot"

IMATeapotSlug ..

View Source
const ImUsedSlug = "im_used"

ImUsedSlug ..

View Source
const InsufficientStorageSlug = "insufficient_storage"

InsufficientStorageSlug ..

View Source
const InternalServerErrorSlug = "internal_server_error"

InternalServerErrorSlug ..

View Source
const LengthRequiredSlug = "length_required"

LengthRequiredSlug ..

View Source
const LockedSlug = "locked"

LockedSlug ..

View Source
const LoopDetectedSlug = "loop_detected"

LoopDetectedSlug ..

View Source
const MethodNotAllowedSlug = "method_not_allowed"

MethodNotAllowedSlug ..

View Source
const MisdirectedRequestSlug = "misdirected_request"

MisdirectedRequestSlug ..

View Source
const MovedPermanentlySlug = "moved_permanently"

MovedPermanentlySlug ..

View Source
const MultiStatusSlug = "multi_status"

MultiStatusSlug ..

View Source
const MultipleChoicesSlug = "multiple_choices"

MultipleChoicesSlug ..

View Source
const NetworkAuthenticationRequiredSlug = "network_authentication_required"

NetworkAuthenticationRequiredSlug ..

View Source
const NetworkConnectTimeoutErrorSlug = "network_connect_timeout_error"

NetworkConnectTimeoutErrorSlug ..

View Source
const NoContentSlug = "no_content"

NoContentSlug ..

View Source
const NonAuthoritativeInformationSlug = "non_authoritative_information"

NonAuthoritativeInformationSlug ..

View Source
const NotAcceptableSlug = "not_acceptable"

NotAcceptableSlug ..

View Source
const NotExtendedSlug = "not_extended"

NotExtendedSlug ..

View Source
const NotFoundSlug = "not_found"

NotFoundSlug ..

View Source
const NotImplementedSlug = "not_implemented"

NotImplementedSlug ..

View Source
const NotModifiedSlug = "not_modified"

NotModifiedSlug ..

View Source
const OkSlug = "ok"

OkSlug ..

View Source
const PartialContentSlug = "partial_content"

PartialContentSlug ..

View Source
const PayloadTooLargeSlug = "payload_too_large"

PayloadTooLargeSlug ..

View Source
const PaymentRequiredSlug = "payment_required"

PaymentRequiredSlug ..

View Source
const PermanentRedirectSlug = "permanent_redirect"

PermanentRedirectSlug ..

View Source
const PreconditionFailedSlug = "precondition_failed"

PreconditionFailedSlug ..

View Source
const PreconditionRequiredSlug = "precondition_required"

PreconditionRequiredSlug ..

View Source
const ProcessingSlug = "processing"

ProcessingSlug ..

View Source
const ProxyAuthenticationRequiredSlug = "proxy_authentication_required"

ProxyAuthenticationRequiredSlug ..

View Source
const RequestHeaderFieldsTooLargeSlug = "request_header_fields_too_large"

RequestHeaderFieldsTooLargeSlug ..

View Source
const RequestTimeoutSlug = "request_timeout"

RequestTimeoutSlug ..

View Source
const RequestURITooLongSlug = "request_uri_too_long"

RequestURITooLongSlug ..

View Source
const RequestedRangeNotSatisfiableSlug = "requested_range_not_satisfiable"

RequestedRangeNotSatisfiableSlug ..

View Source
const ResetContentSlug = "reset_content"

ResetContentSlug ..

View Source
const SeeOtherSlug = "see_other"

SeeOtherSlug ..

View Source
const ServiceUnavailableSlug = "service_unavailable"

ServiceUnavailableSlug ..

View Source
const SwitchingProtocolsSlug = "switching_protocols"

SwitchingProtocolsSlug ..

View Source
const TemporaryRedirectSlug = "temporary_redirect"

TemporaryRedirectSlug ..

View Source
const TooManyRequestsSlug = "too_many_requests"

TooManyRequestsSlug ..

View Source
const UnauthorizedSlug = "unauthorized"

UnauthorizedSlug ..

View Source
const UnavailableForLegalReasonsSlug = "unavailable_for_legal_reasons"

UnavailableForLegalReasonsSlug ..

View Source
const UnprocessableEntitySlug = "unprocessable_entity"

UnprocessableEntitySlug ..

View Source
const UnsupportedMediaTypeSlug = "unsupported_media_type"

UnsupportedMediaTypeSlug ..

View Source
const UpgradeRequiredSlug = "upgrade_required"

UpgradeRequiredSlug ..

View Source
const UseProxySlug = "use_proxy"

UseProxySlug ..

View Source
const VariantAlsoNegotiatesSlug = "variant_also_negotiates"

VariantAlsoNegotiatesSlug ..

Variables

This section is empty.

Functions

func CodeToSlug

func CodeToSlug(code int) string

CodeToSlug get the slug for a give status code

Types

type Fail

type Fail struct {
	Slug    string   `json:"code"`
	Code    int      `json:"-"`
	Message string   `json:"message,omitempty"`
	Detail  []string `json:"detail,omitempty"`
	// contains filtered or unexported fields
}

func Accepted

func Accepted(msg ...interface{}) *Fail

Accepted error with message

func AcceptedDetail

func AcceptedDetail(detail []string) *Fail

AcceptedDetail error with detail lines

func Acceptedf

func Acceptedf(format string, args ...interface{}) *Fail

Acceptedf error with message

func AlreadyReported

func AlreadyReported(msg ...interface{}) *Fail

AlreadyReported error with message

func AlreadyReportedDetail

func AlreadyReportedDetail(detail []string) *Fail

AlreadyReportedDetail error with detail lines

func AlreadyReportedf

func AlreadyReportedf(format string, args ...interface{}) *Fail

AlreadyReportedf error with message

func BadGateway

func BadGateway(msg ...interface{}) *Fail

BadGateway error with message

func BadGatewayDetail

func BadGatewayDetail(detail []string) *Fail

BadGatewayDetail error with detail lines

func BadGatewayf

func BadGatewayf(format string, args ...interface{}) *Fail

BadGatewayf error with message

func BadRequest

func BadRequest(msg ...interface{}) *Fail

BadRequest error with message

func BadRequestDetail

func BadRequestDetail(detail []string) *Fail

BadRequestDetail error with detail lines

func BadRequestf

func BadRequestf(format string, args ...interface{}) *Fail

BadRequestf error with message

func ClientClosedRequest

func ClientClosedRequest(msg ...interface{}) *Fail

ClientClosedRequest error with message

func ClientClosedRequestDetail

func ClientClosedRequestDetail(detail []string) *Fail

ClientClosedRequestDetail error with detail lines

func ClientClosedRequestf

func ClientClosedRequestf(format string, args ...interface{}) *Fail

ClientClosedRequestf error with message

func Conflict

func Conflict(msg ...interface{}) *Fail

Conflict error with message

func ConflictDetail

func ConflictDetail(detail []string) *Fail

ConflictDetail error with detail lines

func Conflictf

func Conflictf(format string, args ...interface{}) *Fail

Conflictf error with message

func ConnectionClosedWithoutResponse

func ConnectionClosedWithoutResponse(msg ...interface{}) *Fail

ConnectionClosedWithoutResponse error with message

func ConnectionClosedWithoutResponseDetail

func ConnectionClosedWithoutResponseDetail(detail []string) *Fail

ConnectionClosedWithoutResponseDetail error with detail lines

func ConnectionClosedWithoutResponsef

func ConnectionClosedWithoutResponsef(format string, args ...interface{}) *Fail

ConnectionClosedWithoutResponsef error with message

func Continue

func Continue(msg ...interface{}) *Fail

Continue error with message

func ContinueDetail

func ContinueDetail(detail []string) *Fail

ContinueDetail error with detail lines

func Continuef

func Continuef(format string, args ...interface{}) *Fail

Continuef error with message

func Created

func Created(msg ...interface{}) *Fail

Created error with message

func CreatedDetail

func CreatedDetail(detail []string) *Fail

CreatedDetail error with detail lines

func Createdf

func Createdf(format string, args ...interface{}) *Fail

Createdf error with message

func ExpectationFailed

func ExpectationFailed(msg ...interface{}) *Fail

ExpectationFailed error with message

func ExpectationFailedDetail

func ExpectationFailedDetail(detail []string) *Fail

ExpectationFailedDetail error with detail lines

func ExpectationFailedf

func ExpectationFailedf(format string, args ...interface{}) *Fail

ExpectationFailedf error with message

func FailedDependency

func FailedDependency(msg ...interface{}) *Fail

FailedDependency error with message

func FailedDependencyDetail

func FailedDependencyDetail(detail []string) *Fail

FailedDependencyDetail error with detail lines

func FailedDependencyf

func FailedDependencyf(format string, args ...interface{}) *Fail

FailedDependencyf error with message

func Forbidden

func Forbidden(msg ...interface{}) *Fail

Forbidden error with message

func ForbiddenDetail

func ForbiddenDetail(detail []string) *Fail

ForbiddenDetail error with detail lines

func Forbiddenf

func Forbiddenf(format string, args ...interface{}) *Fail

Forbiddenf error with message

func Found

func Found(msg ...interface{}) *Fail

Found error with message

func FoundDetail

func FoundDetail(detail []string) *Fail

FoundDetail error with detail lines

func Foundf

func Foundf(format string, args ...interface{}) *Fail

Foundf error with message

func GatewayTimeout

func GatewayTimeout(msg ...interface{}) *Fail

GatewayTimeout error with message

func GatewayTimeoutDetail

func GatewayTimeoutDetail(detail []string) *Fail

GatewayTimeoutDetail error with detail lines

func GatewayTimeoutf

func GatewayTimeoutf(format string, args ...interface{}) *Fail

GatewayTimeoutf error with message

func Gone

func Gone(msg ...interface{}) *Fail

Gone error with message

func GoneDetail

func GoneDetail(detail []string) *Fail

GoneDetail error with detail lines

func Gonef

func Gonef(format string, args ...interface{}) *Fail

Gonef error with message

func HTTPVersionNotSupported

func HTTPVersionNotSupported(msg ...interface{}) *Fail

HTTPVersionNotSupported error with message

func HTTPVersionNotSupportedDetail

func HTTPVersionNotSupportedDetail(detail []string) *Fail

HTTPVersionNotSupportedDetail error with detail lines

func HTTPVersionNotSupportedf

func HTTPVersionNotSupportedf(format string, args ...interface{}) *Fail

HTTPVersionNotSupportedf error with message

func IMATeapot

func IMATeapot(msg ...interface{}) *Fail

IMATeapot error with message

func IMATeapotDetail

func IMATeapotDetail(detail []string) *Fail

IMATeapotDetail error with detail lines

func IMATeapotf

func IMATeapotf(format string, args ...interface{}) *Fail

IMATeapotf error with message

func ImUsed

func ImUsed(msg ...interface{}) *Fail

ImUsed error with message

func ImUsedDetail

func ImUsedDetail(detail []string) *Fail

ImUsedDetail error with detail lines

func ImUsedf

func ImUsedf(format string, args ...interface{}) *Fail

ImUsedf error with message

func InsufficientStorage

func InsufficientStorage(msg ...interface{}) *Fail

InsufficientStorage error with message

func InsufficientStorageDetail

func InsufficientStorageDetail(detail []string) *Fail

InsufficientStorageDetail error with detail lines

func InsufficientStoragef

func InsufficientStoragef(format string, args ...interface{}) *Fail

InsufficientStoragef error with message

func InternalServerError

func InternalServerError(msg ...interface{}) *Fail

InternalServerError error with message

func InternalServerErrorDetail

func InternalServerErrorDetail(detail []string) *Fail

InternalServerErrorDetail error with detail lines

func InternalServerErrorf

func InternalServerErrorf(format string, args ...interface{}) *Fail

InternalServerErrorf error with message

func LengthRequired

func LengthRequired(msg ...interface{}) *Fail

LengthRequired error with message

func LengthRequiredDetail

func LengthRequiredDetail(detail []string) *Fail

LengthRequiredDetail error with detail lines

func LengthRequiredf

func LengthRequiredf(format string, args ...interface{}) *Fail

LengthRequiredf error with message

func Locked

func Locked(msg ...interface{}) *Fail

Locked error with message

func LockedDetail

func LockedDetail(detail []string) *Fail

LockedDetail error with detail lines

func Lockedf

func Lockedf(format string, args ...interface{}) *Fail

Lockedf error with message

func LoopDetected

func LoopDetected(msg ...interface{}) *Fail

LoopDetected error with message

func LoopDetectedDetail

func LoopDetectedDetail(detail []string) *Fail

LoopDetectedDetail error with detail lines

func LoopDetectedf

func LoopDetectedf(format string, args ...interface{}) *Fail

LoopDetectedf error with message

func MethodNotAllowed

func MethodNotAllowed(msg ...interface{}) *Fail

MethodNotAllowed error with message

func MethodNotAllowedDetail

func MethodNotAllowedDetail(detail []string) *Fail

MethodNotAllowedDetail error with detail lines

func MethodNotAllowedf

func MethodNotAllowedf(format string, args ...interface{}) *Fail

MethodNotAllowedf error with message

func MisdirectedRequest

func MisdirectedRequest(msg ...interface{}) *Fail

MisdirectedRequest error with message

func MisdirectedRequestDetail

func MisdirectedRequestDetail(detail []string) *Fail

MisdirectedRequestDetail error with detail lines

func MisdirectedRequestf

func MisdirectedRequestf(format string, args ...interface{}) *Fail

MisdirectedRequestf error with message

func MovedPermanently

func MovedPermanently(msg ...interface{}) *Fail

MovedPermanently error with message

func MovedPermanentlyDetail

func MovedPermanentlyDetail(detail []string) *Fail

MovedPermanentlyDetail error with detail lines

func MovedPermanentlyf

func MovedPermanentlyf(format string, args ...interface{}) *Fail

MovedPermanentlyf error with message

func MultiStatus

func MultiStatus(msg ...interface{}) *Fail

MultiStatus error with message

func MultiStatusDetail

func MultiStatusDetail(detail []string) *Fail

MultiStatusDetail error with detail lines

func MultiStatusf

func MultiStatusf(format string, args ...interface{}) *Fail

MultiStatusf error with message

func MultipleChoices

func MultipleChoices(msg ...interface{}) *Fail

MultipleChoices error with message

func MultipleChoicesDetail

func MultipleChoicesDetail(detail []string) *Fail

MultipleChoicesDetail error with detail lines

func MultipleChoicesf

func MultipleChoicesf(format string, args ...interface{}) *Fail

MultipleChoicesf error with message

func NetworkAuthenticationRequired

func NetworkAuthenticationRequired(msg ...interface{}) *Fail

NetworkAuthenticationRequired error with message

func NetworkAuthenticationRequiredDetail

func NetworkAuthenticationRequiredDetail(detail []string) *Fail

NetworkAuthenticationRequiredDetail error with detail lines

func NetworkAuthenticationRequiredf

func NetworkAuthenticationRequiredf(format string, args ...interface{}) *Fail

NetworkAuthenticationRequiredf error with message

func NetworkConnectTimeoutError

func NetworkConnectTimeoutError(msg ...interface{}) *Fail

NetworkConnectTimeoutError error with message

func NetworkConnectTimeoutErrorDetail

func NetworkConnectTimeoutErrorDetail(detail []string) *Fail

NetworkConnectTimeoutErrorDetail error with detail lines

func NetworkConnectTimeoutErrorf

func NetworkConnectTimeoutErrorf(format string, args ...interface{}) *Fail

NetworkConnectTimeoutErrorf error with message

func NoContent

func NoContent(msg ...interface{}) *Fail

NoContent error with message

func NoContentDetail

func NoContentDetail(detail []string) *Fail

NoContentDetail error with detail lines

func NoContentf

func NoContentf(format string, args ...interface{}) *Fail

NoContentf error with message

func NonAuthoritativeInformation

func NonAuthoritativeInformation(msg ...interface{}) *Fail

NonAuthoritativeInformation error with message

func NonAuthoritativeInformationDetail

func NonAuthoritativeInformationDetail(detail []string) *Fail

NonAuthoritativeInformationDetail error with detail lines

func NonAuthoritativeInformationf

func NonAuthoritativeInformationf(format string, args ...interface{}) *Fail

NonAuthoritativeInformationf error with message

func NotAcceptable

func NotAcceptable(msg ...interface{}) *Fail

NotAcceptable error with message

func NotAcceptableDetail

func NotAcceptableDetail(detail []string) *Fail

NotAcceptableDetail error with detail lines

func NotAcceptablef

func NotAcceptablef(format string, args ...interface{}) *Fail

NotAcceptablef error with message

func NotExtended

func NotExtended(msg ...interface{}) *Fail

NotExtended error with message

func NotExtendedDetail

func NotExtendedDetail(detail []string) *Fail

NotExtendedDetail error with detail lines

func NotExtendedf

func NotExtendedf(format string, args ...interface{}) *Fail

NotExtendedf error with message

func NotFound

func NotFound(msg ...interface{}) *Fail

NotFound error with message

func NotFoundDetail

func NotFoundDetail(detail []string) *Fail

NotFoundDetail error with detail lines

func NotFoundf

func NotFoundf(format string, args ...interface{}) *Fail

NotFoundf error with message

func NotImplemented

func NotImplemented(msg ...interface{}) *Fail

NotImplemented error with message

func NotImplementedDetail

func NotImplementedDetail(detail []string) *Fail

NotImplementedDetail error with detail lines

func NotImplementedf

func NotImplementedf(format string, args ...interface{}) *Fail

NotImplementedf error with message

func NotModified

func NotModified(msg ...interface{}) *Fail

NotModified error with message

func NotModifiedDetail

func NotModifiedDetail(detail []string) *Fail

NotModifiedDetail error with detail lines

func NotModifiedf

func NotModifiedf(format string, args ...interface{}) *Fail

NotModifiedf error with message

func Ok

func Ok(msg ...interface{}) *Fail

Ok error with message

func OkDetail

func OkDetail(detail []string) *Fail

OkDetail error with detail lines

func Okf

func Okf(format string, args ...interface{}) *Fail

Okf error with message

func PartialContent

func PartialContent(msg ...interface{}) *Fail

PartialContent error with message

func PartialContentDetail

func PartialContentDetail(detail []string) *Fail

PartialContentDetail error with detail lines

func PartialContentf

func PartialContentf(format string, args ...interface{}) *Fail

PartialContentf error with message

func PayloadTooLarge

func PayloadTooLarge(msg ...interface{}) *Fail

PayloadTooLarge error with message

func PayloadTooLargeDetail

func PayloadTooLargeDetail(detail []string) *Fail

PayloadTooLargeDetail error with detail lines

func PayloadTooLargef

func PayloadTooLargef(format string, args ...interface{}) *Fail

PayloadTooLargef error with message

func PaymentRequired

func PaymentRequired(msg ...interface{}) *Fail

PaymentRequired error with message

func PaymentRequiredDetail

func PaymentRequiredDetail(detail []string) *Fail

PaymentRequiredDetail error with detail lines

func PaymentRequiredf

func PaymentRequiredf(format string, args ...interface{}) *Fail

PaymentRequiredf error with message

func PermanentRedirect

func PermanentRedirect(msg ...interface{}) *Fail

PermanentRedirect error with message

func PermanentRedirectDetail

func PermanentRedirectDetail(detail []string) *Fail

PermanentRedirectDetail error with detail lines

func PermanentRedirectf

func PermanentRedirectf(format string, args ...interface{}) *Fail

PermanentRedirectf error with message

func PreconditionFailed

func PreconditionFailed(msg ...interface{}) *Fail

PreconditionFailed error with message

func PreconditionFailedDetail

func PreconditionFailedDetail(detail []string) *Fail

PreconditionFailedDetail error with detail lines

func PreconditionFailedf

func PreconditionFailedf(format string, args ...interface{}) *Fail

PreconditionFailedf error with message

func PreconditionRequired

func PreconditionRequired(msg ...interface{}) *Fail

PreconditionRequired error with message

func PreconditionRequiredDetail

func PreconditionRequiredDetail(detail []string) *Fail

PreconditionRequiredDetail error with detail lines

func PreconditionRequiredf

func PreconditionRequiredf(format string, args ...interface{}) *Fail

PreconditionRequiredf error with message

func Processing

func Processing(msg ...interface{}) *Fail

Processing error with message

func ProcessingDetail

func ProcessingDetail(detail []string) *Fail

ProcessingDetail error with detail lines

func Processingf

func Processingf(format string, args ...interface{}) *Fail

Processingf error with message

func ProxyAuthenticationRequired

func ProxyAuthenticationRequired(msg ...interface{}) *Fail

ProxyAuthenticationRequired error with message

func ProxyAuthenticationRequiredDetail

func ProxyAuthenticationRequiredDetail(detail []string) *Fail

ProxyAuthenticationRequiredDetail error with detail lines

func ProxyAuthenticationRequiredf

func ProxyAuthenticationRequiredf(format string, args ...interface{}) *Fail

ProxyAuthenticationRequiredf error with message

func RequestHeaderFieldsTooLarge

func RequestHeaderFieldsTooLarge(msg ...interface{}) *Fail

RequestHeaderFieldsTooLarge error with message

func RequestHeaderFieldsTooLargeDetail

func RequestHeaderFieldsTooLargeDetail(detail []string) *Fail

RequestHeaderFieldsTooLargeDetail error with detail lines

func RequestHeaderFieldsTooLargef

func RequestHeaderFieldsTooLargef(format string, args ...interface{}) *Fail

RequestHeaderFieldsTooLargef error with message

func RequestTimeout

func RequestTimeout(msg ...interface{}) *Fail

RequestTimeout error with message

func RequestTimeoutDetail

func RequestTimeoutDetail(detail []string) *Fail

RequestTimeoutDetail error with detail lines

func RequestTimeoutf

func RequestTimeoutf(format string, args ...interface{}) *Fail

RequestTimeoutf error with message

func RequestURITooLong

func RequestURITooLong(msg ...interface{}) *Fail

RequestURITooLong error with message

func RequestURITooLongDetail

func RequestURITooLongDetail(detail []string) *Fail

RequestURITooLongDetail error with detail lines

func RequestURITooLongf

func RequestURITooLongf(format string, args ...interface{}) *Fail

RequestURITooLongf error with message

func RequestedRangeNotSatisfiable

func RequestedRangeNotSatisfiable(msg ...interface{}) *Fail

RequestedRangeNotSatisfiable error with message

func RequestedRangeNotSatisfiableDetail

func RequestedRangeNotSatisfiableDetail(detail []string) *Fail

RequestedRangeNotSatisfiableDetail error with detail lines

func RequestedRangeNotSatisfiablef

func RequestedRangeNotSatisfiablef(format string, args ...interface{}) *Fail

RequestedRangeNotSatisfiablef error with message

func ResetContent

func ResetContent(msg ...interface{}) *Fail

ResetContent error with message

func ResetContentDetail

func ResetContentDetail(detail []string) *Fail

ResetContentDetail error with detail lines

func ResetContentf

func ResetContentf(format string, args ...interface{}) *Fail

ResetContentf error with message

func SeeOther

func SeeOther(msg ...interface{}) *Fail

SeeOther error with message

func SeeOtherDetail

func SeeOtherDetail(detail []string) *Fail

SeeOtherDetail error with detail lines

func SeeOtherf

func SeeOtherf(format string, args ...interface{}) *Fail

SeeOtherf error with message

func ServiceUnavailable

func ServiceUnavailable(msg ...interface{}) *Fail

ServiceUnavailable error with message

func ServiceUnavailableDetail

func ServiceUnavailableDetail(detail []string) *Fail

ServiceUnavailableDetail error with detail lines

func ServiceUnavailablef

func ServiceUnavailablef(format string, args ...interface{}) *Fail

ServiceUnavailablef error with message

func SwitchingProtocols

func SwitchingProtocols(msg ...interface{}) *Fail

SwitchingProtocols error with message

func SwitchingProtocolsDetail

func SwitchingProtocolsDetail(detail []string) *Fail

SwitchingProtocolsDetail error with detail lines

func SwitchingProtocolsf

func SwitchingProtocolsf(format string, args ...interface{}) *Fail

SwitchingProtocolsf error with message

func TemporaryRedirect

func TemporaryRedirect(msg ...interface{}) *Fail

TemporaryRedirect error with message

func TemporaryRedirectDetail

func TemporaryRedirectDetail(detail []string) *Fail

TemporaryRedirectDetail error with detail lines

func TemporaryRedirectf

func TemporaryRedirectf(format string, args ...interface{}) *Fail

TemporaryRedirectf error with message

func TooManyRequests

func TooManyRequests(msg ...interface{}) *Fail

TooManyRequests error with message

func TooManyRequestsDetail

func TooManyRequestsDetail(detail []string) *Fail

TooManyRequestsDetail error with detail lines

func TooManyRequestsf

func TooManyRequestsf(format string, args ...interface{}) *Fail

TooManyRequestsf error with message

func Unauthorized

func Unauthorized(msg ...interface{}) *Fail

Unauthorized error with message

func UnauthorizedDetail

func UnauthorizedDetail(detail []string) *Fail

UnauthorizedDetail error with detail lines

func Unauthorizedf

func Unauthorizedf(format string, args ...interface{}) *Fail

Unauthorizedf error with message

func UnavailableForLegalReasons

func UnavailableForLegalReasons(msg ...interface{}) *Fail

UnavailableForLegalReasons error with message

func UnavailableForLegalReasonsDetail

func UnavailableForLegalReasonsDetail(detail []string) *Fail

UnavailableForLegalReasonsDetail error with detail lines

func UnavailableForLegalReasonsf

func UnavailableForLegalReasonsf(format string, args ...interface{}) *Fail

UnavailableForLegalReasonsf error with message

func UnprocessableEntity

func UnprocessableEntity(msg ...interface{}) *Fail

UnprocessableEntity error with message

func UnprocessableEntityDetail

func UnprocessableEntityDetail(detail []string) *Fail

UnprocessableEntityDetail error with detail lines

func UnprocessableEntityf

func UnprocessableEntityf(format string, args ...interface{}) *Fail

UnprocessableEntityf error with message

func UnsupportedMediaType

func UnsupportedMediaType(msg ...interface{}) *Fail

UnsupportedMediaType error with message

func UnsupportedMediaTypeDetail

func UnsupportedMediaTypeDetail(detail []string) *Fail

UnsupportedMediaTypeDetail error with detail lines

func UnsupportedMediaTypef

func UnsupportedMediaTypef(format string, args ...interface{}) *Fail

UnsupportedMediaTypef error with message

func UpgradeRequired

func UpgradeRequired(msg ...interface{}) *Fail

UpgradeRequired error with message

func UpgradeRequiredDetail

func UpgradeRequiredDetail(detail []string) *Fail

UpgradeRequiredDetail error with detail lines

func UpgradeRequiredf

func UpgradeRequiredf(format string, args ...interface{}) *Fail

UpgradeRequiredf error with message

func UseProxy

func UseProxy(msg ...interface{}) *Fail

UseProxy error with message

func UseProxyDetail

func UseProxyDetail(detail []string) *Fail

UseProxyDetail error with detail lines

func UseProxyf

func UseProxyf(format string, args ...interface{}) *Fail

UseProxyf error with message

func VariantAlsoNegotiates

func VariantAlsoNegotiates(msg ...interface{}) *Fail

VariantAlsoNegotiates error with message

func VariantAlsoNegotiatesDetail

func VariantAlsoNegotiatesDetail(detail []string) *Fail

VariantAlsoNegotiatesDetail error with detail lines

func VariantAlsoNegotiatesf

func VariantAlsoNegotiatesf(format string, args ...interface{}) *Fail

VariantAlsoNegotiatesf error with message

func (*Fail) Error

func (f *Fail) Error() string

func (*Fail) PrettyFail

func (f *Fail) PrettyFail() PrettyFail

func (*Fail) Safe

func (f *Fail) Safe() *Fail

func (*Fail) Source

func (f *Fail) Source() *Fail

type PrettyFail

type PrettyFail interface {
	PrettyFail() PrettyFail
}

type PrettyFailSrc

type PrettyFailSrc interface {
	Source() *Fail
}

Jump to

Keyboard shortcuts

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