Documentation ¶
Index ¶
- type ErrResponse
- type Error
- func NewErrBadRequest() *Error
- func NewErrForbidden() *Error
- func NewErrInternal() *Error
- func NewErrInvalidArgument() *Error
- func NewErrNotFound() *Error
- func NewErrPaymentRequired() *Error
- func NewErrPermissionDenied() *Error
- func NewErrQuotaExceeded() *Error
- func NewErrUnauthorized() *Error
- func NewErrUnavailable() *Error
- func NewError[S ~int, GS ~uint32](status S, grpcStatus GS, code string) *Error
- func (e *Error) AsEchoResponse(c echo.Context) error
- func (e *Error) AsResponse() *ErrResponse
- func (e *Error) AsStatus() error
- func (e *Error) Caller() *jsonapi.ErrorCaller
- func (e *Error) WithCaller() *Error
- func (e *Error) WithDetail(detail string) *Error
- func (e *Error) WithDetailf(format string, args ...interface{}) *Error
- func (e *Error) WithError(err error) *Error
- func (e *Error) WithSourceHeader(header string) *Error
- func (e *Error) WithSourceParameter(parameter string) *Error
- func (e *Error) WithSourcePointer(pointer string) *Error
- func (e *Error) WithTitle(title string) *Error
- func (e *Error) WithValidationError(err error) *Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrResponse ¶
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 NewErrUnauthorized ¶
func NewErrUnauthorized() *Error
func NewErrUnavailable ¶
func NewErrUnavailable() *Error
func (*Error) AsEchoResponse ¶
func (*Error) AsResponse ¶
func (e *Error) AsResponse() *ErrResponse
func (*Error) Caller ¶
func (e *Error) Caller() *jsonapi.ErrorCaller
func (*Error) WithCaller ¶
func (*Error) WithDetail ¶
func (*Error) WithDetailf ¶
func (*Error) WithSourceHeader ¶
func (*Error) WithSourceParameter ¶
func (*Error) WithSourcePointer ¶
func (*Error) WithValidationError ¶
Click to show internal directories.
Click to hide internal directories.