Documentation ¶
Index ¶
- Constants
- type JsonResult
- func (result *JsonResult) Fail() *JsonResult
- func (result *JsonResult) FailMessage(msg string) *JsonResult
- func (p *JsonResult) GetData() string
- func (p *JsonResult) SetData(s string)
- func (result *JsonResult) String() string
- func (result *JsonResult) Success() *JsonResult
- func (result *JsonResult) SuccessData(data string) *JsonResult
- func (result *JsonResult) SuccessMessage(msg string, data string) *JsonResult
- func (result *JsonResult) ToString() string
- type PageParam
- type PageResult
- type QueryParam
Constants ¶
View Source
const CODE_FAIL = CODE_SERVER_ERR
View Source
const CODE_NOFOUND_RECORD = 501
View Source
const CODE_REQUEST_BAD = 400
View Source
const CODE_SERVER_ERR = 500
View Source
const CODE_SUCCESS = 200
View Source
const CURRENT = 0
View Source
const PAGE_SIZE = 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonResult ¶
type JsonResult struct { Code int32 `json:"code"` Msg string `json:"msg"` Data string `json:"data"` }
func (*JsonResult) Fail ¶
func (result *JsonResult) Fail() *JsonResult
func (*JsonResult) FailMessage ¶
func (result *JsonResult) FailMessage(msg string) *JsonResult
func (*JsonResult) GetData ¶
func (p *JsonResult) GetData() string
func (*JsonResult) SetData ¶
func (p *JsonResult) SetData(s string)
func (*JsonResult) String ¶
func (result *JsonResult) String() string
func (*JsonResult) Success ¶
func (result *JsonResult) Success() *JsonResult
func (*JsonResult) SuccessData ¶
func (result *JsonResult) SuccessData(data string) *JsonResult
func (*JsonResult) SuccessMessage ¶
func (result *JsonResult) SuccessMessage(msg string, data string) *JsonResult
func (*JsonResult) ToString ¶
func (result *JsonResult) ToString() string
type PageParam ¶
type PageResult ¶
type PageResult struct { JsonResult Page PageParam `json:"data"` Data []interface{} `json:"data"` }
func (*PageResult) String ¶
func (pageResult *PageResult) String() string
func (*PageResult) ToString ¶
func (pageResult *PageResult) ToString() string
type QueryParam ¶
type QueryParam struct { Current int32 `json:"current"` PageSize int32 `json:"page_size"` OrderBys *string `json:"order_bys"` FuzzyQuery bool `json:"fuzzy_query"` EsQuery bool `json:"es_query"` Param model.ParamBase `json:"param"` }
func (*QueryParam) String ¶
func (param *QueryParam) String() string
func (*QueryParam) ToString ¶
func (param *QueryParam) ToString() string
Click to show internal directories.
Click to hide internal directories.