Documentation
¶
Index ¶
- Constants
- func WrapSqlError(err error) error
- type ErrorResult
- func FromError(err error) (*ErrorResult, bool)
- func WrapError(err error, msg string, status int) *ErrorResult
- func WrapForbiddenError(err error, msg string) *ErrorResult
- func WrapInternalError(err error) *ErrorResult
- func WrapNotFoundError(err error, msg string) *ErrorResult
- func WrapValidationError(err error) *ErrorResult
Constants ¶
View Source
const ( ValidationErrorMessage string = "validation error: incorrect params" NotFoundMessage string = "not found" InternalErrorMessage string = "internal error" )
Variables ¶
This section is empty.
Functions ¶
func WrapSqlError ¶
Types ¶
type ErrorResult ¶
func FromError ¶
func FromError(err error) (*ErrorResult, bool)
func WrapForbiddenError ¶
func WrapForbiddenError(err error, msg string) *ErrorResult
func WrapInternalError ¶
func WrapInternalError(err error) *ErrorResult
func WrapNotFoundError ¶
func WrapNotFoundError(err error, msg string) *ErrorResult
func WrapValidationError ¶
func WrapValidationError(err error) *ErrorResult
func (*ErrorResult) Error ¶
func (e *ErrorResult) Error() string
Click to show internal directories.
Click to hide internal directories.