Documentation
¶
Index ¶
- type Error
- func Forbidden(format string, v ...interface{}) *Error
- func Format(code int, format string, v ...interface{}) *Error
- func InternalServer(format string, v ...interface{}) *Error
- func MethodNotAllowed(format string, v ...interface{}) *Error
- func New(code int, message string) *Error
- func NotFound(format string, v ...interface{}) *Error
- func Parse(errStr string) *Error
- func Timeout(format string, v ...interface{}) *Error
- func Unauthorized(format string, v ...interface{}) *Error
- func With(msg string, err error) *Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error
func InternalServer ¶
InternalServerError generates a 500 error.
func MethodNotAllowed ¶
MethodNotAllowed generates a 405 error.
func Parse ¶
Parse tries to parse a JSON string into an error. If that fails, it will set the given string as the error detail.
func Unauthorized ¶
Unauthorized generates a 401 error.
Click to show internal directories.
Click to hide internal directories.