diff --git a/classes/ObjectStorageError.html b/classes/ObjectStorageError.html index af124b3e..79393df2 100644 --- a/classes/ObjectStorageError.html +++ b/classes/ObjectStorageError.html @@ -1,4 +1,4 @@ -ObjectStorageError | @relaycorp/object-storage

Hierarchy

  • VError
    • ObjectStorageError

Constructors

constructor +ObjectStorageError | @relaycorp/object-storage

Hierarchy

  • VError
    • ObjectStorageError

Constructors

Properties

Constructors

  • Parameters

    • options: Error | Options
    • message: string
    • Rest ...params: any[]

    Returns ObjectStorageError

  • Parameters

    • Optional message: string
    • Rest ...params: any[]

    Returns ObjectStorageError

Properties

cause: (() => undefined | Error)

Type declaration

    • (): undefined | Error
    • Returns undefined | Error

message: string
name: "ObjectStorageError" = 'ObjectStorageError'
stack?: string
VError: typeof VError
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

  • Parameters

    • options: Error | Options
    • message: string
    • Rest ...params: any[]

    Returns ObjectStorageError

  • Parameters

    • Optional message: string
    • Rest ...params: any[]

    Returns ObjectStorageError

Properties

cause: (() => undefined | Error)

Type declaration

    • (): undefined | Error
    • Returns undefined | Error

message: string
name: "ObjectStorageError" = 'ObjectStorageError'
stack?: string
VError: typeof VError
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

  • Parameters

    • err: Error

    Returns null | Error

  • Parameters

    • err: Error
    • func: ((err) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns void

  • Type Parameters

    • T extends Error

    Parameters

    • errors: T[]

    Returns null | T | MultiError

  • Parameters

    • err: Error
    • name: string

    Returns null | Error

  • Parameters

    • err: Error

    Returns string

  • Parameters

    • err: Error
    • name: string

    Returns boolean

  • Parameters

    • err: Error

    Returns Info

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/initObjectStoreClient.html b/functions/initObjectStoreClient.html index 4ebfc784..648b3bec 100644 --- a/functions/initObjectStoreClient.html +++ b/functions/initObjectStoreClient.html @@ -1,2 +1,2 @@ initObjectStoreClient | @relaycorp/object-storage
  • Return object store client for the specified type.

    -

    Parameters

    • type: AdapterType
    • Optional endpoint: string
    • Optional accessKeyId: string
    • Optional secretAccessKey: string
    • tlsEnabled: boolean = true

    Returns ObjectStoreClient

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns ObjectStoreClient

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ObjectStoreClient.html b/interfaces/ObjectStoreClient.html index 1470f504..a868db1f 100644 --- a/interfaces/ObjectStoreClient.html +++ b/interfaces/ObjectStoreClient.html @@ -1,5 +1,5 @@ ObjectStoreClient | @relaycorp/object-storage

Interface for all object store clients.

-
interface ObjectStoreClient {
    deleteObject: ((key, bucket) => Promise<void>);
    getObject: ((key, bucket) => Promise<null | StoreObject>);
    listObjectKeys: ((prefix, bucket) => AsyncIterable<string>);
    putObject: ((object, key, bucket) => Promise<void>);
}

Properties

interface ObjectStoreClient {
    deleteObject: ((key, bucket) => Promise<void>);
    getObject: ((key, bucket) => Promise<null | StoreObject>);
    listObjectKeys: ((prefix, bucket) => AsyncIterable<string>);
    putObject: ((object, key, bucket) => Promise<void>);
}

Properties

deleteObject getObject listObjectKeys putObject @@ -7,7 +7,7 @@

This method resolves even if the key doesn't exist, in order to provide a normalised API, since Amazon S3 always returns a 204 regardless of whether the object exists (GCS returns a 404 and its SDK throws an error).

-

Parameters

  • key: string
  • bucket: string

Returns Promise<void>

getObject: ((key, bucket) => Promise<null | StoreObject>)

Type declaration

    • (key, bucket): Promise<null | StoreObject>
    • Retrieve the object by key or return null if the key doesn't exist.

      -

      Parameters

      • key: string
      • bucket: string

      Returns Promise<null | StoreObject>

listObjectKeys: ((prefix, bucket) => AsyncIterable<string>)

Type declaration

    • (prefix, bucket): AsyncIterable<string>
    • Retrieve the keys for all the objects in the specified bucket with the specified key prefix.

      +

      Parameters

      • key: string
      • bucket: string

      Returns Promise<void>

getObject: ((key, bucket) => Promise<null | StoreObject>)

Type declaration

    • (key, bucket): Promise<null | StoreObject>
    • Retrieve the object by key or return null if the key doesn't exist.

      +

      Parameters

      • key: string
      • bucket: string

      Returns Promise<null | StoreObject>

listObjectKeys: ((prefix, bucket) => AsyncIterable<string>)

Type declaration

    • (prefix, bucket): AsyncIterable<string>
    • Retrieve the keys for all the objects in the specified bucket with the specified key prefix.

      This will handle pagination if the backend supports it (S3 does, Minio doesn't).

      -

      Parameters

      • prefix: string
      • bucket: string

      Returns AsyncIterable<string>

putObject: ((object, key, bucket) => Promise<void>)

Type declaration

    • (object, key, bucket): Promise<void>
    • Parameters

      Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns AsyncIterable<string>

putObject: ((object, key, bucket) => Promise<void>)

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/StoreObject.html b/interfaces/StoreObject.html index 4319d83f..e609ed52 100644 --- a/interfaces/StoreObject.html +++ b/interfaces/StoreObject.html @@ -1,4 +1,4 @@ StoreObject | @relaycorp/object-storage

Store object.

-
interface StoreObject {
    body: Buffer;
    metadata: {
        [key: string]: string;
    };
}

Properties

interface StoreObject {
    body: Buffer;
    metadata: {
        [key: string]: string;
    };
}

Properties

Properties

body: Buffer
metadata: {
    [key: string]: string;
}

Type declaration

  • [key: string]: string

Generated using TypeDoc

\ No newline at end of file +

Properties

body: Buffer
metadata: {
    [key: string]: string;
}

Type declaration

  • [key: string]: string

Generated using TypeDoc

\ No newline at end of file diff --git a/types/AdapterType.html b/types/AdapterType.html index 93fcf87c..c0a6fe70 100644 --- a/types/AdapterType.html +++ b/types/AdapterType.html @@ -1 +1 @@ -AdapterType | @relaycorp/object-storage
AdapterType: "gcs" | "minio" | "s3"

Generated using TypeDoc

\ No newline at end of file +AdapterType | @relaycorp/object-storage
AdapterType: "gcs" | "minio" | "s3"

Generated using TypeDoc

\ No newline at end of file