tpl

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePageTpl added in v1.11.0

func ParsePageTpl(tplText string) (tpl *template.Template, err error)

Types

type DirTheme added in v1.11.0

type DirTheme string

func (DirTheme) RenderAsset added in v1.11.0

func (dir DirTheme) RenderAsset(w http.ResponseWriter, r *http.Request, assetPath string)

func (DirTheme) RenderPage added in v1.11.0

func (dir DirTheme) RenderPage(w io.Writer, data interface{}) error

type MemTheme added in v1.11.0

type MemTheme struct {
	// contains filtered or unexported fields
}
var DefaultTheme MemTheme

func LoadMemTheme added in v1.11.0

func LoadMemTheme(themePath string) (theme MemTheme, err error)

func (MemTheme) RenderAsset added in v1.11.0

func (theme MemTheme) RenderAsset(w http.ResponseWriter, r *http.Request, assetPath string)

func (MemTheme) RenderPage added in v1.11.0

func (theme MemTheme) RenderPage(w io.Writer, data interface{}) error

type Theme added in v1.11.0

type Theme interface {
	RenderPage(w io.Writer, data interface{}) error
	RenderAsset(w http.ResponseWriter, r *http.Request, assetPath string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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