view

package
v0.0.0-...-f2f702e Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(v *View)

Configure the view

func LoadAdminTemplate

func LoadAdminTemplate(root string, children []string)

LoadAdminTemplate loads the admin templates for the view

func LoadPlugins

func LoadPlugins(funcMaps ...template.FuncMap)

LoadPlugins for templating

func LoadTemplate

func LoadTemplate(root string, children []string)

LoadTemplate loads the templates fro the view

Types

type Template

type Template struct {
	Root     string   `json:"root"`
	Children []string `json:"children"`
}

Template struct

type View

type View struct {
	Extension string   `json:"extension"`
	Folder    string   `json:"folder"`
	Name      string   `json:"name"`
	Caching   bool     `json:"caching"`
	Template  Template `json:"template"`

	Vars map[string]interface{}
	// contains filtered or unexported fields
}

View struct

func New

func New(r *http.Request) *View

New creates a new View, and returns it's pointer

func (*View) Render

func (v *View) Render(w http.ResponseWriter)

Render renders a template to the writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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