Documentation ¶
Index ¶
- Variables
- func AppRecover()
- type AppError
- func ErrCannotCreateEntity(entity string, err error) *AppError
- func ErrCannotDeleteEntity(entity string, err error) *AppError
- func ErrCannotDeleteSessionID(err error) *AppError
- func ErrCannotGetEntity(entity string, err error) *AppError
- func ErrCannotListEntity(entity string, err error) *AppError
- func ErrCannotUpdateEntity(entity string, err error) *AppError
- func ErrDB(err error) *AppError
- func ErrEntityDeleted(entity string, err error) *AppError
- func ErrEntityExisted(entity string, err error) *AppError
- func ErrEntityNotFound(entity string, err error) *AppError
- func ErrInternal(err error) *AppError
- func ErrInvalidRequest(err error) *AppError
- func ErrNoPermission(err error) *AppError
- func NewCustomError(root error, msg string, key string) *AppError
- func NewErrorResponse(root error, msg, log, key string) *AppError
- func NewFullErrorResponse(statusCode int, root error, msg, log, key string) *AppError
- func NewUnauthorized(root error, msg, key string) *AppError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RecordNotFound = errors.New("record not found")
)
Functions ¶
func AppRecover ¶
func AppRecover()
Types ¶
type AppError ¶
type AppError struct { StatusCode int `json:"status_code"` RootErr error `json:"-"` Message string `json:"message"` Log string `json:"log"` Key string `json:"error_key"` }
func ErrCannotCreateEntity ¶
func ErrCannotDeleteEntity ¶
func ErrCannotGetEntity ¶
func ErrCannotListEntity ¶
func ErrCannotUpdateEntity ¶
func ErrEntityDeleted ¶
func ErrEntityExisted ¶
func ErrEntityNotFound ¶
func ErrInternal ¶
func ErrInvalidRequest ¶
func ErrNoPermission ¶
func NewErrorResponse ¶
func NewFullErrorResponse ¶
func NewUnauthorized ¶
Click to show internal directories.
Click to hide internal directories.