Commit Graph

290 Commits

Author SHA1 Message Date
Derrick Hammer 89ef950432
refactor: use provided file hash 2023-05-23 20:14:21 -04:00
Derrick Hammer 396b3f60a8
refactor: move terminateUpload db logic to store 2023-05-23 20:12:48 -04:00
Derrick Hammer e7d1bd0f09
refactor: add getStore helper 2023-05-23 20:10:51 -04:00
Derrick Hammer e8c232dfdd
refactor: change shared to use interfaces to avoid an import cycle 2023-05-23 20:10:17 -04:00
Derrick Hammer 39936b3b14
refactor: create a new tus store that uses the db for meta instead of the filesystem 2023-05-22 19:07:06 -04:00
Derrick Hammer 7845f95776
refactor: move logger to its own package 2023-05-22 19:05:53 -04:00
Derrick Hammer 6d5b9d880b
refactor: deduplicate building api urls 2023-05-22 17:14:32 -04:00
Derrick Hammer 4b712a3a80
refactor: see if proof exists and only if both the proof and file are not 404, do we abort as already existing 2023-05-22 16:36:19 -04:00
Derrick Hammer 7fe05862b1
chore: update renterd 2023-05-22 11:02:59 -04:00
Derrick Hammer 90170e5b81
fix: if we have an existing upload, just return it as if successful 2023-05-22 11:02:47 -04:00
Derrick Hammer ed6220fc7d
refactor: optionally compare passed hash with computed one and reject if they don't match 2023-05-22 11:00:24 -04:00
Derrick Hammer 09f9a5bdfd
refactor: update id fields 2023-05-22 10:59:16 -04:00
Derrick Hammer 75e5838b01
refactor: move tus record delete logic to terminateUpload and delete by tus upload id 2023-05-22 10:26:48 -04:00
Derrick Hammer 6ddef03790
fix: if uploading returns a 500 and its a slab error, treat as a 404 2023-05-19 09:05:40 -04:00
Derrick Hammer bef2ed7431
refactor: add logging 2023-05-19 09:04:47 -04:00
Derrick Hammer 748cac542e
refactor: add zap logger 2023-05-17 13:35:22 -04:00
Derrick Hammer 0a90ff6439
refactor: add terminateUpload method 2023-05-17 13:34:27 -04:00
Derrick Hammer 80561f89e9
fix: missing setting SetTusComposer 2023-05-17 13:34:05 -04:00
Derrick Hammer df08fc980a
fix: add a check for a 500 error 2023-05-17 13:33:22 -04:00
Derrick Hammer 76b6fb34fe
chore: update renterd 2023-05-17 10:55:06 -04:00
Derrick Hammer 033522222f
chore: remove unused deps 2023-05-17 10:53:42 -04:00
Derrick Hammer ee33da755c
refactor: use BaoEncodedSize 2023-05-17 10:12:22 -04:00
Derrick Hammer aa702ffd02
refactor: move to new golang bao implementation 2023-05-17 09:52:25 -04:00
Derrick Hammer 2f514c02be
refactor: move shared global state to a shared package 2023-05-16 18:46:08 -04:00
Derrick Hammer 503cb55c55
refactor: tus needs to move to its own package 2023-05-16 18:45:32 -04:00
Derrick Hammer 55d8dda6e8
refactor: have the Download method check for a tus upload thats still in progress and use it if a upload item does not exist 2023-05-16 18:42:03 -04:00
Derrick Hammer 4548de5c60
refactor: change storing path to just ID and fetch from upload via the tus store 2023-05-16 17:11:38 -04:00
Derrick Hammer 673f7c6dfd
refactor: have Upload take both a io.ReaderSeeker and os.File and update usages based of if we are streaming a small file or handling a big one via filename 2023-05-15 15:47:46 -04:00
Derrick Hammer 687f26cc77
feat: add ComputeFile bao RPC method 2023-05-15 15:45:05 -04:00
Derrick Hammer 35878a2427
chore: update deps 2023-05-15 12:36:08 -04:00
Derrick Hammer 3005be6fec
feat: tus support 2023-05-15 12:36:00 -04:00
Derrick Hammer a8d2ad3393
refactor: move to a go-plugin based GRPC approach for bao 2023-05-15 12:34:55 -04:00
Derrick Hammer 435445dda5
refactor: change where to use a struct 2023-05-11 15:25:31 -04:00
Derrick Hammer 294370d88d
fix: hasher needs the size set to 32 2023-05-11 15:24:49 -04:00
Derrick Hammer b44b12f85e
refactor: change download controller method to use a path argument and not a query 2023-05-10 15:09:18 -04:00
Derrick Hammer 90e4ce6408
fix: use bufio reader 2023-05-10 14:50:36 -04:00
Derrick Hammer b48db1d8c4
refactor: add Download function to files service 2023-05-10 14:41:12 -04:00
Derrick Hammer 73bc836cbc
refactor: change files controller to use new files service api 2023-05-10 14:40:29 -04:00
Derrick Hammer 118c679f76
feat: add StringHash 2023-05-10 14:36:45 -04:00
Derrick Hammer a93add8f70
refactor: create new files package with Upload 2023-05-10 14:28:32 -04:00
Derrick Hammer 2dae0c8687
refactor: rename services to controllers 2023-05-10 14:23:22 -04:00
Derrick Hammer 488f8737c0
feat: add EncodeString function 2023-05-10 14:17:50 -04:00
Derrick Hammer 8f3af2084c
refactor: rename services to controllers 2023-05-10 07:07:56 -04:00
Derrick Hammer 6ceefc11cf
refactor: make encode fixed method to take a [32]byte, and change Encode to take a byte array that just copies and calls EncodeFixed 2023-05-09 12:48:48 -04:00
Derrick Hammer b21a425e24
fix: dont try to stream if we have an error 2023-05-08 10:16:47 -04:00
Derrick Hammer 9b17557d14
chore: update deps 2023-05-08 10:11:19 -04:00
Derrick Hammer 79fd550c54
feat: add download endpoint 2023-05-08 10:10:57 -04:00
Derrick Hammer fb65690abd
fix: add shutdown signal and flag for renterd 2023-05-08 10:09:33 -04:00
Derrick Hammer 4e6c29f1fd
feat: add Valid, and Decode methods, and create CID struct 2023-05-08 10:09:00 -04:00
Derrick Hammer 2dc9d4dcf6
refactor: rename encode method 2023-05-06 04:38:09 -04:00