Documentation ¶
Index ¶
- Variables
- func Is(err error, code int) bool
- func Wrapper(fn func(err error) *Serr)
- type Serr
- func BadRequest(err error, args ...string) *Serr
- func Conflict(err ...error) *Serr
- func Forbidden(err error, args ...string) *Serr
- func InternalServerError(err ...error) *Serr
- func New(code int, args ...string) *Serr
- func NotFound(typ string, id string, err ...error) *Serr
- func Unauthorized(err error, args ...string) *Serr
- func Wrap(err error, args ...string) *Serr
- func Wrapc(err error, code int, args ...string) *Serr
Constants ¶
This section is empty.
Variables ¶
View Source
var Service string
Service the service name
Functions ¶
Types ¶
type Serr ¶
type Serr struct { Code int `json:"code"` Key string `json:"key"` Srv string `json:"service,omitempty"` Msg string `json:"message,omitempty"` Origin string `json:"origin,omitempty"` }
Serr error model
func InternalServerError ¶
InternalServerError not found error
func Unauthorized ¶
Unauthorized unauthorized error
Click to show internal directories.
Click to hide internal directories.