Documentation ¶
Index ¶
- Constants
- func NewEventStore(ctx context.Context, eventCfg cqrs.EventConfig, opts ...Option) (cqrs.EventStore, error)
- func WithEventStoreFactory(options ...Option) setup.Option
- type Config
- type InconsistentEventError
- type Option
- func ClientOptions(options ...*options.ClientOptions) Option
- func CreateIndexes() Option
- func Database(name string) Option
- func Publisher(publisher cqrs.EventPublisher) Option
- func ResolvePublisher(resolve func() (cqrs.EventPublisher, bool)) Option
- func Transactions(use bool) Option
- func URI(uri string) Option
Constants ¶
View Source
const (
// DefaultURI ...
DefaultURI = "mongodb://localhost:27017"
)
Variables ¶
This section is empty.
Functions ¶
func NewEventStore ¶
func NewEventStore(ctx context.Context, eventCfg cqrs.EventConfig, opts ...Option) (cqrs.EventStore, error)
NewEventStore ...
func WithEventStoreFactory ¶
WithEventStoreFactory ...
Types ¶
type Config ¶
type Config struct { URI string Database string Publisher cqrs.EventPublisher ResolvePublisher func() (cqrs.EventPublisher, bool) Transactions bool CreateIndexes bool ClientOptions []*options.ClientOptions }
Config ...
type InconsistentEventError ¶
type InconsistentEventError struct { ExpectedAggregateType cqrs.AggregateType ProvidedAggregateType cqrs.AggregateType ExpectedAggregateID uuid.UUID ProvidedAggregateID uuid.UUID }
InconsistentEventError ...
func (InconsistentEventError) Error ¶
func (err InconsistentEventError) Error() string
type Option ¶
type Option func(*Config)
Option ...
func ResolvePublisher ¶ added in v0.8.0
ResolvePublisher ...
Click to show internal directories.
Click to hide internal directories.