templates

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 3 Imported by: 3

README

Template files with the corresponding compiled files.

Compiled files are generated by qtc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageTemplate

func PageTemplate(p Page) string

func StreamPageTemplate

func StreamPageTemplate(qw422016 *qt422016.Writer, p Page)

func WritePageTemplate

func WritePageTemplate(qq422016 qtio422016.Writer, p Page)

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 ErrorPage

type ErrorPage struct {
	// inherit from base page, so its' title is used in error page.
	BasePage

	// error path
	Path []byte
}

func (*ErrorPage) Body

func (p *ErrorPage) Body() string

func (*ErrorPage) StreamBody

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

func (*ErrorPage) WriteBody

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

type MainPage

type MainPage struct {
	CTX *fasthttp.RequestCtx
}

func (*MainPage) Body

func (p *MainPage) Body() string

func (*MainPage) StreamBody

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

func (*MainPage) StreamTitle

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

func (*MainPage) Title

func (p *MainPage) Title() string

func (*MainPage) WriteBody

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

func (*MainPage) WriteTitle

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

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 TablePage

type TablePage struct {
	Rows []string
}

func (*TablePage) Body

func (p *TablePage) Body() string

func (*TablePage) StreamBody

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

func (*TablePage) StreamTitle

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

func (*TablePage) Title

func (p *TablePage) Title() string

func (*TablePage) WriteBody

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

func (*TablePage) WriteTitle

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

Jump to

Keyboard shortcuts

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