Versions in this module Expand all Collapse all v0 v0.0.1 Nov 4, 2022 Changes in this version + var ErrMismatchEvent = errors.New("mismatched event") + type Base struct + BlockHeight int64 + EventName string + EventUUID string + EventVersion int + func NewBase(params BaseParams) Base + func (event *Base) Height() int64 + func (event *Base) Name() string + func (event *Base) UUID() string + func (event *Base) Version() int + type BaseParams struct + BlockHeight int64 + Name string + Version int + type Decoder = func([]byte) (Event, error) + type Event interface + Height func() int64 + Name func() string + String func() string + ToJSON func() (string, error) + UUID func() string + Version func() int + type Registry struct + func NewRegistry() *Registry + func (registry *Registry) DecodeByType(eventName string, eventVersion int, encoded []byte) (Event, error) + func (registry *Registry) IsRegistered(eventName string, eventVersion int) bool + func (registry *Registry) Register(eventName string, eventVersion int, decoder Decoder) + type Store interface + GetAllByHeight func(height int64) ([]Event, error) + GetLatestHeight func() (*int64, error) + Insert func(evt Event) error + InsertAll func(evt []Event) error