widgets

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Table       = WidgetType("table")
	List        = WidgetType("list")
	CompactList = WidgetType("compact_list")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComactListRow added in v1.2.0

type ComactListRow struct {
	Index       int
	Title       string
	TitleUrl    requests.URL
	ButtonText  string
	ButtonUrl   requests.URL
	Address     string
	Time        string
	Description string
	Icon        attachments.Image
}

type ListRow added in v1.2.0

type ListRow struct {
	Index       int
	Title       string
	TitleUrl    requests.URL
	ButtonText  string
	ButtonUrl   requests.URL
	Address     string
	Time        string
	Description string
	Icon        attachments.Image
}

type TableColumn

type TableColumn struct {
	Index int
	Text  string
	Url   requests.URL
	Icon  attachments.Image
}

type TableRow

type TableRow struct {
	Index   int
	Columns []TableColumn
}

type Widget

type Widget interface {
	Init()
	GetType() WidgetType

	GetJson() json.Json
	// contains filtered or unexported methods
}

type WidgetComactList added in v1.2.0

type WidgetComactList struct {
	Title        string
	TitleUrl     requests.URL
	FooterText   string
	FooterUrl    requests.URL
	TitleCounter int
	// contains filtered or unexported fields
}

func (*WidgetComactList) AddRow added in v1.2.0

func (widjet *WidgetComactList) AddRow(row ListRow) *WidgetComactList

func (*WidgetComactList) GetJson added in v1.2.0

func (widjet *WidgetComactList) GetJson() json.Json

func (*WidgetComactList) GetType added in v1.2.0

func (widjet *WidgetComactList) GetType() WidgetType

func (*WidgetComactList) Init added in v1.2.0

func (widget *WidgetComactList) Init()

type WidgetList added in v1.2.0

type WidgetList struct {
	Title        string
	TitleUrl     requests.URL
	FooterText   string
	FooterUrl    requests.URL
	TitleCounter int
	// contains filtered or unexported fields
}

func (*WidgetList) AddRow added in v1.2.0

func (widjet *WidgetList) AddRow(row ListRow) *WidgetList

func (*WidgetList) GetJson added in v1.2.0

func (widjet *WidgetList) GetJson() json.Json

func (*WidgetList) GetType added in v1.2.0

func (widjet *WidgetList) GetType() WidgetType

func (*WidgetList) Init added in v1.2.0

func (widget *WidgetList) Init()

type WidgetTable

type WidgetTable struct {
	Title               string
	TitleUrl            string
	ColumnsDescriptions []string
	// contains filtered or unexported fields
}

func (*WidgetTable) AddRow

func (widjet *WidgetTable) AddRow(row TableRow) *WidgetTable

func (*WidgetTable) GetJson

func (widjet *WidgetTable) GetJson() json.Json

func (*WidgetTable) GetType added in v1.2.0

func (widjet *WidgetTable) GetType() WidgetType

func (*WidgetTable) Init

func (widget *WidgetTable) Init()

type WidgetType

type WidgetType string

Jump to

Keyboard shortcuts

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