Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.