render

package
v0.0.0-...-3a61fd7 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Responder as a wrapper of https://github.com/unrolled/render -- This is a good base to work off and extend for your own uses, or build your own. For example, adding pagination to JSON() where you add a "Link" header that is a cursor URL to the next page of results (check how GitHubb does it in their API docs). The power is yours.

Index

Constants

This section is empty.

Variables

View Source
var (
	Renderer *renderer.Render
)

Functions

func Data

func Data(w http.ResponseWriter, status int, v []byte) error

func HTML

func HTML(w http.ResponseWriter, status int, name string, binding interface{}, htmlOpt ...renderer.HTMLOptions) error

func JSON

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

func JSONP

func JSONP(w http.ResponseWriter, status int, callback string, v interface{}) error

func Render

func Render(w http.ResponseWriter, e renderer.Engine, data interface{}) error

func Text

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

func XML

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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