Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type EntityID
- 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
- func (id *EntityID) UnmarshalAmino(text string) error
- func (id *EntityID) UnmarshalJSON(data []byte) error
- type Identifiable
- type 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
- type KVStore
- type Prefixed
- type 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
Constants ¶
View Source
const TablePrefix = "t"
Variables ¶
View Source
var ErrNoEntities = errors.New("no entities defined yet")
View Source
var ZeroEntityID = NewEntityID(0)
Functions ¶
func FormatDenom ¶
func Int64Subkey ¶
func PrefixKeyBytes ¶
func PrefixKeyString ¶
func SetNotExists ¶
func Uint64Subkey ¶
Types ¶
type ArchiveStore ¶
type ArchiveStore interface { Get(key []byte) []byte Has(key []byte) bool Set(key []byte, value []byte) Delete(key []byte) Iterator(start []byte, end []byte, cb IteratorCB) ReverseIterator(start []byte, end []byte, cb IteratorCB) PrefixIterator(start []byte, cb IteratorCB) ReversePrefixIterator(start []byte, cb IteratorCB) Substore(prefix string) ArchiveStore }
type EntityID ¶
func NewEntityID ¶
func NewEntityIDFromBytes ¶
func NewEntityIDFromString ¶
func (EntityID) MarshalAmino ¶
func (EntityID) MarshalJSON ¶
func (*EntityID) UnmarshalAmino ¶
func (*EntityID) UnmarshalJSON ¶
type Identifiable ¶
type Incrementing ¶
type Incrementing struct {
// contains filtered or unexported fields
}
func NewIncrementing ¶
func NewIncrementing(backend KVStore, cdc *codec.Codec) *Incrementing
func (*Incrementing) ByID ¶
func (inc *Incrementing) ByID(id EntityID, val interface{}) error
func (*Incrementing) HasID ¶
func (inc *Incrementing) HasID(id EntityID) bool
func (*Incrementing) Head ¶
func (inc *Incrementing) Head(val interface{}) error
func (*Incrementing) HeadID ¶
func (inc *Incrementing) HeadID() EntityID
func (*Incrementing) HeadKey ¶
func (inc *Incrementing) HeadKey() []byte
func (*Incrementing) Insert ¶
func (inc *Incrementing) Insert(val Identifiable) error
func (*Incrementing) Iterator ¶
func (inc *Incrementing) Iterator() sdk.Iterator
func (*Incrementing) ReverseIterator ¶
func (inc *Incrementing) ReverseIterator() sdk.Iterator
func (*Incrementing) ValueKey ¶
func (inc *Incrementing) ValueKey(id EntityID) []byte
type IteratorCB ¶
type Prefixed ¶
type Prefixed struct {
// contains filtered or unexported fields
}
func NewPrefixed ¶
func (*Prefixed) ReverseIterator ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) PrefixIterator ¶
func (t *Table) PrefixIterator(start []byte, cb IteratorCB)
func (*Table) ReverseIterator ¶
func (t *Table) ReverseIterator(start []byte, end []byte, cb IteratorCB)
func (*Table) ReversePrefixIterator ¶
func (t *Table) ReversePrefixIterator(start []byte, cb IteratorCB)
func (*Table) Substore ¶
func (t *Table) Substore(prefix string) ArchiveStore
Click to show internal directories.
Click to hide internal directories.