Documentation ¶
Index ¶
- Variables
- type BlockRepository
- func (blockRepository BlockRepository) CreateOrUpdateBlock(block core.Block) (int64, error)
- func (blockRepository BlockRepository) GetBlock(blockNumber int64) (core.Block, error)
- func (blockRepository BlockRepository) LoadTransactions(transactionRows *sqlx.Rows) []core.TransactionModel
- func (blockRepository BlockRepository) MissingBlockNumbers(startingBlockNumber int64, highestBlockNumber int64, nodeId string) []int64
- func (blockRepository BlockRepository) SetBlocksStatus(chainHead int64) error
- type ContractRepository
- type DBLogFilter
- type DBTopics
- type FilterRepository
- type HeaderRepository
- func (repository HeaderRepository) CreateOrUpdateHeader(header core.Header) (int64, error)
- func (repository HeaderRepository) CreateReceiptInTx(tx *sqlx.Tx, headerID, transactionID int64, receipt core.Receipt) (int64, error)
- func (repository HeaderRepository) CreateTransactionInTx(tx *sqlx.Tx, headerID int64, transaction core.TransactionModel) (int64, error)
- func (repository HeaderRepository) CreateTransactions(headerID int64, transactions []core.TransactionModel) error
- func (repository HeaderRepository) GetHeader(blockNumber int64) (core.Header, error)
- func (repository HeaderRepository) MissingBlockNumbers(startingBlockNumber, endingBlockNumber int64, nodeID string) ([]int64, error)
- type LogRepository
- type ReceiptRepository
- func (receiptRepository ReceiptRepository) CreateReceipt(blockId int64, receipt core.Receipt) (int64, error)
- func (receiptRepository ReceiptRepository) CreateReceiptsAndLogs(blockId int64, receipts []core.Receipt) error
- func (receiptRepository ReceiptRepository) GetReceipt(txHash string) (core.Receipt, error)
- type WatchedEventRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBlockExists = errors.New("Won't add block that already exists.")
View Source
var ErrValidHeaderExists = errors.New("valid header already exists")
Functions ¶
This section is empty.
Types ¶
type BlockRepository ¶
type BlockRepository struct {
// contains filtered or unexported fields
}
func NewBlockRepository ¶
func NewBlockRepository(database *postgres.DB) *BlockRepository
func (BlockRepository) CreateOrUpdateBlock ¶
func (blockRepository BlockRepository) CreateOrUpdateBlock(block core.Block) (int64, error)
func (BlockRepository) GetBlock ¶
func (blockRepository BlockRepository) GetBlock(blockNumber int64) (core.Block, error)
func (BlockRepository) LoadTransactions ¶
func (blockRepository BlockRepository) LoadTransactions(transactionRows *sqlx.Rows) []core.TransactionModel
func (BlockRepository) MissingBlockNumbers ¶
func (blockRepository BlockRepository) MissingBlockNumbers(startingBlockNumber int64, highestBlockNumber int64, nodeId string) []int64
func (BlockRepository) SetBlocksStatus ¶
func (blockRepository BlockRepository) SetBlocksStatus(chainHead int64) error
type ContractRepository ¶
func (ContractRepository) ContractExists ¶
func (contractRepository ContractRepository) ContractExists(contractHash string) (bool, error)
func (ContractRepository) CreateContract ¶
func (contractRepository ContractRepository) CreateContract(contract core.Contract) error
func (ContractRepository) GetContract ¶
func (contractRepository ContractRepository) GetContract(contractHash string) (core.Contract, error)
type FilterRepository ¶
func (FilterRepository) CreateFilter ¶
func (filterRepository FilterRepository) CreateFilter(query filters.LogFilter) error
type HeaderRepository ¶
type HeaderRepository struct {
// contains filtered or unexported fields
}
func NewHeaderRepository ¶
func NewHeaderRepository(database *postgres.DB) HeaderRepository
func (HeaderRepository) CreateOrUpdateHeader ¶
func (repository HeaderRepository) CreateOrUpdateHeader(header core.Header) (int64, error)
func (HeaderRepository) CreateReceiptInTx ¶
func (HeaderRepository) CreateTransactionInTx ¶
func (repository HeaderRepository) CreateTransactionInTx(tx *sqlx.Tx, headerID int64, transaction core.TransactionModel) (int64, error)
func (HeaderRepository) CreateTransactions ¶
func (repository HeaderRepository) CreateTransactions(headerID int64, transactions []core.TransactionModel) error
func (HeaderRepository) GetHeader ¶
func (repository HeaderRepository) GetHeader(blockNumber int64) (core.Header, error)
func (HeaderRepository) MissingBlockNumbers ¶
func (repository HeaderRepository) MissingBlockNumbers(startingBlockNumber, endingBlockNumber int64, nodeID string) ([]int64, error)
type LogRepository ¶
func (LogRepository) CreateLogs ¶
func (logRepository LogRepository) CreateLogs(lgs []core.Log, receiptId int64) error
type ReceiptRepository ¶
func (ReceiptRepository) CreateReceipt ¶
func (ReceiptRepository) CreateReceiptsAndLogs ¶
func (receiptRepository ReceiptRepository) CreateReceiptsAndLogs(blockId int64, receipts []core.Receipt) error
func (ReceiptRepository) GetReceipt ¶
func (receiptRepository ReceiptRepository) GetReceipt(txHash string) (core.Receipt, error)
type WatchedEventRepository ¶
func (WatchedEventRepository) GetWatchedEvents ¶
func (watchedEventRepository WatchedEventRepository) GetWatchedEvents(name string) ([]*core.WatchedEvent, error)
Click to show internal directories.
Click to hide internal directories.