Versions in this module Expand all Collapse all v1 v1.0.0 Jun 7, 2022 Changes in this version + var ErrAssertion = errors.New("Assertion") + var ErrCreate = errors.New("Cannot create record") + var ErrDatabase = errors.New("Database") + var ErrDelete = errors.New("Cannot delete record") + var ErrDuplicated = errors.New("Duplicated record") + var ErrForbidden = errors.New("Forbidden") + var ErrInternal = errors.New("Internal") + var ErrNotFound = errors.New("Record not found") + var ErrUnauthorized = errors.New("Unauthorized") + var ErrUpdate = errors.New("Cannot update record") + var ErrValidation = errors.New("Validation") + func IsKind(err error, kind error) bool + func IsRootOfKind(err error, kind error) bool + type Error struct + HTTPStatusCode int + ID int + Kind error + Message string + func (e *Error) MarshalJSON() ([]byte, error) + func (e *Error) StatusCode() int + func (e Error) Error() string + type ErrorStack struct + Errors []Error + func Assertion(e interface{}) *ErrorStack + func Create(e interface{}, extras ...string) *ErrorStack + func Database(e interface{}) *ErrorStack + func Default(e interface{}) *ErrorStack + func Delete(e interface{}) *ErrorStack + func Duplicated(e interface{}) *ErrorStack + func Forbidden(e interface{}) *ErrorStack + func MethodNotAllowed(e interface{}) *ErrorStack + func NotFound(e interface{}) *ErrorStack + func Unauthorized(e interface{}) *ErrorStack + func Update(e interface{}) *ErrorStack + func Validation(e interface{}, extras ...string) *ErrorStack + func (e *ErrorStack) MarshalJSON() ([]byte, error) + func (e *ErrorStack) StatusCode() int + func (e *ErrorStack) UnmarshalJSON(data []byte) error + func (e ErrorStack) Error() string