Documentation ¶
Index ¶
- Variables
- func DataOf[T any](e Event) T
- func From(event Event) *entry
- type AggID
- type Aggregate
- type Event
- func (e Event) Aggregate() (AggID, string, int)
- func (e Event) AggregateID() AggID
- func (e Event) Data() interface{}
- func (e Event) ID() ID
- func (e Event) MarshalBSON() ([]byte, error)
- func (e Event) Name() string
- func (e Event) Time() time.Time
- func (e *Event) UnmarshalBSON(data []byte) error
- func (e Event) Version() int
- type ID
- type IEvent
- type Metadata
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyEvent = Event{}
Functions ¶
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (Event) AggregateID ¶ added in v0.6.0
func (Event) MarshalBSON ¶
func (*Event) UnmarshalBSON ¶
type IEvent ¶
type IEvent interface { // ID returns the id of the event. ID() ID // Name returns the name of the event. Name() string // Time returns the time of the event. Time() time.Time // Data returns the event data. Data() interface{} // Aggregate returns the id, name and version of the aggregate that the // event belongs to. aggregate should return zero values if the event is not // an aggregate event. Aggregate() (id ids.ID, name string, version int) }
Click to show internal directories.
Click to hide internal directories.