Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinSuccess ¶
func HttpError ¶
func HttpError(w http.ResponseWriter, err error)
func HttpSuccess ¶
func HttpSuccess(w http.ResponseWriter, data any)
Types ¶
type ApiResponse ¶
type ApiResponse struct {
ErrCode int `json:"errCode"`
ErrMsg string `json:"errMsg"`
ErrDlt string `json:"errDlt"`
Data any `json:"data,omitempty"`
}
func ApiSuccess ¶
func ApiSuccess(data any) *ApiResponse
func GetGinApiResponse ¶ added in v0.0.49
func GetGinApiResponse(c *gin.Context) *ApiResponse
func ParseError ¶
func ParseError(err error) *ApiResponse
func (*ApiResponse) MarshalJSON ¶
func (r *ApiResponse) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.