mongodb

package
v0.0.0-...-508df49 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(cfg Config) (*mongo.Database, error)

NewConnection opens a new connection to mongodb database.

Types

type Config

type Config struct {
	Enable   bool   `koanf:"enable"`
	Database string `koanf:"database"`
	Local    string `koanf:"local"`
	URI      string `koanf:"uri"`
}

Config mongodb config parameters.

Jump to

Keyboard shortcuts

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