state

package
v0.0.0-...-ffc0cdd Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(kind string, backend Backend)

Register adds a potential backed to the registry.

Types

type Backend

type Backend func(string) Stater

Backend represents a state backend that can be instantiated.

type Stater

type Stater interface {
	Current() []byte
	EntryCreate(text string, color int64) []byte
	EntryUpdate(id int64, text string, color int64) []byte
	EntryDelete(id int64) []byte
	EntrySearch(query string) []byte
}

Stater defines the state interface.

func NewStater

func NewStater(kind string, name string) Stater

NewStater instantiates a state backend with the given config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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