eventuous library Null safety

A light-weight library for event sourcing with dart

Classes

Aggregate<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>>
Base class for implementing a model within a specific domain [...]
AggregateCommandErrorResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
AggregateCommandOkResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
AggregateCommandResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
AggregateCommandType
AggregateEventHandler<TEvent extends Object, TValue extends Object, TState extends AggregateState<TValue>>
AggregateEventType
AggregateEventTypes
AggregateId
AggregateState<TValue extends Object>
AggregateState base class.
AggregateStateError<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>>
AggregateStateNoOp<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>>
AggregateStateOk<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>>
AggregateStateResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>>
AggregateStateSnapshotModel<TValue extends Object>
AggregateStateStorage<TValue extends Object, TState extends AggregateState<TValue>>
Base class for storing snapshots of AggregateState. [...]
AggregateStateStorageSettings
AggregateStateType
AggregateStateTypes
AggregateStore<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
AggregateStore store maintains Aggregate instances. [...]
AggregateType
AggregateTypes
AggregateValueType
AggregateValueTypes
AppendEventsError
AppendEventsOk
AppendEventsResult
ApplicationServiceBase<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
Application service base class. A derived class should be scoped to handle commands for one aggregate type only. [...]
ApplicationType
DefaultEventSerializer<TData extends Object, TEvent extends Object>
EsdbSnapshotStorage<TData extends Object, TValue extends Object, TState extends AggregateState<TValue>>
EventSerializer<TEvent extends Object>
EventStoreDB
EventStoreResult
Eventuous
ExpectedStreamVersion
JsonObject
JsonUtils
Metadata
Class representing Metadata
RegisteredAggregateCommandHandler<TCommand extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
StreamEvent
StreamEventStore
Store of StreamEvents used by AggregateStore.
StreamName
Class implementing naming convention for event streams
StreamReadPosition
StreamTruncatePosition
WrongExpectedVersionResult

Mixins

ApplicationServiceMixin<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
Application service base mixin. [...]
OnAnyAggregateMixin<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
OnCreateAggregateMixin<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
OnUpdateAggregateMixin<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>>

Extensions

ExpectedStreamVersionX
MapX
StreamReadPositionX
StreamTruncatePositionX
StringX
TypeX

Constants

eventuous → const Eventuous
Max → const int
Use the largest 64-bit signed integer as maximum value
9223372036854775807

Functions

enumName(Object o) String
Get enum value name
typeOf<TAggregate>() Type
Type helper class

Enums

ExpectedState

Typedefs

AggregateCommandHandler<TCommand extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>> = FutureOr<void> Function(TCommand command, TAggregate aggregate)
AggregateCommandHandlersMap<TCommand extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>> = Map<Type, RegisteredAggregateCommandHandler<TCommand, TEvent, TValue, TId, TState, TAggregate>>
AggregateCreator<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>> = TAggregate Function(TId id, [TState? state])
Aggregate instance creator method. If state is not given, a new AggregateState instance must be created.
AggregateEventCreator<TData extends Object, TEvent extends Object> = TEvent Function(TData data)
AggregateEventHandlerCallback<TEvent extends Object, TValue extends Object, TState extends AggregateState<TValue>> = TState Function(TEvent event, TValue current)
AggregateEventList<TEvent extends Object> = UnmodifiableListView<TEvent>
AggregateIdMap<TState extends Object, TId extends AggregateId> = Map<Type, AggregateIdResolver<TState, TId>>
AggregateIdResolver<TState extends Object, TId extends AggregateId> = FutureOr<TId> Function(TState command)
AggregateStateCreator<TValue extends Object, TState extends AggregateState<TValue>> = TState Function([TValue? value, int? version])
New AggregateState instance creator method. If value is not given, a default value must be returned.
AggregateValueCreator<TData extends Object, TValue extends Object> = TValue Function([TData? data])
New aggregate state TValue instance creator method. If data is not given, a default value must be AggregateState.
JsonDocument = dynamic
JsonMap = Map<String, dynamic>
JsonMapList = List<JsonMap>

Exceptions / Errors

AggregateExistsException
AggregateNotFoundException
ArgumentNullOrEmptyException
The ArgumentException is thrown when an argument is null when it shouldn't be.
CommandHandlerNotFoundException
ConcurrentModificationException
DomainException
StreamException
StreamNotFoundException
UnknownEventException