Documentation ¶
Index ¶
- type MongoDbEventStore
- func (s *MongoDbEventStore) Append(events *goengine.EventStream) error
- func (s *MongoDbEventStore) CountEventsFor(streamName goengine.StreamName, id string) (int, error)
- func (s *MongoDbEventStore) FromVersion(streamName goengine.StreamName, id string, version int) (*goengine.EventStream, error)
- func (s *MongoDbEventStore) GetEventsFor(streamName goengine.StreamName, id string) (*goengine.EventStream, error)
- type MongoEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDbEventStore ¶
type MongoDbEventStore struct {
// contains filtered or unexported fields
}
MongoDbEventStore The mongodb event store
func NewEventStore ¶
func NewEventStore(conn *mgo.Session, r goengine.TypeRegistry) *MongoDbEventStore
NewEventStore creates new MongoDB based event store
func (*MongoDbEventStore) Append ¶
func (s *MongoDbEventStore) Append(events *goengine.EventStream) error
Append adds an event to the event store
func (*MongoDbEventStore) CountEventsFor ¶
func (s *MongoDbEventStore) CountEventsFor(streamName goengine.StreamName, id string) (int, error)
CountEventsFor counts events for an id on the specified stream
func (*MongoDbEventStore) FromVersion ¶
func (s *MongoDbEventStore) FromVersion(streamName goengine.StreamName, id string, version int) (*goengine.EventStream, error)
FromVersion gets events for an id and version on the specified stream
func (*MongoDbEventStore) GetEventsFor ¶
func (s *MongoDbEventStore) GetEventsFor(streamName goengine.StreamName, id string) (*goengine.EventStream, error)
GetEventsFor gets events for an id on the specified stream
Click to show internal directories.
Click to hide internal directories.