Documentation ¶
Index ¶
- type PagingData
- type Response
- func ErrorResJson(code string, errMsg string) Response[any]
- func ErrorResJsonWithMsg(errMsg string) Response[any]
- func ResJson[T any](code string, data *T, msg string) Response[T]
- func SuccessResJson(msg string) Response[any]
- func SuccessResJsonWithData[T any](data *T, msg string) Response[T]
- func SuccessResJsonWithPagingData(data *PagingData, msg string) Response[PagingData]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PagingData ¶
type PagingData struct { *utils.Pagination Total int64 `json:"total"` Data interface{} `json:"data"` }
PagingData 四有云分页数据
type Response ¶
type Response[T any] struct { Code string `json:"code"` Data *T `json:"data"` Msg string `json:"msg"` }
Response 四有云响应结构体
func ErrorResJsonWithMsg ¶
func SuccessResJson ¶
func SuccessResJsonWithData ¶
func SuccessResJsonWithPagingData ¶
func SuccessResJsonWithPagingData(data *PagingData, msg string) Response[PagingData]
Click to show internal directories.
Click to hide internal directories.