Versions in this module Expand all Collapse all v0 v0.0.2 Oct 30, 2019 v0.0.1 Oct 30, 2019 Changes in this version + const TablePrefix + var ErrNoEntities = errors.New("no entities defined yet") + var ZeroEntityID = NewEntityID(0) + func Del(ctx sdk.Context, sk sdk.StoreKey, key []byte) sdk.Error + func FormatCoin(id EntityID, amount sdk.Uint) sdk.Coin + func FormatDenom(id EntityID) string + func Get(ctx sdk.Context, sk sdk.StoreKey, cdc *codec.Codec, key []byte, ...) sdk.Error + func Has(ctx sdk.Context, sk sdk.StoreKey, key []byte) bool + func Int64Subkey(subkey int64) []byte + func IntSubkey(subkey int) []byte + func KVStorePrefixIterator(kvs KVStore, prefix []byte) sdk.Iterator + func KVStoreReversePrefixIterator(kvs KVStore, prefix []byte) sdk.Iterator + func PrefixKeyBytes(subkeys ...[]byte) []byte + func PrefixKeyString(prefix string, subkeys ...[]byte) []byte + func Set(ctx sdk.Context, sk sdk.StoreKey, cdc *codec.Codec, key []byte, ...) + func SetExists(ctx sdk.Context, sk sdk.StoreKey, cdc *codec.Codec, key []byte, ...) sdk.Error + func SetNotExists(ctx sdk.Context, sk sdk.StoreKey, cdc *codec.Codec, key []byte, ...) sdk.Error + func Uint64Subkey(subkey uint64) []byte + type ArchiveStore interface + Delete func(key []byte) + Get func(key []byte) []byte + Has func(key []byte) bool + Iterator func(start []byte, end []byte, cb IteratorCB) + PrefixIterator func(start []byte, cb IteratorCB) + ReverseIterator func(start []byte, end []byte, cb IteratorCB) + ReversePrefixIterator func(start []byte, cb IteratorCB) + Set func(key []byte, value []byte) + Substore func(prefix string) ArchiveStore + type EntityID sdk.Uint + func GetSeq(ctx sdk.Context, sk sdk.StoreKey, seqKey []byte) EntityID + func IncrementSeq(ctx sdk.Context, sk sdk.StoreKey, seqKey []byte) EntityID + func NewEntityID(id uint64) EntityID + func NewEntityIDFromBytes(b []byte) EntityID + func NewEntityIDFromString(str string) EntityID + func (id *EntityID) UnmarshalAmino(text string) error + func (id *EntityID) UnmarshalJSON(data []byte) error + func (id EntityID) Bytes() []byte + func (id EntityID) Cmp(b EntityID) int + func (id EntityID) Dec() EntityID + func (id EntityID) Equals(other EntityID) bool + func (id EntityID) Inc() EntityID + func (id EntityID) IsDefined() bool + func (id EntityID) IsZero() bool + func (id EntityID) MarshalAmino() (string, error) + func (id EntityID) MarshalJSON() ([]byte, error) + func (id EntityID) String() string + type Identifiable interface + GetID func() EntityID + SetID func(id EntityID) + type Incrementing struct + func NewIncrementing(backend KVStore, cdc *codec.Codec) *Incrementing + func (inc *Incrementing) ByID(id EntityID, val interface{}) error + func (inc *Incrementing) HasID(id EntityID) bool + func (inc *Incrementing) Head(val interface{}) error + func (inc *Incrementing) HeadID() EntityID + func (inc *Incrementing) HeadKey() []byte + func (inc *Incrementing) Insert(val Identifiable) error + func (inc *Incrementing) Iterator() sdk.Iterator + func (inc *Incrementing) ReverseIterator() sdk.Iterator + func (inc *Incrementing) ValueKey(id EntityID) []byte + type IteratorCB func(k []byte, v []byte) bool + type KVStore interface + Delete func(key []byte) + Get func(key []byte) []byte + Has func(key []byte) bool + Iterator func(start, end []byte) sdk.Iterator + ReverseIterator func(start, end []byte) sdk.Iterator + Set func(key, value []byte) + type Prefixed struct + func NewPrefixed(backend KVStore, prefix []byte) *Prefixed + func (p *Prefixed) Delete(key []byte) + func (p *Prefixed) Get(key []byte) []byte + func (p *Prefixed) Has(key []byte) bool + func (p *Prefixed) Iterator(start, end []byte) sdk.Iterator + func (p *Prefixed) ReverseIterator(start, end []byte) sdk.Iterator + func (p *Prefixed) Set(key, value []byte) + type Table struct + func NewTable(db dbm.DB, prefix string) *Table + func (t *Table) Delete(key []byte) + func (t *Table) Get(key []byte) []byte + func (t *Table) Has(key []byte) bool + func (t *Table) Iterator(start []byte, end []byte, cb IteratorCB) + func (t *Table) PrefixIterator(start []byte, cb IteratorCB) + func (t *Table) ReverseIterator(start []byte, end []byte, cb IteratorCB) + func (t *Table) ReversePrefixIterator(start []byte, cb IteratorCB) + func (t *Table) Set(key, value []byte) + func (t *Table) Substore(prefix string) ArchiveStore