statestore

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0, MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-statestore

A general-purpose key-value store for CBOR-encodable data

License

Dual-licensed under MIT + Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToKey

func ToKey(k interface{}) datastore.Key

Types

type StateStore

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

func New

func (*StateStore) Begin

func (st *StateStore) Begin(i interface{}, state interface{}) error

func (*StateStore) DeleteList

func (st *StateStore) DeleteList() error

yungolzj

func (*StateStore) Get

func (st *StateStore) Get(i interface{}) *StoredState

func (*StateStore) GetByKey

func (st *StateStore) GetByKey(i interface{}) ([]byte, error)

yungolzj

func (*StateStore) Has

func (st *StateStore) Has(i interface{}) (bool, error)

func (*StateStore) List

func (st *StateStore) List(out interface{}) error

out: *[]T

func (*StateStore) ListKey

func (st *StateStore) ListKey(out interface{}) error

yungolzj

func (*StateStore) PutBytes

func (st *StateStore) PutBytes(i interface{}, value []byte) error

yungolzj

func (*StateStore) PutKey

func (st *StateStore) PutKey(i interface{}, value interface{}) error

yungolzj

type StoredState

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

func (*StoredState) End

func (st *StoredState) End() error

func (*StoredState) Get

func (st *StoredState) Get(out cbg.CBORUnmarshaler) error

func (*StoredState) Mutate

func (st *StoredState) Mutate(mutator interface{}) error

mutator func(*T) error

Jump to

Keyboard shortcuts

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