Documentation
¶
Index ¶
- Constants
- func GetErrorCode(err error) int
- func GetMessage(code int) string
- func IsAppError(err error) bool
- type AppError
- func BadRequest(message string) *AppError
- func Conflict(message string) *AppError
- func Forbidden(message string) *AppError
- func InternalError(message string) *AppError
- func New(code int, message string) *AppError
- func NotFound(message string) *AppError
- func Unauthorized(message string) *AppError
- func Wrap(code int, message string, cause error) *AppError
Constants ¶
View Source
const ( CodeSuccess = 0 CodeBadRequest = 1001 CodeForbidden = 1003 CodeNotFound = 1004 CodeConflict = 1005 CodeInternalError = 1006 CodeTooManyRequests = 1008 )
Variables ¶
This section is empty.
Functions ¶
func GetErrorCode ¶
func GetMessage ¶
func IsAppError ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.