html

package
v0.0.0-...-7ae0799 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SiteData = &Site{
	Title: "Wadoh",
}

Functions

func ErrorFromContext

func ErrorFromContext(ctx context.Context) error

func FlashFromContext

func FlashFromContext(ctx context.Context) string

func NewErrorContext

func NewErrorContext(parent context.Context, err error) context.Context

func NewFlashContext

func NewFlashContext(parent context.Context, s string) context.Context

func StaticFs

func StaticFs() fs.FS

func TemplatesFS

func TemplatesFS() fs.FS

Types

type DevicesDetailBlock

type DevicesDetailBlock struct {
	Title      string
	Device     *devices.Device
	DetailPane *DevicesDetailPaneBlock
}

func (*DevicesDetailBlock) Renderer

func (b *DevicesDetailBlock) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type DevicesDetailPaneBlock

type DevicesDetailPaneBlock struct {
	Device *devices.Device

	SubAPIKey     bool
	SubTryMessage bool
	SubWebhook    bool
	SubMore       bool
}

func (*DevicesDetailPaneBlock) Renderer

func (t *DevicesDetailPaneBlock) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type DevicesListBlock

type DevicesListBlock struct {
	Title   string
	Devices []devices.Device
}

func (*DevicesListBlock) Renderer

func (b *DevicesListBlock) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type DevicesNewTmpl

type DevicesNewTmpl struct{}

func (*DevicesNewTmpl) Renderer

func (t *DevicesNewTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type DevicesReconnectTmpl

type DevicesReconnectTmpl struct {
	Device *devices.Device
}

func (*DevicesReconnectTmpl) Renderer

func (t *DevicesReconnectTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type DevicesTmpl

type DevicesTmpl struct {
	Title  string
	List   *DevicesListBlock
	Detail *DevicesDetailBlock
}

func (*DevicesTmpl) Renderer

func (t *DevicesTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type ErrorTmpl

type ErrorTmpl struct {
	Message string
	Code    string
	Status  int
}

func (*ErrorTmpl) Renderer

func (t *ErrorTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type LoginTmpl

type LoginTmpl struct {
	Title string
}

func (*LoginTmpl) Renderer

func (lt *LoginTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type RenderFunc

type RenderFunc func(ctx context.Context, base *template.Template, w io.Writer) error

type Renderable

type Renderable interface {
	Renderer(fs.FS, *Site) (layout string, fn RenderFunc)
}

type Site

type Site struct {
	Title string
}

type Templates

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

func NewTemplates

func NewTemplates() *Templates

func (*Templates) R

func (t *Templates) R(ctx context.Context, w io.Writer, r Renderable) error

R renders Renderable

func (*Templates) RenderPartial

func (t *Templates) RenderPartial(w io.Writer, name string, data interface{}) error

RenderPartial renders partial rawly.

type UsersDetailBlock

type UsersDetailBlock struct {
	User *users.User
}

func (*UsersDetailBlock) Renderer

func (t *UsersDetailBlock) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type UsersListBlock

type UsersListBlock struct {
	Rows *UsersRowsBlock
}

func (*UsersListBlock) Renderer

func (t *UsersListBlock) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

type UsersRowsBlock

type UsersRowsBlock struct {
	Users []users.User
}

func (*UsersRowsBlock) Renderer

func (p *UsersRowsBlock) Renderer(fs fs.FS, site *Site) (layout string, renderFn RenderFunc)

type UsersTmpl

type UsersTmpl struct {
	Title  string
	List   *UsersListBlock
	Detail *UsersDetailBlock
}

func (*UsersTmpl) Renderer

func (t *UsersTmpl) Renderer(fs fs.FS, site *Site) (string, RenderFunc)

Jump to

Keyboard shortcuts

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