interface IBlobStorage { getBlobSize(sha256): number | Promise<number>; getBlobType(sha256): undefined | string | Promise<undefined | string>; hasBlob(sha256): Promise<boolean>; listBlobs(): Promise<string[]>; readBlob(sha256): Promise<Readable>; removeBlob(sha256): Promise<void>; setup(): Promise<void>; writeBlob(sha256,
stream,
type?): Promise<void>; } Methods
getBlobSize
- getBlobSize(sha256): number | Promise<number>
Returns number | Promise<number>
getBlobType
- getBlobType(sha256): undefined | string | Promise<undefined | string>
Returns undefined | string | Promise<undefined | string>
hasBlob
- hasBlob(sha256): Promise<boolean>
Returns Promise<boolean>
listBlobs
- listBlobs(): Promise<string[]>
Returns Promise<string[]>
readBlob
- readBlob(sha256): Promise<Readable>
Returns Promise<Readable>
removeBlob
- removeBlob(sha256): Promise<void>
Returns Promise<void>
setup
- setup(): Promise<void>
Returns Promise<void>
writeBlob
- writeBlob(sha256, stream, type?): Promise<void>
Parameters
- sha256: string
- stream: Readable | Buffer
Optional
type: string
Returns Promise<void>
get the size of the stored blob