From 55f99cb34abfad0036e6a2c5b2e01bd76ebfec99 Mon Sep 17 00:00:00 2001 From: Adam Jensen Date: Sat, 5 May 2018 11:37:56 -0400 Subject: [PATCH] Add LengthDeferrerDataStore interface --- datastore.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datastore.go b/datastore.go index b4c2f00..c6e4249 100644 --- a/datastore.go +++ b/datastore.go @@ -114,3 +114,11 @@ type ConcaterDataStore interface { // must be respected during concatenation. ConcatUploads(destination string, partialUploads []string) error } + +// LengthDeferrerDataStore is the interface that must be implemented if the +// creation-defer-length extension should be enabled. The extension enables a +// client to upload files when their total size is not yet known. Instead, the +// client must send the total size as soon as it becomes known. +type LengthDeferrerDataStore interface { + DeclareLength(id string, length int64) error +}