mongo

package
v0.0.0-...-cd11e0c Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(mongoUri string, timeout time.Duration)

func GetMongoDbConnector

func GetMongoDbConnector(db string, collection string) model.DbConnector

Types

type Config

type Config struct {
	Uri        string `json:"uri"`
	Db         string `json:"db"`
	Collection string `json:"collection"`
}

func ParseConfig

func ParseConfig(configFile string) (*Config, error)

func (*Config) ToJson

func (c *Config) ToJson() string

Jump to

Keyboard shortcuts

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