BlobStorage class

Warning

This API is now deprecated.

This class is deprecated in favor of BlobsStorage

Middleware that implements a BlobStorage based storage provider for a bot.

Remarks

The BlobStorage implements its storage using a single Azure Storage Blob Container. Each entity is serialized into a JSON string and stored in an individual text blob. Each blob is named after the key which is encoded and ensure it conforms a valid blob name.

Constructors

BlobStorage(BlobStorageSettings)

Creates a new BlobStorage instance.

Methods

delete(string[])

Delete entity blobs from the configured container.

read(string[])

Retrieve entities from the configured blob container.

write(StoreItems)

Store a new entity in the configured blob container.

Constructor Details

BlobStorage(BlobStorageSettings)

Creates a new BlobStorage instance.

new BlobStorage(settings: BlobStorageSettings)

Parameters

settings
BlobStorageSettings

Settings for configuring an instance of BlobStorage.

Method Details

delete(string[])

Delete entity blobs from the configured container.

function delete(keys: string[]): Promise<void>

Parameters

keys

string[]

An array of entity keys.

Returns

Promise<void>

A promise representing the asynchronous operation.

read(string[])

Retrieve entities from the configured blob container.

function read(keys: string[]): Promise<StoreItems>

Parameters

keys

string[]

An array of entity keys.

Returns

Promise<StoreItems>

The read items.

write(StoreItems)

Store a new entity in the configured blob container.

function write(changes: StoreItems): Promise<void>

Parameters

changes

StoreItems

The changes to write to storage.

Returns

Promise<void>

A promise representing the asynchronous operation.