Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpReqAndResp ¶
func DumpReqAndResp() gin.HandlerFunc
DumpReqAndResp dumps request and response. NOTICE: it will be expose some sensitive data.
func JSONRenderWrap ¶
func JSONRenderWrap(next func(*gin.Context) error) gin.HandlerFunc
JSONRenderWrap to write valid response.
func RegisterError ¶
RegisterError register error to RenderWrap
Types ¶
type JSONRenderBody ¶
type JSONRenderBody struct { Status int `json:"status"` Msg string `json:"msg"` Data interface{} `json:"data"` }
RenderBody json render layout.
type MockJSONBinder ¶
type MockJSONBinder struct {
// contains filtered or unexported fields
}
MockJSONBinder json binder for mock.
Click to show internal directories.
Click to hide internal directories.