render

package
v0.0.0-...-9967220 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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.

func Text

func Text(w http.ResponseWriter, status int, v string) error

Text writes out a string as plain text.

func XML

func XML(w http.ResponseWriter, status int, v interface{}) error

XML marshals the given interface object and writes the XML response.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL