mongodb

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conf Config, connnectionStr string) (*Client, error)

NewClient method takes a config map argument

func (*Client) GenerateID

func (c *Client) GenerateID() primitive.ObjectID

func (*Client) GetDb

func (c *Client) GetDb() *mongo.Database

func (*Client) Ping

func (c *Client) Ping() error

type Config

type Config struct {
	AuthSource string
	Username   string
	Password   string
	Opts       string
	Database   string
	Hosts      []string
}

Jump to

Keyboard shortcuts

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