Documentation ¶
Index ¶
- Constants
- type AppError
- func NewAlreadyExistError(resourceType, content string) *AppError
- func NewForbiddenError() *AppError
- func NewHertzBindError(err error) *AppError
- func NewHertzFormFileError(err error) *AppError
- func NewInternalError(err error) *AppError
- func NewInvalidError(params ...string) *AppError
- func NewNotFoundError(resourceType, content string) *AppError
- func NewUnauthorizedError(message string) *AppError
- type Error
Constants ¶
View Source
const ( InvalidCode int = iota + 1000001 ForbiddenCode NotFoundCode AlreadyExistCode InternalCode TemporaryDisabledCode TimeoutCode )
normal code of application.
View Source
const ( RouteNotFoundCode int = iota + 1100001 BindErrorCode FormFileErrorCode )
hertz code.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppError ¶
type AppError struct { Code int `json:"code"` Message string `json:"message"` Inner error `json:"-"` }
func NewAlreadyExistError ¶
func NewForbiddenError ¶
func NewForbiddenError() *AppError
func NewHertzBindError ¶
func NewHertzFormFileError ¶
func NewInternalError ¶
func NewInvalidError ¶
func NewNotFoundError ¶
func NewUnauthorizedError ¶
Click to show internal directories.
Click to hide internal directories.