class GcsAdapter
implements PresignableAdapter

Adapter for Google Cloud Storage.

Constructors

GcsAdapter(
client: GcsClient,
bucketName: string,
prefix: string
)

Methods

close(): Promise<void>
delete(key: string): Promise<void>

Deletes an object from GCS. This operation is idempotent; it returns successfully even if the object does not exist.

get(key: string): Promise<StorageObject>
head(key: string): Promise<StorageMetadata>
list(prefix?: string): AsyncIterable<StorageEntry>
presign(
key: string,
options: PresignOptions
): Promise<string>
put(
key: string,
body: BodyInput,
options?: PutOptions
): Promise<void>

Usage

import { GcsAdapter } from ".";