Closed michielbdejong closed 5 years ago
Did a lot of refactoring, need to get unit tests in shape again now.
In the previous design, ResourceData could travel all the way from a Blob to the HttpResponder. Now, we should have different things in different layers:
Representation
, which is very similar to ResourceDataLdpNr
but let's keep them separate in case we want to, for instance, change how/where ETags are generated
interface Blob extends Node {
getData (): Promise<Array<Buffer>>
setData (data: Array<Buffer>): Promise<void>
getBodyVersion (etag: string): Promise<ReadableStream>
setBodyVersion (etag: string, data: ReadableStream): Promise<void>
deleteBodyVersion (etag: string): Promise<void>
}
Three important interfaces:
Cancelled in favour of Operation Treasure Trove.
Also addresses #129, #133, #126, #124.