repositories

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: AGPL-3.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHeaderRepository

func NewHeaderRepository(database *postgres.DB) headerRepository

Types

type CheckedHeadersRepository added in v0.0.10

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

func NewCheckedHeadersRepository added in v0.0.10

func NewCheckedHeadersRepository(db *postgres.DB, schemaName string) (*CheckedHeadersRepository, error)

func (CheckedHeadersRepository) MarkHeaderChecked added in v0.0.10

func (repo CheckedHeadersRepository) MarkHeaderChecked(headerID int64) error

Increment check_count for header

func (CheckedHeadersRepository) MarkSingleHeaderUnchecked added in v0.1.0

func (repo CheckedHeadersRepository) MarkSingleHeaderUnchecked(blockNumber int64) error

Zero out check count for header with the given block number

func (CheckedHeadersRepository) UncheckedHeaders added in v0.0.10

func (repo CheckedHeadersRepository) UncheckedHeaders(startingBlockNumber, endingBlockNumber, checkCount int64) ([]core.Header, error)

Return header if check_count < passed checkCount

type CheckedLogsRepository added in v0.0.10

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

func NewCheckedLogsRepository added in v0.0.10

func NewCheckedLogsRepository(db *postgres.DB) CheckedLogsRepository

func (CheckedLogsRepository) AlreadyWatchingLog added in v0.0.10

func (repository CheckedLogsRepository) AlreadyWatchingLog(addresses []string, topic0 string) (bool, error)

Return whether a given address + topic0 has been fetched on a previous run of vDB

func (CheckedLogsRepository) MarkLogWatched added in v0.0.10

func (repository CheckedLogsRepository) MarkLogWatched(addresses []string, topic0 string) error

Persist that a given address + topic0 has is being fetched on this run of vDB

type EventLogRepository added in v0.1.0

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

func NewEventLogRepository added in v0.1.0

func NewEventLogRepository(db *postgres.DB) EventLogRepository

func (EventLogRepository) CreateEventLogs added in v0.1.0

func (repo EventLogRepository) CreateEventLogs(headerID int64, logs []types.Log) error

func (EventLogRepository) GetUntransformedEventLogs added in v0.1.0

func (repo EventLogRepository) GetUntransformedEventLogs(minID, limit int) ([]core.EventLog, error)

type ReceiptRepository

type ReceiptRepository struct{}

func (ReceiptRepository) CreateReceiptInTx added in v0.1.0

func (ReceiptRepository) CreateReceiptInTx(headerID, transactionID int64, receipt core.Receipt, tx *sqlx.Tx) (int64, error)

type SchemaQuery added in v0.1.0

type SchemaQuery struct {
	SchemaName string `db:"schema_name"`
}

Jump to

Keyboard shortcuts

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