Documentation
¶
Index ¶
- type ErrResponse
- type Error
- func NewErrBadGateway() *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 NewErrRequiredFieldMissing() *Error
- func NewErrUnauthorized() *Error
- func NewErrUnavailable() *Error
- func NewError[S ~int](status S, code string) *Error
- func NewUpstreamError(statusCode int) *Error
- func (e *Error) AsResponse() *ErrResponse
- func (e *Error) Caller() mo.Option[logs.CallerLike]
- func (e *Error) Error() string
- func (e *Error) WithCaller() *Error
- func (e *Error) WithDetail(detail string) *Error
- func (e *Error) WithDetailf(format string, args ...any) *Error
- func (e *Error) WithError(err error) *Error
- func (e *Error) WithMeta(key string, val any) *Error
- func (e *Error) WithReason(reason string) *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
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
type Error ¶
type Error struct {
*jsonapi.ErrorObject
// contains filtered or unexported fields
}
func NewErrBadGateway ¶
func NewErrBadGateway() *Error
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 NewErrRequiredFieldMissing ¶
func NewErrRequiredFieldMissing() *Error
func NewErrUnauthorized ¶
func NewErrUnauthorized() *Error
func NewErrUnavailable ¶
func NewErrUnavailable() *Error
func NewUpstreamError ¶
func (*Error) AsResponse ¶
func (e *Error) AsResponse() *ErrResponse
func (*Error) WithCaller ¶
func (*Error) WithDetail ¶
func (*Error) WithReason ¶
func (*Error) WithSourceHeader ¶
func (*Error) WithSourceParameter ¶
func (*Error) WithSourcePointer ¶
Click to show internal directories.
Click to hide internal directories.