distribution/registry/storage
Tibor Vass ddfd2335c7 Add a new reference package abstracting repositories, tags and digests
There seems to be a need for a type that represents a way of pointing
to an image, irrespective of the implementation.

This patch defines a Reference interface and provides 3 implementations:
- TagReference: when only a tag is provided
- DigestReference: when a digest (according to the digest package) is
  provided, can include optional tag as well

Validation of references are purely syntactic.

There is also a strong type for tags, analogous to digests, as well
as a strong type for Repository from which clients can access the
hostname alone, or the repository name without the hostname, or both
together via the String() method.

For Repository, the files names.go and names_test.go were moved from
the v2 package.

Update regexp to support repeated dash and double underscore

Add field type for serialization

Since reference itself may be represented by multiple types which implement the reference inteface, serialization can lead to ambiguous type which cannot be deserialized.
Field wraps the reference object to ensure that the correct type is always deserialized, requiring an extra unwrap of the reference after deserialization.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-10-09 16:33:56 -07:00
..
cache Add a new reference package abstracting repositories, tags and digests 2015-10-09 16:33:56 -07:00
driver Merge pull request #493 from nevermosby/storage-support-openstack-swift 2015-07-22 23:53:36 -07:00
blob_test.go Allow disabling of starage driver redirects 2015-07-24 16:59:35 -07:00
blobcachemetrics.go Open cache interface 2015-05-15 17:56:28 -07:00
blobserver.go Allow disabling of starage driver redirects 2015-07-24 16:59:35 -07:00
blobstore.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
blobwriter.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
blobwriter_nonresumable.go Remove digest package's dependency on external sha implementation 2015-05-20 23:44:08 -07:00
blobwriter_resumable.go Fix build when using build tag 'noresumabledigest' 2015-07-14 11:14:09 -07:00
catalog.go Create Repositories method 2015-07-21 21:45:14 -07:00
catalog_test.go Allow disabling of starage driver redirects 2015-07-24 16:59:35 -07:00
doc.go Move storage package under registry package 2015-02-11 12:43:04 -08:00
filereader.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filereader_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filewriter.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filewriter_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
linkedblobstore.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
manifeststore.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
manifeststore_test.go Allow disabling of starage driver redirects 2015-07-24 16:59:35 -07:00
paths.go Refactor specification of supported digests 2015-05-22 18:08:23 -07:00
paths_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
purgeuploads.go Replace uuid dependency with internal library 2015-05-22 18:59:41 -07:00
purgeuploads_test.go Replace uuid dependency with internal library 2015-05-22 18:59:41 -07:00
registry.go Add a new reference package abstracting repositories, tags and digests 2015-10-09 16:33:56 -07:00
revisionstore.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
signaturestore.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
tagstore.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
util.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
walk.go Make Storage Driver API calls context aware. 2015-04-27 15:58:58 -07:00
walk_test.go Make Storage Driver API calls context aware. 2015-04-27 15:58:58 -07:00