Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(handler APIHandler) gin.HandlerFunc
Types ¶
type APIHandler ¶
type ImportYYetsAPI ¶
type ImportYYetsAPI struct { Params struct { Username string `json:"username"` Password string `json:"password"` } `http:"json"` DB *gorm.DB }
func (*ImportYYetsAPI) Handle ¶
func (i *ImportYYetsAPI) Handle() (*Response, error)
type Response ¶
type Response struct { ErrorCode int `json:"error_code"` Msg string `json:"msg"` Data interface{} `json:"data,omitempty"` }
func ErrorReturn ¶
func ErrorReturn(msg interface{}) *Response
func SuccessReturn ¶
func SuccessReturn(data ...interface{}) *Response
Click to show internal directories.
Click to hide internal directories.