mongodb

package
v0.0.0-...-f0f3bdc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOffsetStore

func NewOffsetStore(options *MongoOffsetStoreOptions) cqrs.OffsetStore

Types

type MongoEventStore

type MongoEventStore struct {
	// contains filtered or unexported fields
}

MongoEventStore implementation of the event store

func NewEventStore

func NewEventStore(options *MongoEventStoreOptions) *MongoEventStore

func (*MongoEventStore) GetEvent

func (store *MongoEventStore) GetEvent(id string) Event

func (*MongoEventStore) GetEventMetaDataFrom

func (store *MongoEventStore) GetEventMetaDataFrom(offset, count int) []EventMetaData

func (*MongoEventStore) GetEvents

func (store *MongoEventStore) GetEvents(aggregateId string) []Event

func (*MongoEventStore) SaveEvents

func (store *MongoEventStore) SaveEvents(aggregateId string, events []Event) error

type MongoEventStoreOptions

type MongoEventStoreOptions struct {
	Session               *mgo.Session
	Database              string
	EventCollection       string
	AggregateCollection   string
	TransactionCollection string
}

func DefaultMongoEventStoreOptions

func DefaultMongoEventStoreOptions() *MongoEventStoreOptions

type MongoOffsetStore

type MongoOffsetStore struct {
	// contains filtered or unexported fields
}

MongoOffsetStore implementation of the offset store

func (*MongoOffsetStore) GetLastOffset

func (store *MongoOffsetStore) GetLastOffset() (int, error)

func (*MongoOffsetStore) SaveOffset

func (store *MongoOffsetStore) SaveOffset(value int) error

type MongoOffsetStoreOptions

type MongoOffsetStoreOptions struct {
	Session    *mgo.Session
	Database   string
	Collection string
	StoreId    string
}

func DefaultMongoOffsetStoreOptions

func DefaultMongoOffsetStoreOptions() *MongoOffsetStoreOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL