diff --git a/classes/ObjectStorageError.html b/classes/ObjectStorageError.html index 8fd457c..7ee3c7d 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)

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)

Optional override for formatting stack traces

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 +

Parameters

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/initObjectStoreClient.html b/functions/initObjectStoreClient.html index 28a58bc..e455db5 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 a6ad03e..5c799e0 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 @@ -11,10 +11,10 @@

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

Retrieve the object by key or return null if the key doesn't exist.

+

Parameters

  • key: string
  • bucket: string

Returns Promise<void>

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

Retrieve the object by key or return null if the key doesn't exist.

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

Retrieve the keys for all the objects in the specified bucket with the specified key prefix.

+

Parameters

  • key: string
  • bucket: string

Returns Promise<null | StoreObject>

listObjectKeys: ((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).

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>

Param: prefix

Param: bucket

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>

Param: prefix

Param: bucket

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 834a9a2..5ee9b37 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 47efe58..70227c4 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