Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OK request is success OK = newResponse(http.StatusOK, "ok") // Err request is failure Err = newResponse(http.StatusInternalServerError, "") )
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Code int `json:"code,omitempty"` Msg string `json:"msg,omitempty"` Data interface{} `json:"data,omitempty"` }
Response declare unite api response format
func (*Response) WithMessage ¶
WithMessage append message into response
Click to show internal directories.
Click to hide internal directories.