Documentation ¶
Overview ¶
Package errors provides a way to return detailed information for an RPC request error. The error is normally JSON encoded.
Index ¶
- func BadGateway(id, format string, a ...interface{}) error
- func BadRequest(id, format string, a ...interface{}) error
- func Conflict(id, format string, a ...interface{}) error
- func Equal(err1 error, err2 error) bool
- func Forbidden(id, format string, a ...interface{}) error
- func GatewayTimeout(id, format string, a ...interface{}) error
- func InternalServerError(id, format string, a ...interface{}) error
- func MethodNotAllowed(id, format string, a ...interface{}) error
- func New(id, detail string, code int32) error
- func NotFound(id, format string, a ...interface{}) error
- func NotImplemented(id, format string, a ...interface{}) error
- func ServiceUnavailable(id, format string, a ...interface{}) error
- func Timeout(id, format string, a ...interface{}) error
- func Unauthorized(id, format string, a ...interface{}) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadGateway ¶
BadGateway generates a 502 error
func BadRequest ¶
BadRequest generates a 400 error.
func GatewayTimeout ¶
GatewayTimeout generates a 504 error
func InternalServerError ¶
InternalServerError generates a 500 error.
func MethodNotAllowed ¶
MethodNotAllowed generates a 405 error.
func NotImplemented ¶
NotImplemented generates a 501 error
func ServiceUnavailable ¶
ServiceUnavailable generates a 503 error
func Unauthorized ¶
Unauthorized generates a 401 error.
Types ¶
Click to show internal directories.
Click to hide internal directories.