Skip to content

A Implementation of EventSauce Message and SnapshotRepository for Google Firestore

Notifications You must be signed in to change notification settings

bzrk/EventSauce-MessageStorage-GCP

Repository files navigation

Eventsauce Firestore

Implementation of EventSauce Message- and SnapshotRepository for Google Firestore and Google Datastore

Usage Firestore

$firestoreClient = new FirestoreClient();

$this->messageRepository = new MessageRepository(
    $firestoreClient,
    'collectionForAggregateEvents',
    new ConstructingMessageSerializer()
);

$this->snapshotRepository = new SnapshotRepository(
    $firestoreClient,
    'collectionForAggregateSnapshots'
);

Usage Datastore

$datastoreClient = new DatastoreClient();

$this->messageRepository = new MessageRepository(
    $datastoreClient,
    'collectionForAggregateEvents',
    new ConstructingMessageSerializer()
);

$this->snapshotRepository = new SnapshotRepository(
    $datastoreClient,
    'collectionForAggregateSnapshots'
);

Running Tests

// starts needed Containers
docker-compose up

// running qualtity tools
docker-compose run --rm php composer verify

About

A Implementation of EventSauce Message and SnapshotRepository for Google Firestore

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages