Documentation
¶
Index ¶
- func DefaultVars(req *http.Request, m Vars) map[string]interface{}
- func Form(req *http.Request, model interface{}, errs *validator.StructErrors) htmlform.Form
- func Ftos(req *http.Request, model interface{}) error
- func HTML(w http.ResponseWriter, status int, name string, binding interface{}, ...)
- func Vtom(req *http.Request, errs *validator.StructErrors) func(field string) map[string]interface{}
- func WithCsrfHandler(h http.Handler) http.Handler
- type Config
- type Renderer
- type Vars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultVars ¶
DefaultVars adds the default vars (User and Session) to the data map using the global renderer instance
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
Types ¶
type Config ¶
type Config interface { Asset() func(string) ([]byte, error) AssetNames() func() []string // Config is any config struct to make available as `Config` in the template Config() interface{} }
Config is the renderer configuration
type Renderer ¶
Renderer encapsulates unrolled/render and the renderer config
var Render Renderer
Render is a global instance of github.com/unrolled/render.Render
func NewFromRender ¶
NewFromRender returns a new Renderer using the supplied unrolled.Render
Click to show internal directories.
Click to hide internal directories.