result

package
v0.0.0-...-92ef796 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 Ok

func Ok() *Result

func Status

func Status(code int32) *Result

func (*Result) JSON

func (r *Result) JSON(c *gin.Context)

func (*Result) PutData

func (r *Result) PutData(field string, data interface{}) *Result

func (*Result) Response

func (r *Result) Response(w http.ResponseWriter)

func (*Result) SetCode

func (r *Result) SetCode(code int32) *Result

func (*Result) SetData

func (r *Result) SetData(data interface{}) *Result

func (*Result) SetMessage

func (r *Result) SetMessage(message string) *Result

func (*Result) SetPage

func (r *Result) SetPage(count int32, page int32, limit int32, data interface{}) *Result

func (*Result) XML

func (r *Result) XML(c *gin.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL