UNPKG

@girin/framework

Version:

Core modules for Girin: GraphQL server framework

19 lines 774 B
/// <reference types="node" /> import { Readable } from 'stream'; import { ObjectStorage, StorageObject } from '../core/ObjectStorage'; declare type Entry = { buffer: Buffer; filename: string; }; declare type Bucket = Map<string, Entry | null>; export declare class TestObjectStorage extends ObjectStorage { buckets: Map<string, Bucket>; nextId: number; save(bucket: string, filename: string, content: Readable): Promise<StorageObject>; protected getOrCreateBucket(bucket: string): Map<string, Entry | null>; protected getEntryOrFail(bucket: string, id: string): Entry; delete(bucket: string, id: string): Promise<void>; get(bucket: string, id: string): Promise<StorageObject>; } export {}; //# sourceMappingURL=TestObjectStorage.d.ts.map