Commit Graph

20 Commits

Author SHA1 Message Date
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
Marius 14285e971d Add documentation for FileLocker 2015-12-25 21:33:58 +01:00
Marius b4c0df187e Provide easier way for locking file storage 2015-12-19 00:21:34 +01:00
Marius 83587ca0f8 Add filestore.FileLocker 2015-12-19 00:02:11 +01:00
Marius 8d94d55320 Add package descriptions for documentation 2015-12-18 23:24:12 +01:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut c49f7bbf91 uppercase ID and URL to match golint 2015-03-23 17:58:13 +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
Acconut e951dc39d3 change default file permission to 0775 2015-02-06 22:07:53 +01:00
Acconut 29100e3b5b add GET route for downloading uploads 2015-02-06 22:05:33 +01:00
Acconut f513d02938 add documentation 2015-02-01 16:17:56 +01:00
Acconut a70bd4cfa3 rewrite tusd
* expose tusd.DataStore and extracted FileStore
* use pat for routing
* allow absolute BasePaths
* requires StripPrefix
* add support for 1.0 core
* update date in license
2015-02-01 14:57:57 +01:00