Documentation ¶
Index ¶
- func Cause(err error) error
- func ErrStatus(err error) int
- func IsBadRequest(err error) bool
- func IsForbidden(err error) bool
- func IsInternalError(err error) bool
- func IsNotFound(err error) bool
- func IsUnauthorized(err error) bool
- func New(msg string) error
- func Newf(format string, v ...interface{}) error
- func ToGRPC(err error) error
- func Wrap(err error, httpError *HTTPError) error
- type HTTPError
- func BadRequest(msg string) *HTTPError
- func BadRequestf(format string, v ...interface{}) *HTTPError
- func Error(status int, msg string) *HTTPError
- func Errorf(status int, format string, v ...interface{}) *HTTPError
- func Forbidden(msg string) *HTTPError
- func Forbiddenf(format string, v ...interface{}) *HTTPError
- func FromError(err error) (*HTTPError, bool)
- func InternalError(msg string) *HTTPError
- func InternalErrorf(format string, v ...interface{}) *HTTPError
- func NotFound(msg string) *HTTPError
- func NotFoundf(format string, v ...interface{}) *HTTPError
- func NotImplement(msg string) *HTTPError
- func NotImplementf(format string, v ...interface{}) *HTTPError
- func Timeout(msg string) *HTTPError
- func Timeoutf(format string, v ...interface{}) *HTTPError
- func Unauthorized(msg string) *HTTPError
- func Unauthorizedf(format string, v ...interface{}) *HTTPError
- func Unavailable(msg string) *HTTPError
- func Unavailablef(format string, v ...interface{}) *HTTPError
- func UnknownError(msg string) *HTTPError
- func UnknownErrorf(format string, v ...interface{}) *HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBadRequest ¶
func IsForbidden ¶
func IsInternalError ¶
func IsNotFound ¶
func IsUnauthorized ¶
Types ¶
type HTTPError ¶
type HTTPError struct { Message string `json:"error"` // contains filtered or unexported fields }
func BadRequest ¶
func BadRequestf ¶
func Forbiddenf ¶
func InternalError ¶
func InternalErrorf ¶
func NotImplement ¶
func NotImplementf ¶
func Unauthorized ¶
func Unauthorizedf ¶
func Unavailable ¶
func Unavailablef ¶
func UnknownError ¶
func UnknownErrorf ¶
func (*HTTPError) MarshalLogObject ¶
func (e *HTTPError) MarshalLogObject(enc zapcore.ObjectEncoder) error
Click to show internal directories.
Click to hide internal directories.