Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPersistenceModule ¶ added in v0.4.3
NewPersistenceModule provides persistence layer components for dependency injection.
Options:
- WithMongoConfig: provide static Mongo Config (useful for tests)
Example usage:
// Production - loads config from viper
persistence.NewPersistenceModule()
// Testing - with static config
persistence.NewPersistenceModule(
persistence.WithMongoConfig(mongo.Config{...}),
)
Types ¶
type Option ¶ added in v0.4.3
type Option func(*persistenceOptions)
Option is a functional option for configuring the persistence module.
func WithMongoConfig ¶ added in v0.4.3
WithMongoConfig provides a static Mongo Config (useful for tests). When set, the Mongo configuration will not be loaded from viper.
Click to show internal directories.
Click to hide internal directories.