mongodb

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 4 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) (*Client, error)

NewClient method takes a config map argument

func (*Client) GenerateID

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

func (*Client) GetClient added in v1.1.15

func (c *Client) GetClient() *mongo.Client

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