Documentation ¶
Index ¶
- type Result
- func (r *Result) JSON(c *gin.Context)
- func (r *Result) PutData(field string, data interface{}) *Result
- func (r *Result) Response(w http.ResponseWriter)
- func (r *Result) SetCode(code int32) *Result
- func (r *Result) SetData(data interface{}) *Result
- func (r *Result) SetMessage(message string) *Result
- func (r *Result) SetPage(count int32, page int32, limit int32, data interface{}) *Result
- func (r *Result) XML(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { Code int32 `json:"code"` Message string `json:"message"` Data *xlinkedhashmap.LinkedHashMap `json:"data,omitempty"` }
@Model Result @Description Global return data @Property code integer true "response code" @Property message string true "response message"
func Error ¶
func Error(se *exception.ServerError) *Result
func (*Result) Response ¶
func (r *Result) Response(w http.ResponseWriter)
func (*Result) SetMessage ¶
Click to show internal directories.
Click to hide internal directories.