Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorParam ¶
type ResultModel ¶
type ResultModel struct {
Success bool `json:"success" example:"true"`
Data interface{} `json:"data,omitempty" example:""`
Message string `json:"message,omitempty" example:""`
ErrorParams []*ErrorParam `json:"errorParams,omitempty" example:""`
}
func FailureResultWithError ¶
func FailureResultWithError(e error) *ResultModel
func FailureResultWithStr ¶
func FailureResultWithStr(msg string, v ...interface{}) *ResultModel
func SuccessResult ¶
func SuccessResult(data interface{}) *ResultModel
func ToSimResultModel ¶
func ToSimResultModel(r cm.Result) *ResultModel
type ResultPageModel ¶
type ResultPageModel struct {
Success bool `json:"success" example:"true"`
Data interface{} `json:"data" example:""`
PageNum int `json:"pageNum" example:""`
PageSize int `json:"pageSize" example:""`
TotalCount int `json:"totalCount" example:""`
}
func SuccessPageResult ¶
func SuccessPageResult(data interface{}, pageNum int, pageSize int, totalCount int) *ResultPageModel
Click to show internal directories.
Click to hide internal directories.