Skip to main content

Interface: BlobStore

Defined in: contract.ts:67

@rasd/storage — the public entry point.

This package owns three things and nothing else: the frozen StorageAdapter contract, a reference implementation of it, and the suite that proves any other implementation matches. It deliberately has no dependency on @rasd/license — that is what makes export() available in every licence state a property of the module graph rather than a promise (docs/09 §10).

Methods

delete()

delete(id): Promise<void>;

Defined in: contract.ts:71

Parameters

ParameterType
idstring

Returns

Promise<void>


gc()

gc(): Promise<{
freedBytes: number;
removed: number;
}>;

Defined in: contract.ts:78

Drops orphans and purged-after-sync bytes. Never touches ids prefixed basemap: — those are host assets with no owning submission (spine §7).

Returns

Promise<{ freedBytes: number; removed: number; }>


get()

get(id): Promise<Blob | undefined>;

Defined in: contract.ts:69

Parameters

ParameterType
idstring

Returns

Promise<Blob | undefined>


getUri()

getUri(id): Promise<string | undefined>;

Defined in: contract.ts:70

Parameters

ParameterType
idstring

Returns

Promise<string | undefined>


listByStatus()

listByStatus(status): Promise<Attachment[]>;

Defined in: contract.ts:73

Parameters

ParameterType
status| AttachmentStatus | AttachmentStatus[]

Returns

Promise<Attachment[]>


put()

put(
id,
data,
meta
): Promise<Attachment>;

Defined in: contract.ts:68

Parameters

ParameterType
idstring
dataBlobInput
metaBlobMeta

Returns

Promise<Attachment>


sizeOf()

sizeOf(id): Promise<number | undefined>;

Defined in: contract.ts:72

Parameters

ParameterType
idstring

Returns

Promise<number | undefined>