Skip to content

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()

abstract clear(): 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()

abstract del(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()

abstract get<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()

abstract has(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()

abstract set<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()

static open(): Promise<ContentStorage>

Defined in: src/platform/types/ContentStorage.ts:12

Opens a content storage.

Returns

Promise<ContentStorage>