event

package
v0.0.0-...-6ed1490 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	Version() uint64
	EventType() string
}

Event interface over event created by user.

type EventUnmarshaler

type EventUnmarshaler struct {
	Version     uint64
	EventType   string
	AggregateId string
	GroupId     string
	Unmarshal   func(v interface{}) error
}

EventUnmarshaler provides event.

type Handler

type Handler interface {
	Handle(ctx context.Context, iter Iter) (err error)
}

Handler provides handler for eventstore or eventbus.

type Iter

type Iter interface {
	Next(ctx context.Context, eventUnmarshaler *EventUnmarshaler) bool
	Err() error
}

Iter provides iterator over events from eventstore or eventbus.

type MarshalerFunc

type MarshalerFunc func(v interface{}) ([]byte, error)

MarshalerFunc marshal struct to bytes.

type UnmarshalerFunc

type UnmarshalerFunc func(b []byte, v interface{}) error

UnmarshalerFunc unmarshal bytes to pointer of struct.

Jump to

Keyboard shortcuts

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