Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MimeTypeByName ¶
Types ¶
type Coco ¶
type Coco struct { Request *http.Request ResponseWriter http.ResponseWriter Params httprouter.Params Header map[string]string // contains filtered or unexported fields }
Coco Framework
type Result ¶
type Result struct { Type string `json:"-"` // object or binary Code int `json:"code"` Data interface{} `json:"data"` BinaryData []byte `json:"-"` Message string `json:"message"` FileName string `json:"-"` }
Result 返回结果
func APIResponse ¶
func APIResponse(data interface{}) Result
func ErrorResponse ¶
func FileResponse ¶
Click to show internal directories.
Click to hide internal directories.