Represents the abstract StorageModule for handling file uploads and downloads in Honeycomb.

Hierarchy

Constructors

Properties

_honeycomb: Honeycomb

Methods

  • Returns Promise<default | default>

  • Downloads a HoneycombFile from the provided URI.

    Parameters

    • uri: string

      The URI of the file to download.

    Returns Promise<HoneycombFile>

    The downloaded HoneycombFile.

  • Downloads a JSON object from the provided URI.

    Type Parameters

    • T extends object = object

    Parameters

    • uri: string

      The URI of the JSON object to download.

    Returns Promise<T>

    The downloaded JSON object.

  • Retrieves the upload price for a specified number of bytes.

    Parameters

    • bytes: number

      The number of bytes to calculate the upload price for.

    Returns Promise<Amount>

    The upload price in the form of an Amount.

  • Retrieves the upload price for a HoneycombFile.

    Parameters

    • file: HoneycombFile

      The HoneycombFile for which to calculate the upload price.

    Returns Promise<Amount>

    The upload price in the form of an Amount.

  • Retrieves the upload price for an array of HoneycombFiles.

    Parameters

    • files: HoneycombFile[]

      An array of HoneycombFiles to calculate the upload price for.

    Returns Promise<Amount>

    The upload price in the form of an Amount.

  • Get the Honeycomb client instance associated with the module.

    Returns Honeycomb

    The Honeycomb client instance.

  • Installs the StorageModule into the Honeycomb instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance to install the StorageModule into.

    Returns Honeycomb

    The Honeycomb instance with the StorageModule installed.

  • Uploads a HoneycombFile to the Honeycomb storage.

    Parameters

    Returns Promise<string>

    The URI of the uploaded file.

  • Uploads an array of HoneycombFiles to the Honeycomb storage.

    Parameters

    Returns Promise<string[]>

    An array of URIs for the uploaded files.

  • Uploads a JSON object to the Honeycomb storage.

    Type Parameters

    • T extends object = object

    Parameters

    • json: T

      The JSON object to upload.

    Returns Promise<string>

    The URI of the uploaded file.

Generated using TypeDoc