|
@@ -1,9 +1,6 @@
|
|
|
package v2
|
|
|
|
|
|
-import (
|
|
|
- "github.com/docker/docker-registry/common"
|
|
|
- "github.com/gorilla/mux"
|
|
|
-)
|
|
|
+import "github.com/gorilla/mux"
|
|
|
|
|
|
// The following are definitions of the name under which all V2 routes are
|
|
|
// registered. These symbols can be used to look up a route based on the name.
|
|
@@ -40,29 +37,29 @@ func Router() *mux.Router {
|
|
|
// PUT /v2/<name>/manifest/<tag> Image Manifest Upload the image manifest identified by name and tag.
|
|
|
// DELETE /v2/<name>/manifest/<tag> Image Manifest Delete the image identified by name and tag.
|
|
|
router.
|
|
|
- Path("/v2/{name:" + common.RepositoryNameRegexp.String() + "}/manifests/{tag:" + common.TagNameRegexp.String() + "}").
|
|
|
+ Path("/v2/{name:" + RepositoryNameRegexp.String() + "}/manifests/{tag:" + TagNameRegexp.String() + "}").
|
|
|
Name(RouteNameManifest)
|
|
|
|
|
|
// GET /v2/<name>/tags/list Tags Fetch the tags under the repository identified by name.
|
|
|
router.
|
|
|
- Path("/v2/{name:" + common.RepositoryNameRegexp.String() + "}/tags/list").
|
|
|
+ Path("/v2/{name:" + RepositoryNameRegexp.String() + "}/tags/list").
|
|
|
Name(RouteNameTags)
|
|
|
|
|
|
// GET /v2/<name>/blob/<digest> Layer Fetch the blob identified by digest.
|
|
|
router.
|
|
|
- Path("/v2/{name:" + common.RepositoryNameRegexp.String() + "}/blobs/{digest:[a-zA-Z0-9-_+.]+:[a-zA-Z0-9-_+.=]+}").
|
|
|
+ Path("/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/{digest:[a-zA-Z0-9-_+.]+:[a-zA-Z0-9-_+.=]+}").
|
|
|
Name(RouteNameBlob)
|
|
|
|
|
|
// POST /v2/<name>/blob/upload/ Layer Upload Initiate an upload of the layer identified by tarsum.
|
|
|
router.
|
|
|
- Path("/v2/{name:" + common.RepositoryNameRegexp.String() + "}/blobs/uploads/").
|
|
|
+ Path("/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/uploads/").
|
|
|
Name(RouteNameBlobUpload)
|
|
|
|
|
|
// GET /v2/<name>/blob/upload/<uuid> Layer Upload Get the status of the upload identified by tarsum and uuid.
|
|
|
// PUT /v2/<name>/blob/upload/<uuid> Layer Upload Upload all or a chunk of the upload identified by tarsum and uuid.
|
|
|
// DELETE /v2/<name>/blob/upload/<uuid> Layer Upload Cancel the upload identified by layer and uuid
|
|
|
router.
|
|
|
- Path("/v2/{name:" + common.RepositoryNameRegexp.String() + "}/blobs/uploads/{uuid}").
|
|
|
+ Path("/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/uploads/{uuid}").
|
|
|
Name(RouteNameBlobUploadChunk)
|
|
|
|
|
|
return router
|