events

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterEvents

func FilterEvents[T proto.Message](
	t *testing.T,
	allEvents cosmostypes.Events,
) (parsedEvents []T)

FilterEvents filters allEvents, returning list of T type events whose protobuf message type string matches protoType.

func GetAttributeValue added in v0.0.10

func GetAttributeValue(
	event *cosmostypes.Event,
	key string,
) (value string, hasAttr bool)

GetAttributeValue returns the value of the attribute with the given key in the event. The returned attribute value is trimmed of any quotation marks. If the attribute does not exist, hasAttr is false.

func NewEventTypeMatchFn added in v0.0.10

func NewEventTypeMatchFn(matchEventType string) func(*cosmostypes.Event) bool

NewEventTypeMatchFn returns a function that matches events whose type is "message" and whose "action" attribute matches the given message (protobuf message) type URL.

func NewMsgEventMatchFn added in v0.0.10

func NewMsgEventMatchFn(matchMsgTypeURL string) func(*cosmostypes.Event) bool

NewMsgEventMatchFn returns a function that matches events whose type equals the given event (protobuf message) type URL.

func QuoteEventMode

func QuoteEventMode(event *abci.Event)

QuoteEventMode quotes (i.e. URL escape) the value associated with the 'mode' key in the event. This is injected by the caller that emits the event and causes issues in calling 'ParseTypedEvent'.

func ResetEventManager added in v0.0.10

func ResetEventManager(ctx context.Context) (context.Context, cosmostypes.Context)

ResetEventManager re-initializes the cosmos event manager in the context such that prior event emissions are cleared. It returns the context as both a stdlib and cosmos context types.

Types

This section is empty.

Jump to

Keyboard shortcuts

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