db

package
v0.0.0-...-f940b1b Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeleteOneModelIntoOperations

func AddDeleteOneModelIntoOperations(operations *[]mongo.WriteModel, model interface{})

func AddInsertOneModelIntoOperations

func AddInsertOneModelIntoOperations(operations *[]mongo.WriteModel, model interface{})

Types

type MongoDBProcessor

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

func CreateMongoDBProcessor

func CreateMongoDBProcessor() (*MongoDBProcessor, error)

func (*MongoDBProcessor) CreateBlocksIndexes

func (m *MongoDBProcessor) CreateBlocksIndexes(found bool) error

func (*MongoDBProcessor) CreateIndexes

func (m *MongoDBProcessor) CreateIndexes() error

func (*MongoDBProcessor) CreateTokenHoldersIndexes

func (m *MongoDBProcessor) CreateTokenHoldersIndexes(found bool) error

func (*MongoDBProcessor) CreateTokenRelatedTxsIndexes

func (m *MongoDBProcessor) CreateTokenRelatedTxsIndexes(found bool) error

func (*MongoDBProcessor) CreateTokenTxsIndexes

func (m *MongoDBProcessor) CreateTokenTxsIndexes(found bool) error

func (*MongoDBProcessor) CreateTransferTokenTxsIndexes

func (m *MongoDBProcessor) CreateTransferTokenTxsIndexes(found bool) error

func (*MongoDBProcessor) GetBlockByNumber

func (m *MongoDBProcessor) GetBlockByNumber(number int64) (*models.Block, error)

func (*MongoDBProcessor) GetLastBlock

func (m *MongoDBProcessor) GetLastBlock() (*models.Block, error)

func (*MongoDBProcessor) GetTokenHolder

func (m *MongoDBProcessor) GetTokenHolder(tokenTxHash common.Hash, address common.Address) (*models.TokenHolder, error)

func (*MongoDBProcessor) GetTokenHolders

func (m *MongoDBProcessor) GetTokenHolders(transferTokenTx *models.TransferTokenTx) (models.TokenHolders, error)

func (*MongoDBProcessor) GetTokenHoldersWithCache

func (m *MongoDBProcessor) GetTokenHoldersWithCache(transferTokenTx *models.TransferTokenTx, cache models.TokenHoldersCache) (models.TokenHolders, error)

func (*MongoDBProcessor) GetTokenTxsByBlockNumber

func (m *MongoDBProcessor) GetTokenTxsByBlockNumber(blockNumber int64) ([]*models.TokenTx, error)

func (*MongoDBProcessor) GetTransferTokenTxsByBlockNumber

func (m *MongoDBProcessor) GetTransferTokenTxsByBlockNumber(blockNumber int64) ([]*models.TransferTokenTx, error)

func (*MongoDBProcessor) IsCollectionExists

func (m *MongoDBProcessor) IsCollectionExists(collectionName string) (bool, error)

func (*MongoDBProcessor) IsDataBaseExists

func (m *MongoDBProcessor) IsDataBaseExists(dbName string) (bool, error)

func (*MongoDBProcessor) ProcessBlock

func (m *MongoDBProcessor) ProcessBlock(b *generated.Block) error

func (*MongoDBProcessor) RevertLastBlock

func (m *MongoDBProcessor) RevertLastBlock() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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