Documentation ¶
Index ¶
- Variables
- type MockConverter
- func (converter *MockConverter) SetToEntityConverterError(err error)
- func (c *MockConverter) SetToModelConverterError(err error)
- func (converter *MockConverter) ToEntities(contractAbi string, ethLogs []types.Log) ([]interface{}, error)
- func (converter *MockConverter) ToModels(entities []interface{}) ([]interface{}, error)
- type MockEventTransformer
- func (mh *MockEventTransformer) Execute(logs []types.Log, header core.Header, ...) error
- func (mh *MockEventTransformer) FakeEventTransformerInitializer(db *postgres.DB) transformer.EventTransformer
- func (mh *MockEventTransformer) GetConfig() transformer.EventTransformerConfig
- func (mh *MockEventTransformer) SetEventTransformerConfig(config transformer.EventTransformerConfig)
- type MockLogFetcher
- func (mlf *MockLogFetcher) FetchLogs(contractAddresses []common.Address, topics []common.Hash, header core.Header) ([]types.Log, error)
- func (mlf *MockLogFetcher) SetBC(bc core.BlockChain)
- func (mlf *MockLogFetcher) SetFetchedLogs(logs []types.Log)
- func (mlf *MockLogFetcher) SetFetcherError(err error)
- type MockLogNoteConverter
- type MockMappings
- type MockRepository
- func (repository *MockRepository) AssertMarkHeaderCheckedCalledWith(i int64)
- func (repository *MockRepository) AssertMarkHeaderCheckedNotCalled()
- func (repository *MockRepository) Create(headerID int64, models []interface{}) error
- func (repository *MockRepository) MarkHeaderChecked(headerID int64) error
- func (repository *MockRepository) MissingHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)
- func (repository *MockRepository) RecheckHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)
- func (repository *MockRepository) SetAllHeaders(headers []core.Header)
- func (repository *MockRepository) SetCreateError(e error)
- func (repository *MockRepository) SetDB(db *postgres.DB)
- func (repository *MockRepository) SetMarkHeaderCheckedError(e error)
- func (repository *MockRepository) SetMissingHeaders(headers []core.Header)
- func (repository *MockRepository) SetMissingHeadersError(e error)
- type MockStorageRepository
- type MockStorageTransformer
Constants ¶
This section is empty.
Variables ¶
View Source
var FakeTransformerConfig = transformer.EventTransformerConfig{ TransformerName: "FakeTransformer", ContractAddresses: []string{"FakeAddress"}, Topic: "FakeTopic", }
Functions ¶
This section is empty.
Types ¶
type MockConverter ¶
type MockConverter struct { ToEntitiesError error PassedContractAddresses []string ToModelsError error ContractAbi string LogsToConvert []types.Log EntitiesToConvert []interface{} EntitiesToReturn []interface{} ModelsToReturn []interface{} ToEntitiesCalledCounter int ToModelsCalledCounter int // contains filtered or unexported fields }
func (*MockConverter) SetToEntityConverterError ¶
func (converter *MockConverter) SetToEntityConverterError(err error)
func (*MockConverter) SetToModelConverterError ¶
func (c *MockConverter) SetToModelConverterError(err error)
func (*MockConverter) ToEntities ¶
func (converter *MockConverter) ToEntities(contractAbi string, ethLogs []types.Log) ([]interface{}, error)
func (*MockConverter) ToModels ¶
func (converter *MockConverter) ToModels(entities []interface{}) ([]interface{}, error)
type MockEventTransformer ¶ added in v0.2.2
type MockEventTransformer struct { ExecuteWasCalled bool ExecuteError error PassedLogs []types.Log PassedHeader core.Header // contains filtered or unexported fields }
func (*MockEventTransformer) Execute ¶ added in v0.2.2
func (mh *MockEventTransformer) Execute(logs []types.Log, header core.Header, recheckHeaders constants.TransformerExecution) error
func (*MockEventTransformer) FakeEventTransformerInitializer ¶ added in v0.2.2
func (mh *MockEventTransformer) FakeEventTransformerInitializer(db *postgres.DB) transformer.EventTransformer
func (*MockEventTransformer) GetConfig ¶ added in v0.2.2
func (mh *MockEventTransformer) GetConfig() transformer.EventTransformerConfig
func (*MockEventTransformer) SetEventTransformerConfig ¶ added in v0.2.2
func (mh *MockEventTransformer) SetEventTransformerConfig(config transformer.EventTransformerConfig)
type MockLogFetcher ¶
type MockLogFetcher struct { FetchedContractAddresses [][]common.Address FetchedTopics [][]common.Hash FetchedBlocks []int64 FetchedLogs []types.Log SetBcCalled bool FetchLogsCalled bool // contains filtered or unexported fields }
func (*MockLogFetcher) SetBC ¶
func (mlf *MockLogFetcher) SetBC(bc core.BlockChain)
func (*MockLogFetcher) SetFetchedLogs ¶
func (mlf *MockLogFetcher) SetFetchedLogs(logs []types.Log)
func (*MockLogFetcher) SetFetcherError ¶
func (mlf *MockLogFetcher) SetFetcherError(err error)
type MockLogNoteConverter ¶
type MockLogNoteConverter struct { PassedLogs []types.Log ToModelsCalledCounter int // contains filtered or unexported fields }
func (*MockLogNoteConverter) SetConverterError ¶
func (converter *MockLogNoteConverter) SetConverterError(e error)
func (*MockLogNoteConverter) SetReturnModels ¶
func (converter *MockLogNoteConverter) SetReturnModels(models []interface{})
type MockMappings ¶
type MockMappings struct { Metadata utils.StorageValueMetadata LookupCalled bool LookupErr error }
func (*MockMappings) Lookup ¶
func (mappings *MockMappings) Lookup(key common.Hash) (utils.StorageValueMetadata, error)
func (*MockMappings) SetDB ¶
func (*MockMappings) SetDB(db *postgres.DB)
type MockRepository ¶
type MockRepository struct { MarkHeaderCheckedPassedHeaderIDs []int64 CreatedHeaderIds []int64 PassedStartingBlockNumber int64 PassedEndingBlockNumber int64 PassedHeaderID int64 PassedModels []interface{} SetDbCalled bool CreateCalledCounter int // contains filtered or unexported fields }
func (*MockRepository) AssertMarkHeaderCheckedCalledWith ¶
func (repository *MockRepository) AssertMarkHeaderCheckedCalledWith(i int64)
func (*MockRepository) AssertMarkHeaderCheckedNotCalled ¶
func (repository *MockRepository) AssertMarkHeaderCheckedNotCalled()
func (*MockRepository) Create ¶
func (repository *MockRepository) Create(headerID int64, models []interface{}) error
func (*MockRepository) MarkHeaderChecked ¶
func (repository *MockRepository) MarkHeaderChecked(headerID int64) error
func (*MockRepository) MissingHeaders ¶
func (repository *MockRepository) MissingHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)
func (*MockRepository) RecheckHeaders ¶
func (repository *MockRepository) RecheckHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)
func (*MockRepository) SetAllHeaders ¶
func (repository *MockRepository) SetAllHeaders(headers []core.Header)
func (*MockRepository) SetCreateError ¶
func (repository *MockRepository) SetCreateError(e error)
func (*MockRepository) SetDB ¶
func (repository *MockRepository) SetDB(db *postgres.DB)
func (*MockRepository) SetMarkHeaderCheckedError ¶
func (repository *MockRepository) SetMarkHeaderCheckedError(e error)
func (*MockRepository) SetMissingHeaders ¶
func (repository *MockRepository) SetMissingHeaders(headers []core.Header)
func (*MockRepository) SetMissingHeadersError ¶
func (repository *MockRepository) SetMissingHeadersError(e error)
type MockStorageRepository ¶
type MockStorageRepository struct { CreateErr error PassedBlockNumber int PassedBlockHash string PassedMetadata utils.StorageValueMetadata PassedValue interface{} }
func (*MockStorageRepository) Create ¶
func (repository *MockStorageRepository) Create(blockNumber int, blockHash string, metadata utils.StorageValueMetadata, value interface{}) error
func (*MockStorageRepository) SetDB ¶
func (*MockStorageRepository) SetDB(db *postgres.DB)
type MockStorageTransformer ¶
type MockStorageTransformer struct { Address common.Address ExecuteErr error PassedRow utils.StorageDiffRow }
func (*MockStorageTransformer) ContractAddress ¶
func (transformer *MockStorageTransformer) ContractAddress() common.Address
func (*MockStorageTransformer) Execute ¶
func (transformer *MockStorageTransformer) Execute(row utils.StorageDiffRow) error
func (*MockStorageTransformer) FakeTransformerInitializer ¶
func (transformer *MockStorageTransformer) FakeTransformerInitializer(db *postgres.DB) transformer.StorageTransformer
Click to show internal directories.
Click to hide internal directories.