mongo

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultURI ...
	DefaultURI = "mongodb://localhost:27017"
)

Variables

This section is empty.

Functions

func EventStore added in v0.11.0

func EventStore(ctx context.Context, eventCfg cqrs.EventConfig, opts ...Option) (cqrs.EventStore, error)

EventStore ...

func WithEventStoreFactory

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

WithEventStoreFactory ...

Types

type Config

type Config struct {
	URI              string
	Database         string
	Publisher        cqrs.EventPublisher
	ResolvePublisher func() cqrs.EventPublisher
	PublishEvents    bool
	Transactions     bool
	CreateIndexes    bool
	ClientOptions    []*options.ClientOptions
}

Config ...

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 PublishEvents added in v0.12.6

func PublishEvents(publish bool) Option

PublishEvents ...

func Publisher

func Publisher(publisher cqrs.EventPublisher) Option

Publisher ...

func ResolvePublisher added in v0.8.0

func ResolvePublisher(resolve func() cqrs.EventPublisher) Option

ResolvePublisher ...

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