A specialized Store that is designed to handle MediaBlobs and use the key that is included in the blob to determine exactly how it is stored.

The full details of a MediaBlob may be changed when it is stored. For example, it may get additional or different Metadata. This should be what is returned when the store() method is called.

Although BlobStore extends BaseStore, not all of the methods from BaseStore may be implemented (or even possible). Those that are not implemented should be documented and throw an Error if called.

Hierarchy (view full)

Constructors

Properties

defaultFetchOptions: BlobStoreFetchOptions
defaultStoreOptions: BlobStoreStoreOptions

Methods

  • Is the path supported by this BlobStore?

    Although this is async, this is expected to be a relatively fast operation (ie - you shouldn't make network calls).

    Parameters

    • path: undefined | string

      The path to check

    • Optionalopts: BlobStoreStoreOptions

      Any options (if needed) that may be used to determine if it is valid

    Returns Promise<boolean>

    If the path is supported

  • Abstract method to delete multiple keys.

    Parameters

    • keys: string[]

      An array of keys to delete.

    Returns Promise<void>

    • A Promise that resolves when the operation is complete.
  • Abstract method to get multiple values for a set of keys.

    Parameters

    • keys: string[]

      An array of keys.

    Returns Promise<(undefined | MediaBlob)[]>

    • A Promise that resolves with array of values or undefined if key not found.
  • Abstract method to set a value for multiple keys.

    Parameters

    • keyValuePairs: [string, MediaBlob][]

      An array of key-value pairs.

    Returns Promise<void>

    • A Promise that resolves when the operation is complete.
  • Returns Serialized

  • Abstract method to yield keys optionally based on a prefix.

    Parameters

    • Optionalprefix: string

      Optional prefix to filter keys.

    Returns AsyncGenerator<string, any, unknown>

    • An asynchronous generator that yields keys on iteration.