Documentation
¶
Index ¶
- Variables
- func BadRequestException(ctx *fiber.Ctx, message string) error
- func ForbiddenException(ctx *fiber.Ctx, message string) error
- func InternalServerException(ctx *fiber.Ctx, message string) error
- func JSON(ctx *fiber.Ctx, status int, errcode Code, message string, data interface{}) error
- func NotFoundException(ctx *fiber.Ctx, message string) error
- func SuccessJSON(ctx *fiber.Ctx, message string, data interface{}) error
- func UnauthorizedException(ctx *fiber.Ctx, message string) error
- type Code
- type JSONResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var CodeMap = map[Code]string{ Success: "请求成功", Failed: "请求失败", UnAuthed: "用户未认证", AuthExpired: "会话过期,请重新登录", InternalErr: "服务器内部错误", RequestMethodErr: "请求方式错误", RequestParamErr: "请求参数错误", RequestFormErr: "请求表单错误", AccountInfoErr: "账号信息有误", }
Functions ¶
func BadRequestException ¶
BadRequestException 400错误
func ForbiddenException ¶
ForbiddenException 403错误
func InternalServerException ¶
InternalServerException 500错误
func NotFoundException ¶
NotFoundException 404错误
func SuccessJSON ¶
SuccessJSON 成功返回
Types ¶
type JSONResponse ¶
Click to show internal directories.
Click to hide internal directories.