renderers

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateRenderer

type TemplateRenderer struct {
	// contains filtered or unexported fields
}

TemplateRenderer renders dashboards using go-template (Pongo2).

func NewTemplateRenderer

func NewTemplateRenderer(templatesFS fs.FS) (*TemplateRenderer, error)

NewTemplateRenderer creates a renderer with Pongo2 templates.

func (*TemplateRenderer) Render

func (r *TemplateRenderer) Render(name string, data any, out ...io.Writer) (string, error)

Render implements go-dashboard's Renderer interface.

func (*TemplateRenderer) RenderLayout

func (r *TemplateRenderer) RenderLayout(layout *admin.DashboardLayout) (string, error)

RenderLayout keeps the legacy go-admin contract by delegating to the go-dashboard compatible Render method with the default template.

Jump to

Keyboard shortcuts

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