Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

[WIP] Single download by uid endpoint #3163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisSchinnerl
Copy link
Contributor

This PR adds a uid to the download struct which can be used to uniquely identify and retrieve a download within the download history. It also adds an endpoint for retrieving a single download by its UID.
What I'm not sure about yet is how to provide the user with a UID when a download is initialized. It's easy for async downloads but blocking downloads and streams can't easily return the UID.

We might also want to find a more efficient way to retrieve a specific download info than looping over the whole history every time. Maybe a DownloadHistory wrapper struct with methods like Add, Delete, View etc. would be sufficient that combines a map and slice and keeps them synced.

Resolves #3146

// {"TestRemoteRepair", testRemoteRepair},
// {"TestSingleFileGet", testSingleFileGet},
// {"TestStreamingCache", testStreamingCache},
// {"TestUploadDownload", testUploadDownload},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the tests to pass by commenting out the test. Smart.

@ChrisSchinnerl ChrisSchinnerl force-pushed the single-download-endpoint branch from c954677 to b92f28f Compare July 13, 2018 20:52
@ChrisSchinnerl ChrisSchinnerl force-pushed the single-download-endpoint branch from b92f28f to a8b19d5 Compare July 16, 2018 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants