parser

package
v1.4.564 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrEventsCountDecoding  = libErr.Error("events count decoding")
	ErrEventPhaseDecoding   = libErr.Error("event phase decoding")
	ErrEventIDDecoding      = libErr.Error("event ID decoding")
	ErrEventDecoderNotFound = libErr.Error("event decoder not found")
	ErrEventFieldsDecoding  = libErr.Error("event fields decoding")
	ErrEventTopicsDecoding  = libErr.Error("event topics decoding")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Name    string
	Fields  registry.DecodedFields
	EventID types.EventID
	Phase   *types.Phase
	Topics  []types.Hash
}

Event holds all the information of a decoded storage event.

type EventParser

type EventParser interface {
	ParseEvents(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error)
}

EventParser is the interface used for parsing event storage data into []*Event.

func NewEventParser

func NewEventParser() EventParser

NewEventParser creates a new EventParser.

type EventParserFn

type EventParserFn func(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error)

EventParserFn implements EventParser.

func (EventParserFn) ParseEvents

func (f EventParserFn) ParseEvents(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error)

ParseEvents is the function required for satisfying the EventParser interface.

Jump to

Keyboard shortcuts

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