UNPKG

@mooncake/contract

Version:

@mooncake/contract

13 lines (11 loc) 468 B
import { Stream, Readable } from "stream"; export interface Storage { url (path: string): string get (path: string): Promise<Buffer | undefined> getAsStream (path: string): Promise<Readable | undefined> has (path: string): Promise<boolean> size (path: string): Promise<number> put (path: string, buffer: Buffer | Readable): Promise<void> putIfAbsent (path: string, buffer: Buffer | Readable): Promise<boolean> delete (key: string): Promise<boolean> }