Documentation ¶
Index ¶
- type MongoEventGenerator
- type MongoProjectionGenerator
- type MongoStorageProvider
- func (provider *MongoStorageProvider) GetLatestEventIDForEntityID(ctx context.Context, entityID string) (string, error)
- func (provider *MongoStorageProvider) GetProjection(ctx context.Context, entityID string, projection eventing.Projection) (eventing.Projection, error)
- func (provider *MongoStorageProvider) GetSortedEventsForEntityID(ctx context.Context, entityID string) ([]eventing.Event, error)
- func (provider *MongoStorageProvider) SaveEvent(ctx context.Context, event eventing.Event) error
- func (provider *MongoStorageProvider) SaveProjection(ctx context.Context, projection eventing.Projection) error
- func (provider *MongoStorageProvider) WithEvent(name string, generator MongoEventGenerator) *MongoStorageProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoEventGenerator ¶
type MongoProjectionGenerator ¶
type MongoProjectionGenerator func(result *mongo.SingleResult) (eventing.Projection, error)
type MongoStorageProvider ¶
type MongoStorageProvider struct {
// contains filtered or unexported fields
}
func NewMongoStorageProvider ¶
func NewMongoStorageProvider(db *mongo.Database, collection string, generator MongoProjectionGenerator) *MongoStorageProvider
func (*MongoStorageProvider) GetLatestEventIDForEntityID ¶
func (*MongoStorageProvider) GetProjection ¶
func (provider *MongoStorageProvider) GetProjection(ctx context.Context, entityID string, projection eventing.Projection) (eventing.Projection, error)
func (*MongoStorageProvider) GetSortedEventsForEntityID ¶
func (*MongoStorageProvider) SaveProjection ¶
func (provider *MongoStorageProvider) SaveProjection(ctx context.Context, projection eventing.Projection) error
func (*MongoStorageProvider) WithEvent ¶
func (provider *MongoStorageProvider) WithEvent(name string, generator MongoEventGenerator) *MongoStorageProvider
Click to show internal directories.
Click to hide internal directories.