render

package
v0.0.0-...-8242075 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Render = New()

Render is a global instance of github.com/unrolled/render.Render

Functions

func DefaultVars

func DefaultVars(req *http.Request, m map[string]interface{}) map[string]interface{}

DefaultVars adds the default vars (User and Session) to the data map

func Form

func Form(req *http.Request, model interface{}, errs *validator.StructErrors) htmlform.Form

Form creates a htmlform.Form from a model and http.Request

func Ftos

func Ftos(req *http.Request, model interface{}) error

Ftos converts form data into a model

func HTML

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

HTML is an alias to github.com/unrolled/render.Render.HTML

func New

func New() *render.Render

New creates a new instance of github.com/unrolled/render.Render

func Vtom

func Vtom(req *http.Request, errs *validator.StructErrors) func(field string) map[string]interface{}

Vtom converts validator.v5 errors to a map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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