pagantis_elixir_tools v0.22.0 ElixirTools.Events.Event
A structure for working with events.
event_id_seed is used for event_id generation(UUID5) together with name & version.
So if all values are the same event will be updated.
Link to this section Summary
Link to this section Types
Specs
t() :: %ElixirTools.Events.Event{
event_id_seed: Ecto.UUID.t(),
event_id_seed_optional: String.t(),
name: String.t(),
occurred_at: DateTime.t() | nil,
payload: map(),
version: String.t()
}
Link to this section Functions
Link to this function
publish(event, schema, opts \\ [])
Specs
publish(t(), event_schema(), [publish_opts()]) :: return()
Link to this function
publish_deprecated(event, opts \\ [])
Specs
publish_deprecated(t(), [publish_opts()]) :: return()
Link to this function
validate(event)
Specs
validate(t()) :: return()
Link to this function
validate_json_schema(event, schema)
Specs
validate_json_schema(map(), event_schema()) :: return()