Documentation ¶
Index ¶
- func APIException(c *fiber.Ctx, code int, msg string, data any) error
- func APIFailure(c *fiber.Ctx, msg string, data any) error
- func APISuccess(c *fiber.Ctx, data any, count int) error
- func APISuccessBytes(c *fiber.Ctx, data []byte, count int) error
- func APISuccessBytesData(data []byte, count int) []byte
- func APISuccessNil(c *fiber.Ctx) error
- func JSON(c *fiber.Ctx, data any) error
- func TxtException(c *fiber.Ctx, code int, msg string) error
- func TxtMsg(c *fiber.Ctx, msg string) error
- type APIData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIException ¶
APIException 通用异常处理
func APIFailure ¶
APIFailure 返回失败, 状态码: 400
func APISuccess ¶
APISuccess 返回成功, 状态码: 200
func APISuccessBytes ¶
APISuccessBytes 返回成功, JSON 字节数据, 状态码: 200
func APISuccessBytesData ¶
APISuccessBytesData API 请求成功返回值(JSON Bytes)
func TxtException ¶ added in v0.0.16
TxtException 异常处理, 文本消息
Types ¶
Click to show internal directories.
Click to hide internal directories.