mongodb

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MPL-2.0 Imports: 22 Imported by: 67

README

MongoDB Tests

The test TestInit_clientTLS cannot be run within CircleCI in its current form. This is because it's not possible to use volume mounting with the docker executor.

Because of this, the test is skipped. Running this locally shouldn't present any issues as long as you have docker set up to allow volume mounting from this directory:

go test -v -run Init_clientTLS

This may be able to be fixed if we mess with the entrypoint or the command arguments.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (interface{}, error)

New returns a new MongoDB instance

Types

type MongoDB

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

MongoDB is an implementation of Database interface

func (MongoDB) Close added in v0.10.0

func (c MongoDB) Close() error

Close terminates the database connection.

func (MongoDB) Connection added in v0.10.0

func (c MongoDB) Connection(ctx context.Context) (*mongo.Client, error)

Connection creates or returns an existing a database connection. If the session fails on a ping check, the session will be closed and then re-created. This method does locks the mutex on its own.

func (*MongoDB) DeleteUser added in v1.6.0

func (*MongoDB) Initialize added in v0.10.0

func (*MongoDB) NewUser added in v1.6.0

func (*MongoDB) Type

func (m *MongoDB) Type() (string, error)

Type returns the TypeName for this backend

func (*MongoDB) UpdateUser added in v1.6.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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