docs

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultDoc

func AddDefaultDoc()

func AddPage

func AddPage(name string, content string, static http.FileSystem)

func AddTemplateFuncs

func AddTemplateFuncs(page string, tmpl *template.Template) *template.Template

func Dir

func Dir(useLocal bool, name string) http.FileSystem

Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.

func FS

func FS(useLocal bool) http.FileSystem

FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSByte

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

func PageHandler

func PageHandler(w http.ResponseWriter, r *http.Request) (tmpl web.TemplateData, err error)

func RegisterPlugin

func RegisterPlugin()

func StaticHandler

func StaticHandler(w http.ResponseWriter, r *http.Request)

Types

type Page

type Page struct {
	Name   string
	Tmpl   *template.Template
	Static http.FileSystem
}

func FindPage

func FindPage(name string) *Page

func (*Page) Render

func (p *Page) Render() []byte

type Plugin

type Plugin struct{}

func (*Plugin) InitWeb

func (d *Plugin) InitWeb()

func (*Plugin) Name

func (p *Plugin) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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