keeper

package
v0.0.0-...-b416896 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDTStore

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

CDTStore manages cdt states of each key

func NewCDTStore

func NewCDTStore(m codec.Codec, kvs types.KVStoreI, schema types.Schema) CDTStore

func (CDTStore) ApplyOP

func (s CDTStore) ApplyOP(ctx sdk.Context, op types.OP) error

ApplyOP applies the op into the state

func (CDTStore) GetState

func (s CDTStore) GetState(ctx sdk.Context, key []byte) types.CDTState

GetState returns the state corresponding to the key

func (CDTStore) GetStateOrEmpty

func (s CDTStore) GetStateOrEmpty(ctx sdk.Context, key []byte) types.CDTState

GetStateOrEmpty returns the state corresponding to the key if it exists, otherwise it returns an empty state

func (CDTStore) HasState

func (s CDTStore) HasState(ctx sdk.Context, key []byte) bool

HasState returns a boolean value whether if the state corresponding to the key

type GSetStore

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

func NewGSetStore

func NewGSetStore(
	cdc codec.Codec,
	schema types.Schema,
	stateStore types.KVStoreI,
	cdtStore CDTStore,
	prefix []byte,
) GSetStore

func (GSetStore) Add

func (s GSetStore) Add(ctx sdk.Context, key []byte, elements ...types.Element)

func (GSetStore) Get

func (s GSetStore) Get(ctx sdk.Context, key []byte) []types.Element

func (GSetStore) Lookup

func (s GSetStore) Lookup(ctx sdk.Context, key []byte, elements ...types.Element) bool

type Int64Store

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

func NewInt64Store

func NewInt64Store(
	schema types.Schema,
	stateStore types.KVStoreI,
	cdtStore CDTStore,
	prefix []byte,
) Int64Store

func (Int64Store) Add

func (s Int64Store) Add(ctx sdk.Context, key []byte, value int64)

func (Int64Store) EQ

func (s Int64Store) EQ(ctx sdk.Context, key []byte, value int64) bool

func (Int64Store) GT

func (s Int64Store) GT(ctx sdk.Context, key []byte, value int64) bool

func (Int64Store) GTE

func (s Int64Store) GTE(ctx sdk.Context, key []byte, value int64) bool

func (Int64Store) Get

func (s Int64Store) Get(ctx sdk.Context, key []byte) int64

func (Int64Store) LT

func (s Int64Store) LT(ctx sdk.Context, key []byte, value int64) bool

func (Int64Store) LTE

func (s Int64Store) LTE(ctx sdk.Context, key []byte, value int64) bool

func (Int64Store) Set

func (s Int64Store) Set(ctx sdk.Context, key []byte, value int64)

type Store

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

func NewStore

func NewStore(cdc codec.Codec, storeKey sdk.StoreKey, schema *types.Schema) Store

func (Store) Abort

func (s Store) Abort(ctx sdk.Context, id []byte) error

func (Store) Commit

func (s Store) Commit(ctx sdk.Context, id []byte) error

func (Store) CommitImmediately

func (s Store) CommitImmediately(ctx sdk.Context)

func (Store) GetGSetStore

func (s Store) GetGSetStore(prefix []byte) GSetStore

func (Store) GetInt64Store

func (s Store) GetInt64Store(prefix []byte) Int64Store

func (Store) Precommit

func (s Store) Precommit(ctx sdk.Context, id []byte) error

Jump to

Keyboard shortcuts

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