Documentation
¶
Index ¶
Constants ¶
View Source
const OccurredAtLayout = "2006-01-02T15:04:05.000Z07:00"
Variables ¶
This section is empty.
Functions ¶
func DecodeDomainEvent ¶
func DecodeDomainEvent(payload []byte) (event.DomainEvent, error)
func EncodeDomainEvent ¶
func EncodeDomainEvent(evt event.DomainEvent) ([]byte, error)
func MetadataFromEvent ¶
func MetadataFromEvent(evt event.DomainEvent, source string) map[string]string
Types ¶
type Envelope ¶
type Envelope struct {
ID string `json:"id"`
EventType string `json:"eventType"`
OccurredAt time.Time `json:"occurredAt"`
AggregateType string `json:"aggregateType"`
AggregateID string `json:"aggregateID"`
Data json.RawMessage `json:"data"`
}
func DecodeEnvelope ¶
type PayloadDecoder ¶
type PayloadDecoder func([]byte) (event.DomainEvent, error)
type PayloadEncoder ¶
type PayloadEncoder func(event.DomainEvent) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.