datastore

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrBlockDoesNotExist

func ErrBlockDoesNotExist(blockNumber int64) error

func ErrContractDoesNotExist

func ErrContractDoesNotExist(contractHash string) error

func ErrFilterDoesNotExist

func ErrFilterDoesNotExist(name string) error

func ErrReceiptDoesNotExist

func ErrReceiptDoesNotExist(txHash string) error

Types

type BlockRepository

type BlockRepository interface {
	CreateOrUpdateBlock(block core.Block) (int64, error)
	GetBlock(blockNumber int64) (core.Block, error)
	MissingBlockNumbers(startingBlockNumber, endingBlockNumber int64, nodeID string) []int64
	SetBlocksStatus(chainHead int64) error
}

type ContractRepository

type ContractRepository interface {
	CreateContract(contract core.Contract) error
	GetContract(contractHash string) (core.Contract, error)
	ContractExists(contractHash string) (bool, error)
}

type FilterRepository

type FilterRepository interface {
	CreateFilter(filter filters.LogFilter) error
	GetFilter(name string) (filters.LogFilter, error)
}

type HeaderRepository

type HeaderRepository interface {
	CreateOrUpdateHeader(header core.Header) (int64, error)
	CreateTransactions(headerID int64, transactions []core.TransactionModel) error
	GetHeader(blockNumber int64) (core.Header, error)
	MissingBlockNumbers(startingBlockNumber, endingBlockNumber int64, nodeID string) ([]int64, error)
}

type LogRepository

type LogRepository interface {
	CreateLogs(logs []core.Log, receiptId int64) error
	GetLogs(address string, blockNumber int64) ([]core.Log, error)
}

type ReceiptRepository

type ReceiptRepository interface {
	CreateReceiptsAndLogs(blockId int64, receipts []core.Receipt) error
	CreateReceipt(blockId int64, receipt core.Receipt) (int64, error)
	GetReceipt(txHash string) (core.Receipt, error)
}

type WatchedEventRepository

type WatchedEventRepository interface {
	GetWatchedEvents(name string) ([]*core.WatchedEvent, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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