minos.aggregate.aggregate

Classes

Aggregate

Base Service class

class Aggregate[source]

Bases: Generic[RT], SetupMixin

Base Service class

__init__(transaction_repository, event_repository, snapshot_repository, *args, **kwargs)[source]
Parameters
transaction_repository: minos.aggregate.transactions.repositories.abc.TransactionRepository
event_repository: minos.aggregate.events.repositories.abc.EventRepository
snapshot_repository: minos.aggregate.snapshots.repositories.abc.SnapshotRepository
property already_destroyed: bool

Already Destroy getter.

Returns

A boolean value.

property already_setup: bool

Already Setup getter.

Returns

A boolean value.

async destroy()

Destroy miscellaneous repository things.

Returns

This method does not return anything.

Return type

None

classmethod from_config(config=None, **kwargs)

Build a new instance from config.

Parameters
  • config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.

  • kwargs – Additional named arguments.

Returns

A instance of the called class.

Return type

S

async setup()

Setup miscellaneous repository things.

Returns

This method does not return anything.

Return type

None

property root: type[minos.aggregate.entities.models.RootEntity]

Get the root entity of the aggregate.

Returns

A RootEntity type.