state

package
v0.0.0-...-5fef39c Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT, BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoSuchSubErr = errors.New("No such sub")
View Source
var State = NewRoot()

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewRoot

func NewRoot() *App

func (*App) CurrentPerson

func (n *App) CurrentPerson() *ModelPersonPLeaf

func (*App) Root

func (n *App) Root() *Data

func (*App) Subscribe

func (n *App) Subscribe(cb func()) *Sub

type Data

type Data struct {
	// contains filtered or unexported fields
}

func (*Data) People

func (n *Data) People() *ModelPeoplePLeaf

func (*Data) Subscribe

func (n *Data) Subscribe(cb func()) *Sub

type ModelPeoplePLeaf

type ModelPeoplePLeaf struct {
	// contains filtered or unexported fields
}

func (*ModelPeoplePLeaf) Get

func (m *ModelPeoplePLeaf) Get() *model.People

func (*ModelPeoplePLeaf) Set

func (m *ModelPeoplePLeaf) Set(v *model.People)

func (*ModelPeoplePLeaf) Subscribe

func (m *ModelPeoplePLeaf) Subscribe(cb func()) *Sub

type ModelPersonPLeaf

type ModelPersonPLeaf struct {
	// contains filtered or unexported fields
}

func (*ModelPersonPLeaf) Get

func (m *ModelPersonPLeaf) Get() *model.Person

func (*ModelPersonPLeaf) Set

func (m *ModelPersonPLeaf) Set(v *model.Person)

func (*ModelPersonPLeaf) Subscribe

func (m *ModelPersonPLeaf) Subscribe(cb func()) *Sub

type Node

type Node interface {
	Subscribe(cb func()) *Sub
}

type Sub

type Sub struct {
	// contains filtered or unexported fields
}

func (*Sub) Clear

func (s *Sub) Clear()

Jump to

Keyboard shortcuts

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