Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/entries/universal.ts>AttachmentDriverMemory

Storage for private, distributed, offline-first applications.
Go to Latest
class AttachmentDriverMemory
Re-export
import { AttachmentDriverMemory } from "https://deno.land/x/earthstar@v10.2.0/src/entries/universal.ts";

An attachment driver which persists attachments in memory. Works everywhere.

Properties

private
attachmentMap: Map<string, Blob>
private
closed: boolean
private
stagingMap: Map<string, Blob>

Methods

private
getKey(formatName: string, attachmentHash: string)
close(erase: boolean)
erase(formatName: string, attachmentHash: string)
filter(hashes: Record<string, Set<string>>): Promise<{ format: string; hash: string; }[]>
getAttachment(formatName: string, attachmentHash: string): Promise<DocAttachment | undefined>
isClosed(): boolean
stage(formatName: string, attachment: ReadableStream<Uint8Array> | Uint8Array)