neko: github.com/rocwong/neko/render Index | Files

package render

import "github.com/rocwong/neko/render"

Index

Package Files

render.go

Constants

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"
)

type JSON Uses

type JSON struct{}

func (JSON) Render Uses

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

Render an JSON response.

type JSONP Uses

type JSONP struct {
    Callback string
}

func (JSONP) Render Uses

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

Render an JSONP response.

type Render Uses

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

type TEXT Uses

type TEXT struct{}

func (TEXT) Render Uses

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

Render an Text response.

type XML Uses

type XML struct{}

func (XML) Render Uses

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

Render an XML response.

Package render imports 3 packages (graph) and is imported by 2 packages. Updated 2016-07-16. Refresh now. Tools for package owners.