Commit Graph

12 Commits

Author SHA1 Message Date
Marius d5004f85a1 Return detailed error when directory is missing
Fixes https://github.com/tus/tusd/issues/98
2017-01-26 21:46:06 +01:00
Marius ff11b6a274 Add test for FileStore.ConcatUploads 2016-01-23 22:55:08 +01:00
Marius 0e750291c9 Use assertions library for tests 2016-01-20 16:40:19 +01:00
Marius b6a28421af Extract concatenation into own interface 2016-01-20 15:33:17 +01:00
Marius bfde73ff89 Test interface implementations for data stores 2016-01-19 22:37:05 +01:00
Marius f6a5530df8 Integrate LockingStore into UnroutedHandler
The reason behind this drastic move was that sometimes a lock needs to
persist across multiple calls to a DataStore. For example, when a PATCH
request is received, following behaviour is wanted:
	* Obtain lock (LockUpload)
	* Get offset, size etc (GetInfo)
	* Write data (WriteChunk)
	* Release lock (UnlockUpload)
However, before this change, the lock would be release and then obtained again
after the GetInfo and before the WriteChunk call. This resulted in an
inefficient resource usage and even a possible race condition.

The effects of this change was:
* FileLocker is now directly integrated into FileStore and not sperarated
* LockingStore and the entire package has been removed
* MemoryLocker has been moved into its very own package
2015-12-26 21:23:09 +01:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut 5772ec458f close io.Reader in tests 2015-02-28 16:12:33 +01:00
Acconut 1659517825 test inferface implentation for FileStore 2015-02-28 14:49:52 +01:00
Acconut 9f94d0591b add support for Termination extension 2015-02-28 14:47:39 +01:00
Acconut 0c16aedc29 use tusd.FileInfo in DataStore.NewUpload 2015-02-16 17:53:50 +01:00
Acconut 0f79383af2 add test for filestore 2015-02-12 16:06:15 +01:00