Abstract
__new__(*args, **kwargs)
Singleton pattern implementation.
build_event(event_data)
Build an event object from the provided data.
| PARAMETER | DESCRIPTION |
|---|---|
event_data
|
event data.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Event
|
types.Event: event object. |
enqueue_event(event)
Enqueue an event to be written to the repository.
| PARAMETER | DESCRIPTION |
|---|---|
event
|
event to write.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |
filter_events(filters)
abstractmethod
Filters events based on provided filter criteria.
| PARAMETER | DESCRIPTION |
|---|---|
filters
|
filters to apply.
TYPE:
|
get_event(event_id)
abstractmethod
Retrieves a single event from the repository.
| PARAMETER | DESCRIPTION |
|---|---|
event_id
|
event ID.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Event | None
|
types.Event | None: event object or None if not found. |
get_name()
abstractmethod
classmethod
Return the name of the repository.
| RETURNS | DESCRIPTION |
|---|---|
str
|
name of the repository.
TYPE:
|
remove_all_events()
Removes all events from the repository.
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |
remove_event(event_id)
Removes a single event from the repository.
| PARAMETER | DESCRIPTION |
|---|---|
event_id
|
event ID.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |
remove_events(filters)
Removes a filtered set of events from the repository.
| PARAMETER | DESCRIPTION |
|---|---|
filters
|
filters to apply.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |
test_connection()
abstractmethod
Test the connection to the repository.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
whether the connection was successful.
TYPE:
|
write_event(event)
abstractmethod
Writes a single event to the repository.
| PARAMETER | DESCRIPTION |
|---|---|
event
|
event to write.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |
write_events(events)
Write multiple events to the repository.
| PARAMETER | DESCRIPTION |
|---|---|
events
|
events to write.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Result
|
types.Result: result of the operation. |