Documentation ¶
Index ¶
- type PagingData
- type Response
- func ErrorResJson(code string, errMsg string) Response[any]
- func ErrorResJsonWithError(ctx iris.Context, err error) Response[any]
- func ErrorResJsonWithMsg(errMsg string) Response[any]
- func ResJson[T any](code string, data *T, msg string) Response[T]
- func SuccessResJson() Response[any]
- func SuccessResJsonWithData[T any](data *T) Response[T]
- func SuccessResJsonWithPagingData(data *PagingData) 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"` }
type Response ¶
type Response[T any] struct { Code string `json:"code"` Data *T `json:"data"` Msg string `json:"msg"` }
func ErrorResJsonWithError ¶ added in v0.10.5
func ErrorResJsonWithMsg ¶
func SuccessResJson ¶
func SuccessResJsonWithData ¶
func SuccessResJsonWithPagingData ¶
func SuccessResJsonWithPagingData(data *PagingData) Response[PagingData]
Click to show internal directories.
Click to hide internal directories.