dbm

package
v0.0.0-...-12e21da Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleUserDatabaseUri

func AssembleUserDatabaseUri(originalUri string, newUser string, newPassword string, newDb string) (string, error)

Types

type MongoManager

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

func NewMongoManager

func NewMongoManager(context context.Context, connectionURI string) (*MongoManager, error)

NewMongoManager creates a new MongoManager

func (*MongoManager) CreateDatabase

func (m *MongoManager) CreateDatabase(databaseName string, username string, password string) error

CreateDatabase creates the database returns the connection uri

func (*MongoManager) DatabaseExists

func (m *MongoManager) DatabaseExists(databaseName string) (bool, error)

DatabaseExists check if database exists

func (*MongoManager) Disconnect

func (m *MongoManager) Disconnect() error

Disconnect disconnects from the database

func (*MongoManager) RemoveUser

func (m *MongoManager) RemoveUser(databaseName string, username string) error

RemoveUser remove the database user

Jump to

Keyboard shortcuts

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