@xtandard/entitlements/storage/mongodb
MongoDB state storage: one { _id: key, value } collection over the
mongodb driver, with single-update compare-and-swap.
import { … } from "@xtandard/entitlements/storage/mongodb";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createMongoStorage |
Create a MongoDB-backed MongoEntitlementsStorage. The client is created and connected lazily when only a url is given. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
MongoEntitlementsStorage |
A compare-and-swap capable storage backed by MongoDB, plus close(). |
MongoStorageOptions |
Options for createMongoStorage. dbName defaults to "xtandard_entitlements" and collectionName to "entitlements_kv". |