Refactoring: Pulled the WS access out of Tags into TagService. Tidied up the apply methods for Repository. Re-named Registry and Index to LocalRegistry and LocalIndex.
Created a binder for Repository. Now using regular expressions in the routes file to match the namespace/repoName pair and pass it off to the binder to be parsed. This means I no longer need two versions of each method to handle the namespace/no namespace cases. I've also removed the namespace and repoName binders as they are no longer needed
Refactored the Tags controller and pulled out the file handling functions to TagService.
Applied the CupCake pattern to Tags and TagService
Applied the cupcake pattern to the Repositories controller
Gave the content enumerator tuple a type of it's own
Factored a number of methods out of the Images controller into ImageService
Extracted the localRegsitry out as a component
Further re-factoring of ImageService
More cupcake and extracted the hostnames for the docker index and registry to the application.conf file
Re-named several of the cupcake objects to distinguish them from the traits to help make sure that I haven't left any direct references in other traits.
Added tests for ImageService.findData. In the process we have refactored LocalSource to not be directly dependent on java.io.File
Some tidying up
Tidied up the registry type handling.
Started rebuilding the model for registries to separate out the local and remote registries more cleanly.
Started rebuilding the model for registries to separate out the local and remote registries more cleanly.
Lots of re-working. The PrivateRegistry is now very generic and can probably become the base implementaion for all registries
Moved some Registry stuff around to more appropriate places
Extracted the FileBasedPrivateRegistry to its own file
I've changed the Registry structure to be a chain-of-responsibility. But rather than have all Registry implementations require a 'next' registry, it is up to each implementation to say if it needs a next. So DockerRegistry is an endpoint, and if the resource isn't found there then we get back a None. The PrivateRegistry needs a next registry and, if it can't find the resource locally, will delegate to the next registry. This should make it possible to create a CacheRegistry that sits cleanly between PrivateRegistry and DockerRegistry and simply delegates off to next (i.e. DockerRegistry) when it can't find a resource, and tee the response into the cache as it streams through.