EventStoreLite.Notifications.Notification (EventStoreLite v0.1.0)

Copy Markdown View Source

Represents a committed range of events in a stream.

Parsed from a comma-separated payload containing the stream UUID, stream ID, and the first and last stream versions of newly appended events.

Examples:

iex> EventStoreLite.Notifications.Notification.new("stream-12345,1,2,5")
%EventStoreLite.Notifications.Notification{
  stream_uuid: "stream-12345",
  stream_id: 1,
  from_stream_version: 2,
  to_stream_version: 5
}

Summary

Functions

Parses a comma-separated range payload and builds a new struct.

Functions

new(payload)

Parses a comma-separated range payload and builds a new struct.

Example

iex> EventStoreLite.Notifications.Notification.new("stream-12345,1,1,5")
%EventStoreLite.Notifications.Notification{
  stream_uuid: "stream-12345",
  stream_id: 1,
  from_stream_version: 1,
  to_stream_version: 5
}