mongo

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func WithEventStoreFactory(options ...Option) setup.Option

WithEventStoreFactory ...

Types

type Config

type Config struct {
	URI           string
	Database      string
	Publisher     cqrs.EventPublisher
	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 ClientOptions

func ClientOptions(options ...*options.ClientOptions) Option

ClientOptions ...

func CreateIndexes added in v0.5.4

func CreateIndexes() Option

CreateIndexes ...

func Database

func Database(name string) Option

Database ...

func Publisher

func Publisher(publisher cqrs.EventPublisher) Option

Publisher ...

func Transactions

func Transactions(use bool) Option

Transactions ...

func URI

func URI(uri string) Option

URI ...

Jump to

Keyboard shortcuts

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