Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breadcrumb struct {
	Entries []*BreadcrumbEntry
}

func NewBreadcrumb

func NewBreadcrumb() *Breadcrumb
func (b *Breadcrumb) AddEntry(e *BreadcrumbEntry)
type BreadcrumbEntry struct {
	Label    string
	URI      string
	Verbatim bool
	Disabled bool
}

type Content

type Content interface {
	Render(interface{}) ([]byte, error)
}

type ErrorData

type ErrorData struct {
	Message string
}
type Menu struct {
	Entries       []*MenuEntry
	SelectedEntry string
}
type MenuEntry struct {
	Id           string
	Icon         string
	Label        string
	URI          string
	External     bool
	New          bool
	WhenLoggedIn bool
	Apart        bool
}

type MultiSelect

type MultiSelect struct {
	Name            string
	Options         []MultiSelectOption
	SelectedOptions []string
	Size            int
}

func (*MultiSelect) IsSelected

func (ms *MultiSelect) IsSelected(name string) bool

type MultiSelectOption

type MultiSelectOption struct {
	Name  string
	Label string
}

type RawContent

type RawContent []byte

func (RawContent) Render

func (c RawContent) Render(interface{}) ([]byte, error)

type Select

type Select struct {
	Id             string
	Name           string
	Options        []SelectOption
	SelectedOption string
}

func (*Select) IsSelected

func (s *Select) IsSelected(name string) bool

type SelectOption

type SelectOption struct {
	Name  string
	Label string
}

type Tab

type Tab struct {
	Id    string
	Icon  string
	Label string
	URI   string
}

type Tabs

type Tabs struct {
	Tabs        []*Tab
	SelectedTab string
}

func NewTabs

func NewTabs() *Tabs

func (*Tabs) AddTab

func (ts *Tabs) AddTab(t *Tab)

type Template

type Template struct {
	RootTemplate *template.Template
	Name         string
	Data         interface{}
}

func NewTemplate

func NewTemplate(rootTemplate *template.Template, name string, data interface{}) *Template

func (*Template) Render

func (t *Template) Render(ctx interface{}) ([]byte, error)

type View

type View struct {
	RootTemplate *template.Template

	Title      string
	Menu       *Menu
	Breadcrumb *Breadcrumb
	Tabs       *Tabs
	Body       Content

	// Set internally
	Context interface{}

	PageId   string
	BodyData template.HTML
}

func (*View) Render

func (v *View) Render(ctx interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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