Documentation ¶
Index ¶
- func FailedOfStandard(ctx *gin.Context, code int, message string)
- func FailedWithDataOfStandard(ctx *gin.Context, code string, message string, v any)
- func ResponseHandler() gin.HandlerFunc
- func Success(ctx *gin.Context, object any)
- func SuccessOfStandard(ctx *gin.Context, v any)
- type DataArrayResponse
- type DataResponse
- type ErrorMessage
- type PagedData
- type PagedResponse
- type Request
- type Response
- type ResponseBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseHandler ¶
func ResponseHandler() gin.HandlerFunc
func SuccessOfStandard ¶
Types ¶
type DataArrayResponse ¶
type DataArrayResponse[T any] struct { ResponseBase Data []T `json:"data"` }
type DataResponse ¶
type DataResponse[T any] struct { ResponseBase Data T `json:"data"` }
type ErrorMessage ¶
type ErrorMessage struct { Request Request Response DataResponse[any] Cost string StatusCode int }
type PagedResponse ¶
type PagedResponse[T any] struct { ResponseBase Data PagedData[T] `json:"data"` }
type Response ¶ added in v1.1.1
type Response struct { Request Request Response DataResponse[any] Cost string StatusCode int }
type ResponseBase ¶
Click to show internal directories.
Click to hide internal directories.