models

package
v0.0.0-...-4d8001c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Href, Icon template.URL
	Text       string
}

Link holds an http link, text to display, and an iconify icon class

type TemplateCache

type TemplateCache struct {
	Cache map[string]TemplateCacheItem
}

TemplateCache holds the template cache as map of TemplateCacheItem

type TemplateCacheItem

type TemplateCacheItem struct {
	Template    *template.Template
	GeneratedAt time.Time
}

TemplateCacheItem holds a pointer to a generated template, and the time it was generated at.

func (*TemplateCacheItem) Execute

Execute writes the template to the supplied writer using the supplied data.

type TemplateData

type TemplateData struct {
	StringMap map[string]string      `json:"StringMap" yaml:"StringMap" toml:"StringMap"`
	IntMap    map[string]int         `json:"IntMap" yaml:"IntMap" toml:"IntMap"`
	FloatMap  map[string]float32     `json:"FloatMap" yaml:"FloatMap" toml:"FloatMap"`
	LinkMap   map[string][]Link      `json:"LinkMap" yaml:"LinkMap" toml:"LinkMap"`
	Data      map[string]interface{} `json:"Data" yaml:"Data" toml:"Data"`
	CSRFToken string                 `json:"Csrftoken" yaml:"Csrftoken" toml:"Csrftoken"`
	Flash     string                 `json:"Flash" yaml:"Flash" toml:"Flash"`
	Warning   string                 `json:"Warning" yaml:"Warning" toml:"Warning"`
	Error     string                 `json:"Error" yaml:"Error" toml:"Error"`
}

TemplateData holds data sent from handlers to templates.

Jump to

Keyboard shortcuts

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