3.0.1 • Published 9 months ago

@mimik/mongooser v3.0.1

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
9 months ago

mongooser

Example

import mongodb from '@mimik/mongooser';

mongooser~validate() ⇒ Promise

Database connection validation.

Kind: inner method of mongooser
Returns: Promise - .
Category: async
Throws:

  • Promise Will throw an error if the database connection is not connected.

Will exit 1 if the connection request times out and the connection state is not connected.

Requires: module:@mimik/sumologic-winston-logger
Fulfil: Return null.

mongooser~getKMSProviders() ⇒ object

AutoEncryption KMSProvider.

Kind: inner method of mongooser
Returns: object - The KMSProviders object.

Will return the kmsProvider settings for the service.
Category: sync

mongooser~initializeSync(autoEncryption) ⇒ object

Database initialization.

Kind: inner method of mongooser
Returns: object - The database object.

The autoEncryption has the following strucuture:

 {
   "keyVaultClient" : <object>,
   "keyVaultNamespace": <string>, // namespace for the keyvault collection
   "kmsProviders": <object>, // KeyManager service settings
   "schemaMap": <object>, // json object for defining encryption schema
   "bypassAutoEncryption": <boolean>
 }

Check MongoDB documentation for more details. https://docs.mongodb.com/manual/reference/method/Mongo/#clientsidefieldlevelencryptionoptions

Will exit 1 if the connection request generates an error or the connection state is disconnected or disconnecting.
Category: sync
Requires: module:sumologic-winston-logger

ParamTypeDescription
autoEncryptionobjectEncryption settings for mongo connection.

mongooser~replicat() ⇒ boolean

Indicates if the replica is set.

Kind: inner method of mongooser
Returns: boolean - True if replica is set, False if not.
Category: sync

3.0.1

9 months ago

3.0.0

9 months ago

2.0.4

1 year ago

2.1.0

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.8.6

3 years ago

1.8.5

3 years ago

1.8.4

3 years ago

1.8.3

3 years ago

1.8.2

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.5

6 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago