Documentation
¶
Index ¶
- func Contains(a error, b error) (has bool)
- type CodeError
- func As(err error) (e CodeError, ok bool)
- func BadRequest(message string) CodeError
- func Decode(p []byte) (err CodeError)
- func Empty() CodeError
- func Forbidden(message string) CodeError
- func Map(err error) (codeErr CodeError)
- func New(code int, name string, message string) CodeError
- func NewWithDepth(code int, name string, message string, skip int) CodeError
- func NilError() CodeError
- func NotAcceptable(message string) CodeError
- func NotFound(message string) CodeError
- func NotImplemented(message string) CodeError
- func ServiceError(message string) CodeError
- func Timeout(message string) CodeError
- func TooEarly(message string) CodeError
- func TooMayRequest(message string) CodeError
- func Unauthorized(message string) CodeError
- func Unavailable(message string) CodeError
- func Warning(message string) CodeError
- type Errors
- type JoinedErrors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodeError ¶
type CodeError interface {
Id() string
Code() int
Name() string
Message() string
Stacktrace() (fn string, file string, line int)
WithMeta(key string, value string) (err CodeError)
WithCause(cause error) (err CodeError)
Contains(err error) (has bool)
Error() string
Format(state fmt.State, r rune)
String() string
}
func BadRequest ¶ added in v1.4.0
func NewWithDepth ¶ added in v1.3.0
func NotAcceptable ¶ added in v1.4.0
func NotImplemented ¶ added in v1.4.0
func ServiceError ¶
func TooMayRequest ¶ added in v1.13.6
func Unauthorized ¶ added in v1.4.0
func Unavailable ¶ added in v1.4.0
type Errors ¶ added in v1.13.0
type Errors []CodeError
func MakeErrors ¶ added in v1.13.0
func MakeErrors() Errors
type JoinedErrors ¶ added in v1.13.6
type JoinedErrors interface {
Unwrap() []error
}
Click to show internal directories.
Click to hide internal directories.