Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface to be implemented by objects capable of storing binary data in persistent storage.

Hierarchy

  • IStorageAdapter

Implemented by

Index

Methods

clear

  • clear(): Promise<void>

exists

  • exists(key: string): Promise<boolean>
  • Checks if the data for the key exists.

    Parameters

    • key: string

      The key to check.

    Returns Promise<boolean>

    • Promise resolved with true if data for the key exists, or false otherwise.

list

  • list(): Promise<string[]>

load

  • load(key: string): Promise<string | null>
  • Retieves the data for the key.

    Parameters

    • key: string

      The key.

    Returns Promise<string | null>

    • Promise resolved with the data for the given key, or null if there's no data.

remove

  • remove(key: string): Promise<boolean>
  • Removes the data for the key.

    Parameters

    • key: string

      The key to remove.

    Returns Promise<boolean>

    Promise resolved with true if data have been removed, or false otherwise.

store

  • store(key: string, data: string): Promise<void>

update

  • update(key: string, data: string): Promise<void>