mongopkg

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("mongopkg", fx.Provide(
	func(
		l *zap.Logger,
		s setting.Param,

	) (out Result, err error) {
		if svc, e := NewMongoDb(
			l,
			s,
		); e != nil {
			err = e
		} else {
			out.Execute(svc)
		}
		return
	},
),
)

Functions

func NewMongoDb

func NewMongoDb(l *zap.Logger, set setting.Param) (*defaultMongoDb, error)

Types

type MongoDbService

type MongoDbService interface {
}

type Param

type Param struct {
	fx.In
	MongoDb *mongo.Client `name:"MongoDb"`
}

type Result

type Result struct {
	fx.Out
	MongoDb *mongo.Client `name:"MongoDb"`
}

func (*Result) Execute

func (f *Result) Execute(MongoDbService)

Jump to

Keyboard shortcuts

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