Interface CloudStorageProvider

Generic interface for cloud storage providers.

Implement this interface to support custom storage backends beyond S3-compatible services.

interface CloudStorageProvider {
    upload(key: string, data: string | Buffer): Promise<void>;
    download(key: string): Promise<string | Buffer>;
    list(prefix?: string): Promise<string[]>;
    delete(key: string): Promise<void>;
}

Implemented by

Methods

  • Upload data to cloud storage

    Parameters

    • key: string

      The storage key/path for the backup

    • data: string | Buffer

      The backup data (string or Buffer)

    Returns Promise<void>

  • Download data from cloud storage

    Parameters

    • key: string

      The storage key/path to download

    Returns Promise<string | Buffer>

    The backup data

  • List available backups in cloud storage

    Parameters

    • Optionalprefix: string

      Optional prefix to filter backups

    Returns Promise<string[]>

    Array of backup keys