2024-01-22 23:10:14 -05:00
|
|
|
package models
|
|
|
|
|
2024-01-23 22:01:59 -05:00
|
|
|
import "html/template"
|
2024-01-23 21:14:15 -05:00
|
|
|
|
2024-01-23 22:01:59 -05:00
|
|
|
// Link holds an http link, text to display, and an iconify icon class
|
2024-01-23 19:10:15 -05:00
|
|
|
type Link struct {
|
2024-01-23 21:14:15 -05:00
|
|
|
Href, Icon template.URL
|
|
|
|
Text string
|
2024-01-23 19:10:15 -05:00
|
|
|
}
|
|
|
|
|
2024-01-22 23:10:14 -05:00
|
|
|
// TemplateData holds data sent from handlers to templates.
|
|
|
|
type TemplateData struct {
|
2024-01-23 21:14:15 -05:00
|
|
|
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"`
|
2024-01-22 23:10:14 -05:00
|
|
|
}
|