views

package
v0.0.0-...-947ddfb Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {
	RootView *View
	NewView  *View
}

func NewRenderer

func NewRenderer(RootView *View, NewView *View) *Renderer

func (*Renderer) Render

func (r *Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render implements the Renderer interface See https://github.com/labstack/echo/blob/d48197db7af19becf2363496493ed0e2a8d1caea/echo.go#L134 Docs: https://echo.labstack.com/guide/templates/

type TemplateData

type TemplateData struct {
	Type TemplateType
	Data interface{}
}

type TemplateType

type TemplateType int64
const (
	ROOT_VIEW TemplateType = 0
	NEW_VIEW  TemplateType = 1
)

type View

type View struct {
	*template.Template // embed Template to store the templates for this view
}

func NewView

func NewView(contents embed.FS, files ...string) (*View, error)

Jump to

Keyboard shortcuts

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