Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Module provided to fxlog // https://uber-go.github.io/fx/modules.html Module = fx.Module( "mongofx", mongoProviders, mongoInvokes, ) )
Functions ¶
func NewMongoDB ¶
func NewMongoDB(cfg *MongoDbOptions) (*mongo.Client, error)
NewMongoDB Create new MongoDB client
Types ¶
type MongoDbOptions ¶
type MongoDbOptions struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` User string `mapstructure:"user"` Password string `mapstructure:"password"` Database string `mapstructure:"database"` UseAuth bool `mapstructure:"useAuth"` EnableTracing bool `mapstructure:"enableTracing" default:"true"` }
Click to show internal directories.
Click to hide internal directories.