mongoclient

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PUBLIC string = "PUBLIC"
View Source
const STATE string = "__STATE__"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionOpts added in v1.12.0

type ConnectionOpts struct {
	MaxIdleTimeMs int
}

type MongoClient

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

func NewMongoClient

func NewMongoClient(logger logging.Logger, mongodbURL string, connectionOptions ConnectionOpts) (*MongoClient, error)

NewMongoClient tries to setup a new MongoClient instance. The function returns a `nil` client if the environment variable `MongoDBUrl` is not specified.

func (*MongoClient) Collection added in v1.10.0

func (m *MongoClient) Collection(collectionName string) *mongo.Collection

func (*MongoClient) Disconnect

func (mongoClient *MongoClient) Disconnect() error

Jump to

Keyboard shortcuts

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