Documentation ¶
Index ¶
- Constants
- type Result
- func (r *Result) GetCode() string
- func (r *Result) GetCount() int64
- func (r *Result) GetData() any
- func (r *Result) GetMsg() string
- func (r *Result) GetSuccess() bool
- func (r *Result) IsFinish() bool
- func (r *Result) NotOk(msg string) *Result
- func (r *Result) Ok(data any, msg string) *Result
- func (r *Result) OkWithCount(data any, msg string, count int64) *Result
- func (r *Result) SetFinish(value bool)
- func (r *Result) ToString() string
Constants ¶
View Source
const SuccessValue = "0"
View Source
const UnSuccessValue = "-1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { //Status int64 `json:"status"` // 0成功,其他失败 Count int64 `json:"count"` // 总数 Success bool `json:"success"` // 是否成功 Code string `json:"code"` //编码 Msg string `json:"msg"` // 消息 Data any `json:"data"` //请求参数 // contains filtered or unexported fields }
func (*Result) GetSuccess ¶
func (*Result) OkWithCount ¶
Click to show internal directories.
Click to hide internal directories.