templates

package
v0.0.0-...-72a8eb9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPluginMenus

func AddPluginMenus(m ...Menu)

func PageTemplate

func PageTemplate(ctx context.Context, route string, p Page) string

func RenderMenu

func RenderMenu(ctx context.Context, currentRoute string) string

func StreamPageTemplate

func StreamPageTemplate(qw422016 *qt422016.Writer, ctx context.Context, route string, p Page)

func StreamRenderMenu

func StreamRenderMenu(qw422016 *qt422016.Writer, ctx context.Context, currentRoute string)

func WritePageTemplate

func WritePageTemplate(qq422016 qtio422016.Writer, ctx context.Context, route string, p Page)

func WriteRenderMenu

func WriteRenderMenu(qq422016 qtio422016.Writer, ctx context.Context, currentRoute string)

Types

type BasePage

type BasePage struct{}

func (*BasePage) Body

func (p *BasePage) Body() string

func (*BasePage) StreamBody

func (p *BasePage) StreamBody(qw422016 *qt422016.Writer)

func (*BasePage) StreamTitle

func (p *BasePage) StreamTitle(qw422016 *qt422016.Writer)

func (*BasePage) Title

func (p *BasePage) Title() string

func (*BasePage) WriteBody

func (p *BasePage) WriteBody(qq422016 qtio422016.Writer)

func (*BasePage) WriteTitle

func (p *BasePage) WriteTitle(qq422016 qtio422016.Writer)

type Error

type Error struct {
	Error       error
	ErrTitle    string
	Description string
}

func (*Error) Body

func (p *Error) Body() string

func (*Error) StreamBody

func (p *Error) StreamBody(qw422016 *qt422016.Writer)

func (*Error) StreamTitle

func (p *Error) StreamTitle(qw422016 *qt422016.Writer)

func (*Error) Title

func (p *Error) Title() string

func (*Error) WriteBody

func (p *Error) WriteBody(qq422016 qtio422016.Writer)

func (*Error) WriteTitle

func (p *Error) WriteTitle(qq422016 qtio422016.Writer)
type Menu struct {
	Name  string
	Path  string
	Items []Menu
}

type Page

type Page interface {
	Title() string

	StreamTitle(qw422016 *qt422016.Writer)

	WriteTitle(qq422016 qtio422016.Writer)

	Body() string

	StreamBody(qw422016 *qt422016.Writer)

	WriteBody(qq422016 qtio422016.Writer)
}

type PluginPage

type PluginPage struct {
	PageTitle string
	PageBody  string
}

func (*PluginPage) Body

func (p *PluginPage) Body() string

func (*PluginPage) StreamBody

func (p *PluginPage) StreamBody(qw422016 *qt422016.Writer)

func (*PluginPage) StreamTitle

func (p *PluginPage) StreamTitle(qw422016 *qt422016.Writer)

func (*PluginPage) Title

func (p *PluginPage) Title() string

func (*PluginPage) WriteBody

func (p *PluginPage) WriteBody(qq422016 qtio422016.Writer)

func (*PluginPage) WriteTitle

func (p *PluginPage) WriteTitle(qq422016 qtio422016.Writer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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