apierrors

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrResponse

type ErrResponse struct {
	jsonapi.Response
}

func NewErrResponse

func NewErrResponse() *ErrResponse

func NewErrResponseFromErrorObject

func NewErrResponseFromErrorObject(err *jsonapi.ErrorObject) *ErrResponse

func NewErrResponseFromErrorObjects

func NewErrResponseFromErrorObjects(errs ...*jsonapi.ErrorObject) *ErrResponse

func (*ErrResponse) HttpStatus

func (e *ErrResponse) HttpStatus() int

func (*ErrResponse) WithError

func (e *ErrResponse) WithError(err *Error) *ErrResponse

func (*ErrResponse) WithValidationError

func (e *ErrResponse) WithValidationError(err error) *ErrResponse

type Error

type Error struct {
	*jsonapi.ErrorObject
	// contains filtered or unexported fields
}

func NewErrBadRequest

func NewErrBadRequest() *Error

func NewErrForbidden

func NewErrForbidden() *Error

func NewErrInternal

func NewErrInternal() *Error

func NewErrInvalidArgument

func NewErrInvalidArgument() *Error

func NewErrNotFound

func NewErrNotFound() *Error

func NewErrPaymentRequired

func NewErrPaymentRequired() *Error

func NewErrPermissionDenied

func NewErrPermissionDenied() *Error

func NewErrQuotaExceeded

func NewErrQuotaExceeded() *Error

func NewErrTimeout

func NewErrTimeout() *Error

func NewErrUnauthorized

func NewErrUnauthorized() *Error

func NewErrUnavailable

func NewErrUnavailable() *Error

func NewError

func NewError[S ~int, GS ~uint32](status S, grpcStatus GS, code string) *Error

func (*Error) AsEchoResponse

func (e *Error) AsEchoResponse(c echo.Context) error

func (*Error) AsResponse

func (e *Error) AsResponse() *ErrResponse

func (*Error) AsStatus

func (e *Error) AsStatus() error

func (*Error) Caller

func (e *Error) Caller() *jsonapi.ErrorCaller

func (*Error) WithCaller

func (e *Error) WithCaller() *Error

func (*Error) WithDetail

func (e *Error) WithDetail(detail string) *Error

func (*Error) WithDetailf

func (e *Error) WithDetailf(format string, args ...interface{}) *Error

func (*Error) WithError

func (e *Error) WithError(err error) *Error

func (*Error) WithSourceHeader

func (e *Error) WithSourceHeader(header string) *Error

func (*Error) WithSourceParameter

func (e *Error) WithSourceParameter(parameter string) *Error

func (*Error) WithSourcePointer

func (e *Error) WithSourcePointer(pointer string) *Error

func (*Error) WithTitle

func (e *Error) WithTitle(title string) *Error

func (*Error) WithValidationError

func (e *Error) WithValidationError(err error) *Error

Jump to

Keyboard shortcuts

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