Documentation ¶
Index ¶
- func Data(w http.ResponseWriter, status int, v []byte) error
- func HTML(w http.ResponseWriter, status int, name string, binding interface{}, ...) error
- func JSON(w http.ResponseWriter, status int, v interface{}) error
- func JSONP(w http.ResponseWriter, status int, callback string, v interface{}) error
- func Text(w http.ResponseWriter, status int, v string) error
- func XML(w http.ResponseWriter, status int, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
func Data(w http.ResponseWriter, status int, v []byte) error
Data writes out the raw bytes as binary data.
func HTML ¶
func HTML(w http.ResponseWriter, status int, name string, binding interface{}, htmlOpt ...render.HTMLOptions) error
HTML builds up the response from the specified template and bindings.
func JSON ¶
func JSON(w http.ResponseWriter, status int, v interface{}) error
JSON marshals the given interface object and writes the JSON response.
func JSONP ¶
func JSONP(w http.ResponseWriter, status int, callback string, v interface{}) error
JSONP marshals the given interface object and writes the JSON response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.