Class: EventEngine::EventDefinition
- Inherits:
-
Object
- Object
- EventEngine::EventDefinition
- Includes:
- Inputs, Payloads, Schemas, Validation
- Defined in:
- lib/event_engine/event_definition.rb,
lib/event_engine/event_definition/inputs.rb,
lib/event_engine/event_definition/schemas.rb,
lib/event_engine/event_definition/payloads.rb,
lib/event_engine/event_definition/validation.rb
Overview
Base class for defining events using the EventEngine DSL.
Subclass this to declare an event’s name, type, inputs, and payload fields. Definitions are compiled into a schema file at development time and are not used at runtime.
Defined Under Namespace
Modules: Inputs, Payloads, Schemas, Validation
Constant Summary collapse
- RESERVED_PAYLOAD_FIELDS =
Payload field names reserved by the outbox schema.
%i[ event_name event_type event_version occurred_at created_at updated_at published_at metadata idempotency_key attempts dead_lettered_at aggregate_type aggregate_id aggregate_version ].freeze
Class Method Summary collapse
- .domain(value) ⇒ Object
-
.event_name(value) ⇒ Object
Sets the event name for this definition.
-
.event_type(value) ⇒ Object
Sets the event type for this definition.
- .process_type(value) ⇒ Object
- .subject(value) ⇒ Object
Methods included from Schemas
Methods included from Validation
Methods included from Payloads
Methods included from Inputs
Class Method Details
.domain(value) ⇒ Object
71 72 73 |
# File 'lib/event_engine/event_definition.rb', line 71 def domain(value) @domain = value end |
.event_name(value) ⇒ Object
Sets the event name for this definition.
52 53 54 |
# File 'lib/event_engine/event_definition.rb', line 52 def event_name(value) @event_name = value end |
.event_type(value) ⇒ Object
Sets the event type for this definition.
59 60 61 |
# File 'lib/event_engine/event_definition.rb', line 59 def event_type(value) @event_type = value end |
.process_type(value) ⇒ Object
63 64 65 |
# File 'lib/event_engine/event_definition.rb', line 63 def process_type(value) @process_type = value end |
.subject(value) ⇒ Object
67 68 69 |
# File 'lib/event_engine/event_definition.rb', line 67 def subject(value) @subject = value end |