store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(stateChanged func()) (PutStateFunc, GetStateFunc)

NewStore returns a put and get state functions given the stateChanged callback provided

Types

type CardState

type CardState interface {
	CardName(id int) string
	CardLabelsStr(id int) string
	Description(id int) string
}

CardState describes the interface required for the selected card component

type GetStateFunc

type GetStateFunc func() State

GetStateFunc return a State interface

type HeaderState

type HeaderState interface {
	HeaderTitle() string
	HeaderSubtitle() string
}

HeaderState describes the interface required for the header component

type ListsState

type ListsState interface {
	ListsLen() int
	SingleListState
}

ListsState describes the interface required for the ListContainer component

type PutStateFunc

type PutStateFunc func(state State)

PutStateFunc takes a gui.State interface as input

type SingleListState

type SingleListState interface {
	ListName(idx int) string
	ListCardsIds(idx int) []int
	CardState
}

SingleListState describes the interface required for the list component

type State

type State interface {
	ViewState
}

State describes the interface required for the gui

type ViewState

type ViewState interface {
	HeaderState
	ListsState
}

ViewState describes the interface required for the view component

Jump to

Keyboard shortcuts

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