render

package
v0.0.0-...-2c015f8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2016 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ContentType header constant.
	ContentType = "Content-Type"
	// ContentJSON header value for JSON data.
	ContentJSON = "application/json"
	// ContentJSONP header value for JSONP data.
	ContentJSONP = "application/javascript"
	// ContentXML header value for XML data.
	ContentXML = "text/xml"
	// ContentPlain header value for Text data.
	ContentPlain = "text/plain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON struct{}

func (JSON) Render

func (c JSON) Render(data interface{}, w http.ResponseWriter) error

Render an JSON response.

type JSONP

type JSONP struct {
	Callback string
}

func (JSONP) Render

func (c JSONP) Render(data interface{}, w http.ResponseWriter) error

Render an JSONP response.

type Render

type Render interface {
	Render(interface{}, http.ResponseWriter) error
}

type TEXT

type TEXT struct{}

func (TEXT) Render

func (c TEXT) Render(data interface{}, w http.ResponseWriter) error

Render an Text response.

type XML

type XML struct{}

func (XML) Render

func (c XML) Render(data interface{}, w http.ResponseWriter) error

Render an XML response.

Jump to

Keyboard shortcuts

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