InMemoryStorageProvider
In-memory storage provider using nested Maps.
Implements
Constructors
new InMemoryStorageProvider()
new InMemoryStorageProvider(
_map):InMemoryStorageProvider
Parameters
_map
Map<StorageDomain, Map<string, string>> = ...
Returns
Accessors
map
Get Signature
get map():
Map<StorageDomain,Map<string,string>>
Returns
Map<StorageDomain, Map<string, string>>
Set Signature
set map(
map):void
Parameters
map
Map<StorageDomain, Map<string, string>>
Returns
void
Methods
create()
create(
keyId,domain,item):Promise<void>
Creates a new item in storage.
Parameters
keyId
string
The identifier for the item.
domain
StorageDomain
The storage domain.
item
string
The data to store.
Returns
Promise<void>
Implementation of
delete()
delete(
keyId,domain):Promise<void>
Deletes an item from storage.
Parameters
keyId
string
The identifier for the item.
domain
StorageDomain
The storage domain.
Returns
Promise<void>
Implementation of
exists()
exists(
keyId,domain):Promise<boolean>
Checks if an item exists in storage.
Parameters
keyId
string
The identifier for the item.
domain
StorageDomain
The storage domain.
Returns
Promise<boolean>
true if the item exists, false otherwise.
Implementation of
read()
read(
keyId,domain):Promise<null|string>
Reads an item from storage.
Parameters
keyId
string
The identifier for the item.
domain
StorageDomain
The storage domain.
Returns
Promise<null | string>
The stored data, or null if not found.
Implementation of
update()
update(
keyId,domain,item):Promise<void>
Updates an existing item in storage.
Parameters
keyId
string
The identifier for the item.
domain
StorageDomain
The storage domain.
item
string
The new data.
Returns
Promise<void>