datastore

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: AGPL-3.0 Imports: 5 Imported by: 6

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 AddressRepository added in v0.0.6

type AddressRepository interface {
	GetOrCreateAddress(address string) (int, error)
}

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 CheckedHeadersRepository added in v0.0.7

type CheckedHeadersRepository interface {
	MarkHeaderChecked(headerID int64) error
	MarkHeadersUnchecked(startingBlockNumber int64) error
	UncheckedHeaders(startingBlockNumber, endingBlockNumber, checkCount int64) ([]core.Header, error)
}

type CheckedLogsRepository added in v0.0.7

type CheckedLogsRepository interface {
	AlreadyWatchingLog(addresses []string, topic0 string) (bool, error)
	MarkLogWatched(addresses []string, topic0 string) 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 FullSyncLogRepository added in v0.0.7

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

type FullSyncReceiptRepository added in v0.0.6

type FullSyncReceiptRepository interface {
	CreateReceiptsAndLogs(blockId int64, receipts []core.Receipt) error
	CreateFullSyncReceiptInTx(blockId int64, receipt core.Receipt, tx *sqlx.Tx) (int64, error)
	GetFullSyncReceipt(txHash string) (core.Receipt, 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 HeaderSyncLogRepository added in v0.0.7

type HeaderSyncLogRepository interface {
	GetUntransformedHeaderSyncLogs() ([]core.HeaderSyncLog, error)
	CreateHeaderSyncLogs(headerID int64, logs []types.Log) error
}

type HeaderSyncReceiptRepository added in v0.0.6

type HeaderSyncReceiptRepository interface {
	CreateFullSyncReceiptInTx(blockId int64, receipt core.Receipt, tx *sqlx.Tx) (int64, 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