mgdb

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 3 Imported by: 0

README

Module MonggoDB for XMP

Overview

  • Support MongoDB

Installation

go get -u github.com/idprm/mgdb

LICENSE

MIT(http://opensource.org/licenses/mit-license.php)

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCtx added in v1.0.4

func NewCtx(timeout time.Duration) context.Context

func SetDefaultConfig added in v1.0.4

func SetDefaultConfig()

Types

type Config added in v1.0.4

type Config struct {
	Host         string
	Port         string
	Username     string
	Password     string
	DBName       string
	MaxOpenConns int
	CtxTimeout   time.Duration
}

func NewConfig added in v1.0.4

func NewConfig(host, port, username, password, dbname string, open int, ctxTimeout time.Duration) *Config

type DB added in v1.0.4

type DB struct {
	// contains filtered or unexported fields
}

func NewClient added in v1.0.4

func NewClient(cfg *Config, clientDB *mongo.Database) *DB

func (*DB) Close added in v1.0.4

func (d *DB) Close() error

Jump to

Keyboard shortcuts

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