Documentation ¶
Index ¶
- Constants
- func Resp(statusCode int, data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespFail(data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespHTML(statusCode int, data []byte, w http.ResponseWriter, headersKV ...string)
- func RespHTMLFail(data []byte, w http.ResponseWriter, headersKV ...string)
- func RespHTMLOk(data []byte, w http.ResponseWriter, headersKV ...string)
- func RespJSON(statusCode int, data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespJSONFail(data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespJSONOk(data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespOk(data interface{}, w http.ResponseWriter, headersKV ...string)
- func RespRaw(statusCode int, data []byte, w http.ResponseWriter, headersKV ...string)
- func RespRawFail(data []byte, w http.ResponseWriter, headersKV ...string)
- func RespRawOk(data []byte, w http.ResponseWriter, headersKV ...string)
Constants ¶
View Source
const ( HeaderContentType = "Content-Type" HeaderContentLength = "Content-Length" ContentTypeHTML = "text/html" ContentTypeHTMLUTF8 = "text/html; charset=utf-8" ContentTypeJSON = "application/json" ContentTypeJSONUTF8 = "application/json; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
func RespFail ¶
func RespFail(data interface{}, w http.ResponseWriter, headersKV ...string)
func RespHTML ¶
func RespHTML(statusCode int, data []byte, w http.ResponseWriter, headersKV ...string)
func RespHTMLFail ¶
func RespHTMLFail(data []byte, w http.ResponseWriter, headersKV ...string)
func RespHTMLOk ¶
func RespHTMLOk(data []byte, w http.ResponseWriter, headersKV ...string)
func RespJSON ¶
func RespJSON(statusCode int, data interface{}, w http.ResponseWriter, headersKV ...string)
func RespJSONFail ¶
func RespJSONFail(data interface{}, w http.ResponseWriter, headersKV ...string)
func RespJSONOk ¶
func RespJSONOk(data interface{}, w http.ResponseWriter, headersKV ...string)
func RespOk ¶
func RespOk(data interface{}, w http.ResponseWriter, headersKV ...string)
func RespRaw ¶
func RespRaw(statusCode int, data []byte, w http.ResponseWriter, headersKV ...string)
func RespRawFail ¶
func RespRawFail(data []byte, w http.ResponseWriter, headersKV ...string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.