Documentation
¶
Index ¶
- func KVStoreService(ctx context.Context, moduleName string) store.KVStoreService
- func NewMemDB() store.KVStoreWithBatch
- func NewNopLogger() log.Logger
- func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment)
- type MemDB
- func (db *MemDB) Close() error
- func (bt *MemDB) Delete(key []byte) error
- func (bt *MemDB) DeleteSync(key []byte) error
- func (bt *MemDB) Get(key []byte) ([]byte, error)
- func (bt *MemDB) Has(key []byte) (bool, error)
- func (bt *MemDB) Iterator(start, end []byte) (store.Iterator, error)
- func (db *MemDB) NewBatch() store.Batch
- func (db *MemDB) NewBatchWithSize(size int) store.Batch
- func (db *MemDB) Print() error
- func (bt *MemDB) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (bt *MemDB) Set(key, value []byte) error
- func (bt *MemDB) SetSync(key, value []byte) error
- func (db *MemDB) Stats() map[string]string
- type MemKV
- func (bt MemKV) Delete(key []byte) error
- func (bt MemKV) Get(key []byte) ([]byte, error)
- func (bt MemKV) Has(key []byte) (bool, error)
- func (bt MemKV) Iterator(start, end []byte) (store.Iterator, error)
- func (bt MemKV) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (bt MemKV) Set(key, value []byte) error
- type TestBranchService
- type TestContext
- type TestEnvironment
- type TestEnvironmentConfig
- type TestEventService
- type TestGasService
- type TestHeaderService
- type TestTransactionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KVStoreService ¶
func KVStoreService(ctx context.Context, moduleName string) store.KVStoreService
func NewNopLogger ¶
NewNopLogger returns a new logger that does nothing.
func NewTestEnvironment ¶ added in v0.0.2
func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment)
Types ¶
type MemDB ¶
type MemDB struct {
// contains filtered or unexported fields
}
MemDB is a simple in-memory key-value store with Batch support.
func (*MemDB) DeleteSync ¶
func (*MemDB) NewBatchWithSize ¶
NewBatchWithSize returns a new memDBBatch with the given size.
func (*MemDB) ReverseIterator ¶
type MemKV ¶
type MemKV struct {
// contains filtered or unexported fields
}
MemKV a lightweight memory db
func (MemKV) ReverseIterator ¶
type TestBranchService ¶ added in v0.0.2
type TestBranchService struct{}
type TestContext ¶ added in v0.0.2
func Context ¶
func Context() TestContext
func (TestContext) WithExecMode ¶ added in v0.0.2
func (t TestContext) WithExecMode(mode transaction.ExecMode) TestContext
WithExecMode sets the exec mode on a testing ctx and returns the updated ctx.
func (TestContext) WithGas ¶ added in v0.0.2
func (t TestContext) WithGas(gasConfig gas.GasConfig, gasMeter gas.Meter) TestContext
WithGas sets the gas config and meter on a testing ctx and returns the updated ctx.
func (TestContext) WithHeaderInfo ¶ added in v0.0.2
func (t TestContext) WithHeaderInfo(info header.Info) TestContext
WithHeaderInfo sets the header on a testing ctx and returns the updated ctx.
type TestEnvironment ¶ added in v0.0.2
type TestEnvironment struct { appmodulev2.Environment // contains filtered or unexported fields }
func (TestEnvironment) EventService ¶ added in v0.0.2
func (env TestEnvironment) EventService() TestEventService
func (TestEnvironment) HeaderService ¶ added in v0.0.2
func (env TestEnvironment) HeaderService() TestHeaderService
func (TestEnvironment) KVStoreService ¶ added in v0.0.2
func (env TestEnvironment) KVStoreService() store.KVStoreService
type TestEnvironmentConfig ¶ added in v0.0.2
type TestEventService ¶ added in v0.0.2
type TestEventService struct {
// contains filtered or unexported fields
}
func NewTestEventService ¶ added in v0.0.2
func NewTestEventService(ctx context.Context, moduleName string) TestEventService
NewTestEventService attaches an event service to the context. Adding an existing module will reset the events.
func (TestEventService) EventManager ¶ added in v0.0.2
func (e TestEventService) EventManager(ctx context.Context) event.Manager
func (TestEventService) GetEvents ¶ added in v0.0.2
func (e TestEventService) GetEvents(ctx context.Context) []event.Event
func (TestEventService) GetProtoEvents ¶ added in v0.0.2
func (e TestEventService) GetProtoEvents(ctx context.Context) []transaction.Msg
type TestGasService ¶ added in v0.0.2
type TestGasService struct{}
type TestHeaderService ¶ added in v0.0.2
type TestHeaderService struct{}
func (TestHeaderService) HeaderInfo ¶ added in v0.0.2
func (e TestHeaderService) HeaderInfo(ctx context.Context) header.Info
type TestTransactionService ¶ added in v0.0.2
type TestTransactionService struct{}
func (TestTransactionService) ExecMode ¶ added in v0.0.2
func (m TestTransactionService) ExecMode(ctx context.Context) transaction.ExecMode
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package gas is a generated GoMock package.
|
Package gas is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.