Documentation
¶
Index ¶
Constants ¶
View Source
const ( OkCode = 0 ErrorCode = 9999 )
Variables ¶
View Source
var HttpClient *http.Client
View Source
var RedisClient *redis.Client
View Source
var SQLiteDb *gorm.DB
Functions ¶
Types ¶
type PageRequest ¶
type RestResponse ¶
type RestResponse struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func GetErrorResponse ¶
func GetErrorResponse(msg string) RestResponse
func GetOKResponse ¶
func GetOKResponse(obj interface{}) RestResponse
func (*RestResponse) SetData ¶
func (r *RestResponse) SetData(d interface{})
Click to show internal directories.
Click to hide internal directories.