Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LinkStorage

Interface storage adapters should implement.

Storage adapters are responsible for persisting LinkSessions and can optionally be passed to the Link constructor to auto-persist sessions.

Hierarchy

  • LinkStorage

Index

Methods

  • read(key: string): Promise<null | string>
  • Read key from storage. Should return null if key can not be found.

    Parameters

    • key: string

    Returns Promise<null | string>

  • remove(key: string): Promise<void>
  • Delete key from storage. Should not error if deleting non-existing key.

    Parameters

    • key: string

    Returns Promise<void>

  • write(key: string, data: string): Promise<void>
  • Write string to storage at key. Should overwrite existing values without error.

    Parameters

    • key: string
    • data: string

    Returns Promise<void>

Generated using TypeDoc