view_models

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionFormatterGetter added in v0.1.33

type ActionFormatterGetter interface {
	GetActionFormatter() Formatter
}

type ActionHrefFormatterGetter added in v0.1.35

type ActionHrefFormatterGetter interface {
	GetActionHrefFormatter() Formatter
}

type ClassFormatterGetter added in v0.1.30

type ClassFormatterGetter interface {
	GetClassFormatter() Formatter
}

type CommonConfiguratorGetter added in v0.1.52

type CommonConfiguratorGetter interface {
	GetCommonConfigurator() CommonConfigurator
}

type ComputedPropertiesGetter added in v0.1.32

type ComputedPropertiesGetter interface {
	GetComputedProperties() []string
}

type DehydratedImagesConfigurator added in v0.1.52

type DehydratedImagesConfigurator interface {
	ListDehydratedImagePropertyGetter
	ItemDehydratedImagePropertyGetter
}

type DehydratedImagesConfiguratorGetter added in v0.1.52

type DehydratedImagesConfiguratorGetter interface {
	GetDehydratedImagesConfigurator() DehydratedImagesConfigurator
}

type DigestPropertiesGetter added in v0.1.44

type DigestPropertiesGetter interface {
	GetDigestProperties() []string
}
type Footer struct {
	Location string
	RepoUrl  string
}

type Formatter

type Formatter func(id, property, link string, rdx kvas.ReadableRedux) string

type FormatterConfiguratorGetter added in v0.1.52

type FormatterConfiguratorGetter interface {
	GetFormatterConfigurator() FormatterConfigurator
}

type Group added in v0.1.9

type Group struct {
	*Page
	GroupOrder      []string
	GroupLists      map[string]*List
	GroupTitles     map[string]string
	GroupShowAll    map[string]bool
	AnyGroupShowAll bool
	Updated         string
	ShowAllUrl      string
}

func NewGroup added in v0.1.9

func NewGroup(
	acp AppConfigurator,
	groupOrder []string,
	groupItems map[string][]string,
	groupTitles map[string]string,
	groupTotals map[string]int,
	updated string,
	u *url.URL,
	rdx kvas.ReadableRedux) (*Group, error)
type Header struct {
	AppTitle     string
	FavIconEmoji string
}

type HiddenLabelsGetter added in v0.1.33

type HiddenLabelsGetter interface {
	GetHiddenLabels() []string
}

type HiddenPropertiesGetter added in v0.1.33

type HiddenPropertiesGetter interface {
	GetHiddenProperties() []string
}

type HrefFormatterGetter added in v0.1.30

type HrefFormatterGetter interface {
	GetHrefFormatter() Formatter
}

type IconsGetter added in v0.1.27

type IconsGetter interface {
	GetIcons() []string
}

type ImagePathGetter added in v0.1.30

type ImagePathGetter interface {
	GetImagePath() string
}

type ImagePropertyGetter added in v0.1.30

type ImagePropertyGetter interface {
	GetImageProperty() string
}

type Item

type Item struct {
	*Page
	Id                      string
	Title                   string
	Labels                  []string
	HiddenLabels            []string
	LabelValues             map[string]string
	ImagePath               string
	DehydratedImageProperty string
	ImageProperty           string
	TitleProperty           string
	HiddenProperties        []string
	// Text properties
	Properties      map[string]map[string]string
	PropertyOrder   []string
	PropertyTitles  map[string]string
	PropertyClasses map[string]string
	PropertyActions map[string]map[string]string
	// Icons
	Icons []string
	// Sections
	Sections      []string
	HasSections   []string
	SectionTitles map[string]string
}

func NewItem

func NewItem(
	acp AppConfigurator,
	id string,
	hasSections []string,
	rdx kvas.ReadableRedux) (*Item, error)

type ItemConfiguratorGetter added in v0.1.52

type ItemConfiguratorGetter interface {
	GetItemConfigurator() ItemConfigurator
}

type ItemDehydratedImagePropertyGetter added in v0.1.53

type ItemDehydratedImagePropertyGetter interface {
	GetItemDehydratedImageProperty() string
}

type ItemPathGetter added in v0.1.30

type ItemPathGetter interface {
	GetItemPath() string
}

type LabelFormatterGetter added in v0.1.34

type LabelFormatterGetter interface {
	GetLabelFormatter() Formatter
}

type LabelsGetter added in v0.1.27

type LabelsGetter interface {
	GetLabels() []string
}

type List

type List struct {
	*Page
	Properties              []string
	Labels                  []string
	HiddenLabels            []string
	Icons                   []string
	HiddenProperties        []string
	ItemPath                string
	Items                   []*ListItem
	From, To, Total         int
	NextUrl                 string
	TitleProperty           string
	DehydratedImageProperty string
	ImageProperty           string
	ImagePath               string
}

func NewList

func NewList(
	acp AppConfigurator,
	ids []string,
	from, to, total int,
	u *url.URL,
	rdx kvas.ReadableRedux) (*List, error)

type ListConfiguratorGetter added in v0.1.52

type ListConfiguratorGetter interface {
	GetListConfigurator() ListConfigurator
}

type ListDehydratedImagePropertyGetter added in v0.1.53

type ListDehydratedImagePropertyGetter interface {
	GetListDehydratedImageProperty() string
}

type ListItem

type ListItem struct {
	Id              string
	Title           string
	LabelValues     map[string]string
	PropertyValues  map[string][]string
	PropertyClasses map[string]string
	PropertyTitles  map[string]string
}
type Navigation struct {
	Items   []string
	Icons   map[string]string
	Hrefs   map[string]string
	Current string
}

type Page added in v0.1.2

type Page struct {
	Id      string
	Head    *Header
	Nav     *Navigation
	Content template.HTML
	Foot    *Footer
}

func NewPage added in v0.1.36

func NewPage(acp AppConfigurator, id, content string) *Page

type PageGetter added in v0.1.27

type PageGetter interface {
	GetPage() *Page
}

type PropertiesGetter added in v0.1.30

type PropertiesGetter interface {
	GetProperties() []string
}

type PropertyEditor added in v0.1.39

type PropertyEditor struct {
	*Page
	Id                 string
	Title              string
	PropertyTitle      string
	Condition          bool
	ConditionalMessage string
	SelectedValues     map[string]bool
	AllValues          map[string]string
	AllowNewValues     bool
	ApplyEndpoint      string
}

func NewPropertyEditor added in v0.1.39

func NewPropertyEditor(
	app AppConfigurator,
	id, title, propertyTitle string,
	condition bool, conditionalMessage string,
	selectedValues map[string]bool,
	allValues map[string]string, allowNewValues bool,
	applyEndpoint string) *PropertyEditor

type PropertyTitlesGetter added in v0.1.27

type PropertyTitlesGetter interface {
	GetPropertyTitles() map[string]string
}

type ScopeQueriesGetter added in v0.1.30

type ScopeQueriesGetter interface {
	GetScopeQueries() map[string]string
}

type ScopesGetter added in v0.1.30

type ScopesGetter interface {
	GetScopes() []string
}
type Search struct {
	*Page
	Scopes           []string
	ScopeQueries     map[string]string
	CurrentScope     string
	Properties       []string
	PropertyTitles   map[string]string
	Query            map[string][]string
	DigestProperties []string
	Found            *List
}

func NewSearch

func NewSearch(
	acp AppConfigurator,
	query map[string][]string,
	ids []string,
	from, to, total int,
	u *url.URL,

	rdx kvas.ReadableRedux) (*Search, error)

type SearchConfigurator added in v0.1.52

type SearchConfiguratorGetter added in v0.1.52

type SearchConfiguratorGetter interface {
	GetSearchConfigurator() SearchConfigurator
}

type Section added in v0.1.6

type Section struct {
	Id      string
	Section string
	Content template.HTML
}

func NewSection added in v0.1.6

func NewSection(id, section, content string) *Section

type SectionTitlesGetter added in v0.1.27

type SectionTitlesGetter interface {
	GetSectionTitles() map[string]string
}

type SectionsGetter added in v0.1.30

type SectionsGetter interface {
	GetSections() []string
}

type TitleFormatterGetter added in v0.1.30

type TitleFormatterGetter interface {
	GetTitleFormatter() Formatter
}

type TitlePropertyGetter added in v0.1.27

type TitlePropertyGetter interface {
	GetTitleProperty() string
}

Jump to

Keyboard shortcuts

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