Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshotStore ¶
func NewSnapshotStore(collection Collection, registry registry.Registry) esourcing.AggregateStoreMiddleware
Types ¶
type Collection ¶
type Collection interface { Name() string Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (cur *mongo.Cursor, err error) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) UpdateMany(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) }
type EventStore ¶
type EventStore struct {
// contains filtered or unexported fields
}
func NewEventStore ¶
func NewEventStore(collectionName string, collection Collection, registry registry.Registry) EventStore
func (EventStore) Load ¶
func (s EventStore) Load(ctx context.Context, aggregate esourcing.EventSourcedAggregate) (err error)
func (EventStore) Save ¶
func (s EventStore) Save(ctx context.Context, aggregate esourcing.EventSourcedAggregate) (err error)
type InboxStore ¶
type InboxStore struct {
// contains filtered or unexported fields
}
func NewInboxStore ¶
func NewInboxStore(collection Collection) InboxStore
func (InboxStore) Save ¶
func (s InboxStore) Save(ctx context.Context, msg async.IncomingMessage) error
type OutboxStore ¶
type OutboxStore struct {
// contains filtered or unexported fields
}
func NewOutboxStore ¶
func NewOutboxStore(collection Collection) OutboxStore
func (OutboxStore) FindUnpublished ¶
func (OutboxStore) MarkPublished ¶
func (s OutboxStore) MarkPublished(ctx context.Context, ids ...string) (err error)
type SagaStore ¶
type SagaStore struct {
// contains filtered or unexported fields
}
func NewSagaStore ¶
func NewSagaStore(collection Collection, registry registry.Registry) *SagaStore
type SnapshotStore ¶
type SnapshotStore struct { esourcing.AggregateStore // contains filtered or unexported fields }
func (SnapshotStore) Load ¶
func (s SnapshotStore) Load(ctx context.Context, aggregate esourcing.EventSourcedAggregate) error
func (SnapshotStore) Save ¶
func (s SnapshotStore) Save(ctx context.Context, aggregate esourcing.EventSourcedAggregate) error
Click to show internal directories.
Click to hide internal directories.