mongo_db

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStore

type IStore[T schema.ISchema] interface {
	behavior.IModelStore[T]
}

type MongoDbClientFtor

type MongoDbClientFtor func() *mongo.Client

func SingletonMongoClient

func SingletonMongoClient(appCfg config.IAppConfig) MongoDbClientFtor

SingletonMongoClient is the functor that returns a singleton MongoDB client

func TransientMongoClient

func TransientMongoClient(appCfg config.IAppConfig) MongoDbClientFtor

TransientMongoClient returns a new MongoClient every time it is called.

type MongoDbStoreFtor

type MongoDbStoreFtor[TModel schema.ISchema] func() IStore[TModel]

func NewMongoStore

func NewMongoStore[TModel schema.ISchema](newMongoDb MongoDbClientFtor, dbName string, colName string) MongoDbStoreFtor[TModel]

Jump to

Keyboard shortcuts

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