mongo

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) (*mongo.Client, error)

Types

type Config

type Config struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	PoolSize int    `yaml:"poolSize"`
	Database string `yaml:"database"`

	ConnTimeout     time.Duration `yaml:"connTimeout"`
	MaxConnIdleTime time.Duration `yaml:"maxConnIdleTime"`
	MaxOpenConns    int           `yaml:"maxOpenConns"`
	// contains filtered or unexported fields
}

Config Config

Jump to

Keyboard shortcuts

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