Versions in this module Expand all Collapse all v0 v0.0.1 Feb 15, 2020 Changes in this version + const GetKeys + const GetMany + const GetOne + const GlobalEventScope + const Has + const TxCommit + const TxDelete + const TxDeleteSync + const TxSet + const TxSetSync + var BasicCdc = NewCodec() + var LastKeySuffix = "~~~" + var LastKeySuffixBytes = []byte(LastKeySuffix) + func EncodeTxMsg(msg *TxMsg) ([]byte, error) + func EncodeViewMsg(msg *ViewMsg) ([]byte, error) + func IsNoDataError(err error) bool + func Publish(scope EventScope, event Event) error + func RegisterCodec(cdc *Codec) + func Subscribe(scope EventScope, path EventPath, name string, handler EventHandler) error + func TxTypeString(typ TxType) string + type Client interface + BroadcastTxAsync func(msg *TxMsg) error + BroadcastTxCommit func(msg *TxMsg) error + BroadcastTxSync func(msg *TxMsg) error + Commit func() error + GetKeys func(msg *ViewMsg) ([]string, error) + GetMany func(msg *ViewMsg, handler KVHandler) (err error) + GetObject func(msg *ViewMsg, obj interface{}) (err error) + Has func(msg *ViewMsg) (bool, error) + MarshalJson func(ptr interface{}) ([]byte, error) + MarshalObject func(ptr interface{}) ([]byte, error) + Query func(msg *ViewMsg) ([]byte, error) + UnmarshalJson func(bz []byte, ptr interface{}) error + UnmarshalObject func(bz []byte, ptr interface{}) error + type Codec = amino.Codec + func NewCodec() *Codec + type Command struct + type CommandProcessor struct + type Event interface + Path func() EventPath + type EventBus struct + func RegisterEventBus(scope EventScope) *EventBus + func (bus *EventBus) Publish(event Event) + func (bus *EventBus) Subscribe(path EventPath, name string, handler EventHandler) error + func (bus *EventBus) Unsubscribe(path EventPath, name string) + type EventHandler func(event Event) + type EventPath string + func (path EventPath) HasPrefix(prefix EventPath) (ok bool) + type EventScope string + type KVHandler func(key []byte, value []byte) bool + type KeyValue struct + Key []byte + Value []byte + type NoDataError struct + func NewNoDataError() NoDataError + func (err NoDataError) Error() string + type Queue struct + func (queue *Queue) Pop() (value *Command) + func (queue *Queue) Push(value *Command) + func (queue *Queue) Size() int + type SpaceRegistry interface + RegisterSpace func(name string) + RegisterSpaceIfNotExist func(name string) + type Store interface + Delete func(key []byte) error + DeleteSync func(key []byte) error + Get func(key []byte) ([]byte, error) + GetMany func(start, end []byte) (kvArrayBytes []byte, err error) + GetPath func() string + Has func(key []byte) (bool, error) + Iterator func(start, end []byte) (dbm.Iterator, error) + Set func(key []byte, value []byte) error + SetSync func(key []byte, value []byte) error + type TxMsg struct + Data []byte + Key []byte + Path string + Space string + TxHash int64 + Type TxType + func DecodeTxMsg(msgBytes []byte) (*TxMsg, error) + func NewTxMsg(typ TxType, space string, path string, key string, data []byte) *TxMsg + func (msg *TxMsg) GetEventKey() string + func (msg *TxMsg) GetTypeString() string + func (msg *TxMsg) SetTxHash() + type TxType uint8 + type ViewMsg struct + End []byte + Path string + Space string + Start []byte + Type ViewType + func DecodeViewMsg(msgBytes []byte) (*ViewMsg, error) + func NewViewMsgHas(space string, path string, key string) *ViewMsg + func NewViewMsgKeys(space string, path string, start string, end string) *ViewMsg + func NewViewMsgMany(space string, path string, start string, end string) *ViewMsg + func NewViewMsgOne(space string, path string, key string) *ViewMsg + type ViewType uint8