Skip to content

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: EventData

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: Event

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: Filters

get_event(event_id) abstractmethod

Retrieves a single event from the repository.

PARAMETER DESCRIPTION
event_id

event ID.

TYPE: str

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: str

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: Any

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: Filters

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: bool

write_event(event) abstractmethod

Writes a single event to the repository.

PARAMETER DESCRIPTION
event

event to write.

TYPE: Event

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: Iterable[Event]

RETURNS DESCRIPTION
Result

types.Result: result of the operation.