persistence

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPersistenceModule added in v0.4.3

func NewPersistenceModule(opts ...Option) fx.Option

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

func WithMongoConfig(cfg mongo.Config) Option

WithMongoConfig provides a static Mongo Config (useful for tests). When set, the Mongo configuration will not be loaded from viper.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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