Documentation ¶
Index ¶
- func BlockEventsAlreadyIndexed(blockHeight int64, chainID uint, db *gorm.DB) (bool, error)
- func CreateParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser, ...) error
- func FindOrCreateCustomParsers(db *gorm.DB, parsers map[string]models.BlockEventParser) error
- func GetAddresses(addressList []string, db *gorm.DB) ([]models.Address, error)
- func GetBlocksFromStart(db *gorm.DB, chainID uint, startHeight int64, endHeight int64) ([]models.Block, error)
- func GetDBChainID(db *gorm.DB, chain models.Chain) (uint, error)
- func GetFailedBlocks(db *gorm.DB, chainID uint) []models.FailedBlock
- func GetFirstMissingBlockInRange(db *gorm.DB, start, end int64, chainID uint) int64
- func GetHighestEventIndexedBlock(db *gorm.DB, chainID uint) (models.Block, error)
- func GetHighestIndexedBlock(db *gorm.DB, chainID uint) models.Block
- func IndexCustomBlockEvents(conf config.IndexConfig, db *gorm.DB, blockDBWrapper *BlockDBWrapper, ...) error
- func MigrateInterfaces(db *gorm.DB, interfaces []any) error
- func MigrateModels(db *gorm.DB) error
- func PostgresDbConnect(host string, port string, database string, user string, password string, ...) (*gorm.DB, error)
- func PostgresDbConnectLogInfo(host string, port string, database string, user string, password string) (*gorm.DB, error)
- func UpsertFailedBlock(db *gorm.DB, blockHeight int64, chainID string, chainName string) error
- func UpsertFailedEventBlock(db *gorm.DB, blockHeight int64, chainID string, chainName string) error
- type BlockDBWrapper
- type BlockEventDBWrapper
- type DenomDBWrapper
- type MessageDBWrapper
- type MessageEventDBWrapper
- type TxDBWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateParserError ¶
func CreateParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser, parserError error) error
func GetBlocksFromStart ¶
func GetFailedBlocks ¶
func GetFailedBlocks(db *gorm.DB, chainID uint) []models.FailedBlock
func IndexCustomBlockEvents ¶
func IndexCustomBlockEvents(conf config.IndexConfig, db *gorm.DB, blockDBWrapper *BlockDBWrapper, identifierLoggingString string, beginBlockParserTrackers map[string]models.BlockEventParser, endBlockParserTrackers map[string]models.BlockEventParser) error
func MigrateModels ¶
MigrateModels runs the gorm automigrations with all the db models. This will migrate as needed and do nothing if nothing has changed.
func PostgresDbConnect ¶
func PostgresDbConnect(host string, port string, database string, user string, password string, level string) (*gorm.DB, error)
PostgresDbConnect connects to the database according to the passed in parameters
func PostgresDbConnectLogInfo ¶
func PostgresDbConnectLogInfo(host string, port string, database string, user string, password string) (*gorm.DB, error)
PostgresDbConnect connects to the database according to the passed in parameters
func UpsertFailedBlock ¶
Types ¶
type BlockDBWrapper ¶
type BlockDBWrapper struct { Block *models.Block BeginBlockEvents []BlockEventDBWrapper EndBlockEvents []BlockEventDBWrapper UniqueBlockEventTypes map[string]models.BlockEventType UniqueBlockEventAttributeKeys map[string]models.BlockEventAttributeKey }
func IndexBlockEvents ¶
func IndexBlockEvents(db *gorm.DB, blockDBWrapper *BlockDBWrapper) (*BlockDBWrapper, error)
type BlockEventDBWrapper ¶
type BlockEventDBWrapper struct { BlockEvent models.BlockEvent Attributes []models.BlockEventAttribute BlockEventParsedDatasets []parsers.BlockEventParsedData }
type DenomDBWrapper ¶
type MessageDBWrapper ¶
type MessageDBWrapper struct { Message models.Message MessageEvents []MessageEventDBWrapper }
type MessageEventDBWrapper ¶
type MessageEventDBWrapper struct { MessageEvent models.MessageEvent Attributes []models.MessageEventAttribute }
type TxDBWrapper ¶
type TxDBWrapper struct { Tx models.Tx Messages []MessageDBWrapper UniqueMessageTypes map[string]models.MessageType UniqueMessageEventTypes map[string]models.MessageEventType UniqueMessageAttributeKeys map[string]models.MessageEventAttributeKey }
func IndexNewBlock ¶
func IndexNewBlock(db *gorm.DB, block models.Block, txs []TxDBWrapper, indexerConfig config.IndexConfig) (models.Block, []TxDBWrapper, error)
Click to show internal directories.
Click to hide internal directories.