kv

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dsnString string, opts ...eosdb.Option) (eosdb.Driver, error)

Types

type DB

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

func (*DB) BlockIDAfter

func (db *DB) BlockIDAfter(ctx context.Context, start time.Time, inclusive bool) (id string, foundTime time.Time, err error)

func (*DB) BlockIDAt

func (db *DB) BlockIDAt(ctx context.Context, start time.Time) (id string, err error)

func (*DB) BlockIDBefore

func (db *DB) BlockIDBefore(ctx context.Context, start time.Time, inclusive bool) (id string, foundTime time.Time, err error)

func (*DB) Flush

func (db *DB) Flush(ctx context.Context) error

func (*DB) GetAccount

func (db *DB) GetAccount(ctx context.Context, accountName string) (*pbcodec.AccountCreationRef, error)

func (*DB) GetBlock

func (db *DB) GetBlock(ctx context.Context, id string) (blk *pbcodec.BlockWithRefs, err error)

func (*DB) GetBlockByNum

func (db *DB) GetBlockByNum(ctx context.Context, num uint32) (out []*pbcodec.BlockWithRefs, err error)

func (*DB) GetClosestIrreversibleIDAtBlockNum

func (db *DB) GetClosestIrreversibleIDAtBlockNum(ctx context.Context, num uint32) (ref bstream.BlockRef, err error)

func (*DB) GetIrreversibleIDAtBlockID

func (db *DB) GetIrreversibleIDAtBlockID(ctx context.Context, ID string) (ref bstream.BlockRef, err error)

func (*DB) GetLastWrittenBlockID

func (db *DB) GetLastWrittenBlockID(ctx context.Context) (blockID string, err error)

func (*DB) GetLastWrittenIrreversibleBlockRef

func (db *DB) GetLastWrittenIrreversibleBlockRef(ctx context.Context) (ref bstream.BlockRef, err error)

func (*DB) GetTransactionEvents

func (db *DB) GetTransactionEvents(ctx context.Context, idPrefix string) (out []*pbcodec.TransactionEvent, err error)

func (*DB) GetTransactionEventsBatch

func (db *DB) GetTransactionEventsBatch(ctx context.Context, idPrefixes []string) (out [][]*pbcodec.TransactionEvent, err error)

func (*DB) GetTransactionTraces

func (db *DB) GetTransactionTraces(ctx context.Context, idPrefix string) (out []*pbcodec.TransactionEvent, err error)

func (*DB) GetTransactionTracesBatch

func (db *DB) GetTransactionTracesBatch(ctx context.Context, idPrefixes []string) (out [][]*pbcodec.TransactionEvent, err error)

func (*DB) ListAccountNames

func (db *DB) ListAccountNames(ctx context.Context, concurrentReadCount uint32) (out []string, err error)

func (*DB) ListBlocks

func (db *DB) ListBlocks(ctx context.Context, highBlockNum uint32, limit int) (out []*pbcodec.BlockWithRefs, err error)

func (*DB) ListSiblingBlocks

func (db *DB) ListSiblingBlocks(ctx context.Context, blockNum uint32, spread uint32) (out []*pbcodec.BlockWithRefs, err error)

func (*DB) PutBlock

func (db *DB) PutBlock(ctx context.Context, blk *pbcodec.Block) error

func (*DB) SetWriterChainID

func (db *DB) SetWriterChainID(chainID []byte)

func (*DB) UpdateNowIrreversibleBlock

func (db *DB) UpdateNowIrreversibleBlock(ctx context.Context, blk *pbcodec.Block) error

type Keyer

type Keyer struct{}
var Keys Keyer

func (Keyer) EndOfAccountTable

func (Keyer) EndOfAccountTable() []byte

func (Keyer) EndOfBlocksTable

func (Keyer) EndOfBlocksTable() []byte

func (Keyer) EndOfDtrxsTable

func (Keyer) EndOfDtrxsTable() []byte

func (Keyer) EndOfImplicitTrxsTable

func (Keyer) EndOfImplicitTrxsTable() []byte

func (Keyer) EndOfIrrBlockTable

func (Keyer) EndOfIrrBlockTable() []byte

func (Keyer) EndOfTimelineIndex

func (Keyer) EndOfTimelineIndex(fwd bool) []byte

func (Keyer) EndOfTrxTracesTable

func (Keyer) EndOfTrxTracesTable() []byte

func (Keyer) EndOfTrxsTable

func (Keyer) EndOfTrxsTable() []byte

func (Keyer) PackAccountKey

func (Keyer) PackAccountKey(accountName string) []byte

func (Keyer) PackBlockNumPrefix

func (Keyer) PackBlockNumPrefix(blockNum uint32) []byte

func (Keyer) PackBlocksKey

func (Keyer) PackBlocksKey(blockID string) []byte

func (Keyer) PackDtrxsKey

func (k Keyer) PackDtrxsKey(trxID, blockID string) []byte

func (Keyer) PackDtrxsPrefix

func (k Keyer) PackDtrxsPrefix(trxID string) []byte

func (Keyer) PackImplicitTrxsKey

func (k Keyer) PackImplicitTrxsKey(trxID, blockID string) []byte

func (Keyer) PackImplicitTrxsPrefix

func (k Keyer) PackImplicitTrxsPrefix(trxID string) []byte

func (Keyer) PackIrrBlockNumPrefix

func (Keyer) PackIrrBlockNumPrefix(blockNum uint32) []byte

func (Keyer) PackIrrBlocksKey

func (Keyer) PackIrrBlocksKey(blockID string) []byte

func (Keyer) PackTimelineKey

func (Keyer) PackTimelineKey(fwd bool, blockTime time.Time, blockID string) []byte

func (Keyer) PackTimelinePrefix

func (k Keyer) PackTimelinePrefix(fwd bool, blockTime time.Time) []byte

func (Keyer) PackTrxTracesKey

func (k Keyer) PackTrxTracesKey(trxID, blockID string) []byte

TrxTrace virt table

func (Keyer) PackTrxTracesPrefix

func (k Keyer) PackTrxTracesPrefix(trxID string) []byte

func (Keyer) PackTrxsKey

func (k Keyer) PackTrxsKey(trxID string, blockID string) []byte

func (Keyer) PackTrxsPrefix

func (k Keyer) PackTrxsPrefix(trxID string) []byte

func (Keyer) StartOfAccountTable

func (Keyer) StartOfAccountTable() []byte

func (Keyer) StartOfBlocksTable

func (Keyer) StartOfBlocksTable() []byte

func (Keyer) StartOfDtrxsTable

func (Keyer) StartOfDtrxsTable() []byte

func (Keyer) StartOfImplicitTrxsTable

func (Keyer) StartOfImplicitTrxsTable() []byte

func (Keyer) StartOfIrrBlockTable

func (Keyer) StartOfIrrBlockTable() []byte

func (Keyer) StartOfTimelineIndex

func (Keyer) StartOfTimelineIndex(fwd bool) []byte

func (Keyer) StartOfTrxTracesTable

func (Keyer) StartOfTrxTracesTable() []byte

func (Keyer) StartOfTrxsTable

func (Keyer) StartOfTrxsTable() []byte

func (Keyer) UnpackAccountKey

func (Keyer) UnpackAccountKey(key []byte) string

func (Keyer) UnpackBlocksKey

func (Keyer) UnpackBlocksKey(key []byte) (blockID string)

func (Keyer) UnpackDtrxsKey

func (k Keyer) UnpackDtrxsKey(key []byte) (trxID, blockID string)

func (Keyer) UnpackImplicitTrxsKey

func (k Keyer) UnpackImplicitTrxsKey(key []byte) (trxID, blockID string)

func (Keyer) UnpackIrrBlocksKey

func (Keyer) UnpackIrrBlocksKey(key []byte) (blockID string)

func (Keyer) UnpackTimelineKey

func (Keyer) UnpackTimelineKey(fwd bool, key []byte) (blockTime time.Time, blockID string)

func (Keyer) UnpackTrxTracesKey

func (k Keyer) UnpackTrxTracesKey(key []byte) (trxID, blockID string)

func (Keyer) UnpackTrxsKey

func (k Keyer) UnpackTrxsKey(key []byte) (trxID, blockID string)

Jump to

Keyboard shortcuts

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