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
| Parameter | Type |
|---|---|
id | string |
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
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Blob | undefined>
getUri()
getUri(id): Promise<string | undefined>;
Defined in: contract.ts:70
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<string | undefined>
listByStatus()
listByStatus(status): Promise<Attachment[]>;
Defined in: contract.ts:73
Parameters
| Parameter | Type |
|---|---|
status | | AttachmentStatus | AttachmentStatus[] |
Returns
Promise<Attachment[]>
put()
put(
id,
data,
meta
): Promise<Attachment>;
Defined in: contract.ts:68
Parameters
| Parameter | Type |
|---|---|
id | string |
data | BlobInput |
meta | BlobMeta |
Returns
Promise<Attachment>
sizeOf()
sizeOf(id): Promise<number | undefined>;
Defined in: contract.ts:72
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<number | undefined>