Documentation ¶
Index ¶
- func Error(c *gin.Context, err error)
- func ErrorWithData(c *gin.Context, err error, data interface{})
- func GetBody(body io.ReadCloser, obj any) ([]byte, error)
- func Request(method, uri string, header map[string]string, body []byte, obj any) ([]byte, error)
- func Respone(c *gin.Context, err error, data interface{})
- func Success(c *gin.Context, data interface{})
- type PageInfo
- type ResponseData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorWithData ¶
Types ¶
type PageInfo ¶
func GetPageInfo ¶
type ResponseData ¶
type ResponseData struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
func GetResponeData ¶
func GetResponeData(body io.ReadCloser) *ResponseData
func NewResponseData ¶
func NewResponseData(code int, err error, data interface{}) *ResponseData
func NewSuccess ¶
func NewSuccess() *ResponseData
func (*ResponseData) String ¶
func (res *ResponseData) String() string
Click to show internal directories.
Click to hide internal directories.