Documentation ¶
Overview ¶
Package mongokit provides helper to interact with mongodb storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
NewFromConfig returns mongo *mongo.Database instance from yaml config file
given config file contents: db: primary: username: <username> password: "<password>" host: mymongo.host.com port: 270017 schema: mymongo_db auth-db: admin conn: max-idle: 20 max-lifetime: 10m timeout: 5m max-open: 100 then we can call using : v := viper.New() ... set v file configs, etc db, err := log.NewFromConfig(v, "db.primary") ...continue using db.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.