beamable-sdk / platform/types/ContentStorage / ContentStorage
Abstract Class: ContentStorage¶
Defined in: src/platform/types/ContentStorage.ts:6
Abstraction for managing and storing Beamable contents.
Constructors¶
Constructor¶
new ContentStorage():
ContentStorage
Returns¶
ContentStorage
Methods¶
clear()¶
abstractclear():Promise<void>
Defined in: src/platform/types/ContentStorage.ts:31
Clears the entire content storage.
Returns¶
Promise<void>
close()¶
close():
void
Defined in: src/platform/types/ContentStorage.ts:34
Closes the content storage.
Returns¶
void
del()¶
abstractdel(key):Promise<void>
Defined in: src/platform/types/ContentStorage.ts:28
Deletes a value from the content storage.
Parameters¶
key¶
string
Returns¶
Promise<void>
get()¶
abstractget<T>(key):Promise<T|undefined>
Defined in: src/platform/types/ContentStorage.ts:22
Gets a value from the content storage.
Type Parameters¶
T¶
T = unknown
Parameters¶
key¶
string
Returns¶
Promise<T | undefined>
has()¶
abstracthas(key):Promise<boolean>
Defined in: src/platform/types/ContentStorage.ts:25
Checks if a value exists in the content storage.
Parameters¶
key¶
string
Returns¶
Promise<boolean>
set()¶
abstractset<T>(key,value):Promise<void>
Defined in: src/platform/types/ContentStorage.ts:19
Sets a value in the content storage.
Type Parameters¶
T¶
T
Parameters¶
key¶
string
value¶
T
Returns¶
Promise<void>
open()¶
staticopen():Promise<ContentStorage>
Defined in: src/platform/types/ContentStorage.ts:12
Opens a content storage.
Returns¶
Promise<ContentStorage>