render

package
v0.0.0-...-bd14a5d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2016 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJSON

func WriteJSON(w http.ResponseWriter, obj interface{}) error

func WriteString

func WriteString(w http.ResponseWriter, format string, data []interface{})

Types

type Data

type Data struct {
	ContentType string
	Data        []byte
}

func (Data) Render

func (r Data) Render(w http.ResponseWriter) error

type HTML

type HTML struct {
	Template *template.Template
	Name     string
	Data     interface{}
}

func (HTML) Render

func (r HTML) Render(w http.ResponseWriter) error

type HTMLDebug

type HTMLDebug struct {
	Files []string
	Glob  string
}

func (HTMLDebug) Instance

func (r HTMLDebug) Instance(name string, data interface{}) Render

type HTMLProduction

type HTMLProduction struct {
	Template *template.Template
}

func (HTMLProduction) Instance

func (r HTMLProduction) Instance(name string, data interface{}) Render

type HTMLRender

type HTMLRender interface {
	Instance(string, interface{}) Render
}

type IndentedJSON

type IndentedJSON struct {
	Data interface{}
}

func (IndentedJSON) Render

func (r IndentedJSON) Render(w http.ResponseWriter) error

type JSON

type JSON struct {
	Data interface{}
}

func (JSON) Render

func (r JSON) Render(w http.ResponseWriter) error

type Redirect

type Redirect struct {
	Code     int
	Request  *http.Request
	Location string
}

func (Redirect) Render

func (r Redirect) Render(w http.ResponseWriter) error

type Render

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

type String

type String struct {
	Format string
	Data   []interface{}
}

func (String) Render

func (r String) Render(w http.ResponseWriter) error

type XML

type XML struct {
	Data interface{}
}

func (XML) Render

func (r XML) Render(w http.ResponseWriter) error

Jump to

Keyboard shortcuts

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