Documentation ¶
Index ¶
- Variables
- type MockConverter
- type MockEventTransformer
- func (t *MockEventTransformer) Execute(logs []core.HeaderSyncLog) error
- func (t *MockEventTransformer) FakeTransformerInitializer(db *postgres.DB) transformer.EventTransformer
- func (t *MockEventTransformer) GetConfig() transformer.EventTransformerConfig
- func (t *MockEventTransformer) SetTransformerConfig(config transformer.EventTransformerConfig)
- type MockLogDelegator
- type MockLogExtractor
- type MockLogFetcher
- type MockStorageFetcher
- type MockStorageKeysLoader
- type MockStorageKeysLookup
- type MockStorageQueue
- type MockStorageRepository
- type MockStorageTransformer
Constants ¶
This section is empty.
Variables ¶
View Source
var FakeTransformerConfig = transformer.EventTransformerConfig{ TransformerName: "FakeTransformer", ContractAddresses: []string{fakes.FakeAddress.Hex()}, Topic: fakes.FakeHash.Hex(), }
Functions ¶
This section is empty.
Types ¶
type MockConverter ¶
type MockConverter struct { ToModelsError error ContractAbi string LogsToConvert []core.HeaderSyncLog PassedContractAddresses []string ToModelsCalledCounter int }
func (*MockConverter) ToModels ¶
func (converter *MockConverter) ToModels(abi string, logs []core.HeaderSyncLog, _ *postgres.DB) ([]event.InsertionModel, error)
type MockEventTransformer ¶ added in v0.0.10
type MockEventTransformer struct { ExecuteWasCalled bool ExecuteError error PassedLogs []core.HeaderSyncLog // contains filtered or unexported fields }
func (*MockEventTransformer) Execute ¶ added in v0.0.10
func (t *MockEventTransformer) Execute(logs []core.HeaderSyncLog) error
func (*MockEventTransformer) FakeTransformerInitializer ¶ added in v0.0.10
func (t *MockEventTransformer) FakeTransformerInitializer(db *postgres.DB) transformer.EventTransformer
func (*MockEventTransformer) GetConfig ¶ added in v0.0.10
func (t *MockEventTransformer) GetConfig() transformer.EventTransformerConfig
func (*MockEventTransformer) SetTransformerConfig ¶ added in v0.0.10
func (t *MockEventTransformer) SetTransformerConfig(config transformer.EventTransformerConfig)
type MockLogDelegator ¶ added in v0.0.10
type MockLogDelegator struct { AddedTransformers []transformer.EventTransformer DelegateCallCount int DelegateErrors []error }
func (*MockLogDelegator) AddTransformer ¶ added in v0.0.10
func (delegator *MockLogDelegator) AddTransformer(t transformer.EventTransformer)
func (*MockLogDelegator) DelegateLogs ¶ added in v0.0.10
func (delegator *MockLogDelegator) DelegateLogs() error
type MockLogExtractor ¶ added in v0.0.10
type MockLogExtractor struct { AddedConfigs []transformer.EventTransformerConfig AddTransformerConfigError error ExtractLogsCount int ExtractLogsErrors []error }
func (*MockLogExtractor) AddTransformerConfig ¶ added in v0.0.10
func (extractor *MockLogExtractor) AddTransformerConfig(config transformer.EventTransformerConfig) error
func (*MockLogExtractor) ExtractLogs ¶ added in v0.0.10
func (extractor *MockLogExtractor) ExtractLogs(recheckHeaders constants.TransformerExecution) error
type MockLogFetcher ¶ added in v0.0.10
type MockStorageFetcher ¶ added in v0.0.2
func NewMockStorageFetcher ¶ added in v0.0.2
func NewMockStorageFetcher() *MockStorageFetcher
func (*MockStorageFetcher) FetchStorageDiffs ¶ added in v0.0.2
func (fetcher *MockStorageFetcher) FetchStorageDiffs(out chan<- storage.RawDiff, errs chan<- error)
type MockStorageKeysLoader ¶ added in v0.0.10
type MockStorageKeysLoader struct { LoadMappingsCallCount int LoadMappingsError error SetDBCalled bool StorageKeyMappings map[common.Hash]storage.ValueMetadata }
func (*MockStorageKeysLoader) LoadMappings ¶ added in v0.0.10
func (loader *MockStorageKeysLoader) LoadMappings() (map[common.Hash]storage.ValueMetadata, error)
func (*MockStorageKeysLoader) SetDB ¶ added in v0.0.10
func (loader *MockStorageKeysLoader) SetDB(db *postgres.DB)
type MockStorageKeysLookup ¶ added in v0.0.10
type MockStorageKeysLookup struct { Metadata storage.ValueMetadata LookupCalled bool LookupErr error }
func (*MockStorageKeysLookup) Lookup ¶ added in v0.0.10
func (mappings *MockStorageKeysLookup) Lookup(key common.Hash) (storage.ValueMetadata, error)
func (*MockStorageKeysLookup) SetDB ¶ added in v0.0.10
func (*MockStorageKeysLookup) SetDB(db *postgres.DB)
type MockStorageQueue ¶
type MockStorageQueue struct { AddCalled bool AddError error AddPassedDiff storage.PersistedDiff DeleteCalled bool DeleteErr error DeletePassedId int64 GetAllErr error DiffsToReturn []storage.PersistedDiff }
func (*MockStorageQueue) Add ¶
func (queue *MockStorageQueue) Add(diff storage.PersistedDiff) error
func (*MockStorageQueue) Delete ¶ added in v0.0.2
func (queue *MockStorageQueue) Delete(id int64) error
func (*MockStorageQueue) GetAll ¶ added in v0.0.2
func (queue *MockStorageQueue) GetAll() ([]storage.PersistedDiff, error)
type MockStorageRepository ¶
type MockStorageRepository struct { CreateErr error PassedHeaderID int64 PassedDiffID int64 PassedMetadata storage.ValueMetadata PassedValue interface{} }
func (*MockStorageRepository) Create ¶
func (repository *MockStorageRepository) Create(diffID, headerID int64, metadata storage.ValueMetadata, value interface{}) error
func (*MockStorageRepository) SetDB ¶
func (*MockStorageRepository) SetDB(db *postgres.DB)
type MockStorageTransformer ¶
type MockStorageTransformer struct { KeccakOfAddress common.Hash ExecuteErr error PassedDiff storage.PersistedDiff }
func (*MockStorageTransformer) Execute ¶
func (transformer *MockStorageTransformer) Execute(diff storage.PersistedDiff) error
func (*MockStorageTransformer) FakeTransformerInitializer ¶
func (transformer *MockStorageTransformer) FakeTransformerInitializer(db *postgres.DB) transformer.StorageTransformer
func (*MockStorageTransformer) KeccakContractAddress ¶ added in v0.0.10
func (transformer *MockStorageTransformer) KeccakContractAddress() common.Hash
Click to show internal directories.
Click to hide internal directories.