template

package
v0.0.0-...-27cef4d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	Config *TemplateConfig
	// contains filtered or unexported fields
}

Template is a structure that serves as a web page build.

func NewTemplate

func NewTemplate(TemplateConfig *TemplateConfig) *Template

NewTemplate is creator of the Template

func (*Template) AddController

func (p *Template) AddController(prefix string, con interface{})

AddController is add page controller

func (*Template) Route

func (p *Template) Route(r *http.Request, urlpath string) (data []byte, err error)

Route is the role of distributing pages according to url

func (*Template) SetTile

func (p *Template) SetTile(urlPath string, tileSet string)

SetTile determines page tile according to urlpath

type TemplateConfig

type TemplateConfig struct {
	TemplatePath string
	LayoutPath   string
	WelcomeFile  string
}

Jump to

Keyboard shortcuts

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