|
@@ -5,6 +5,7 @@ import (
|
|
|
"regexp"
|
|
|
|
|
|
"github.com/docker/distribution/digest"
|
|
|
+ "github.com/docker/distribution/reference"
|
|
|
"github.com/docker/distribution/registry/api/errcode"
|
|
|
)
|
|
|
|
|
@@ -12,7 +13,7 @@ var (
|
|
|
nameParameterDescriptor = ParameterDescriptor{
|
|
|
Name: "name",
|
|
|
Type: "string",
|
|
|
- Format: RepositoryNameRegexp.String(),
|
|
|
+ Format: reference.NameRegexp.String(),
|
|
|
Required: true,
|
|
|
Description: `Name of the target repository.`,
|
|
|
}
|
|
@@ -20,7 +21,7 @@ var (
|
|
|
referenceParameterDescriptor = ParameterDescriptor{
|
|
|
Name: "reference",
|
|
|
Type: "string",
|
|
|
- Format: TagNameRegexp.String(),
|
|
|
+ Format: reference.TagRegexp.String(),
|
|
|
Required: true,
|
|
|
Description: `Tag or digest of the target manifest.`,
|
|
|
}
|
|
@@ -111,45 +112,67 @@ var (
|
|
|
},
|
|
|
}
|
|
|
|
|
|
- unauthorizedResponse = ResponseDescriptor{
|
|
|
- Description: "The client does not have access to the repository.",
|
|
|
+ unauthorizedResponseDescriptor = ResponseDescriptor{
|
|
|
+ Name: "Authentication Required",
|
|
|
StatusCode: http.StatusUnauthorized,
|
|
|
+ Description: "The client is not authenticated.",
|
|
|
Headers: []ParameterDescriptor{
|
|
|
authChallengeHeader,
|
|
|
{
|
|
|
Name: "Content-Length",
|
|
|
Type: "integer",
|
|
|
- Description: "Length of the JSON error response body.",
|
|
|
+ Description: "Length of the JSON response body.",
|
|
|
Format: "<length>",
|
|
|
},
|
|
|
},
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
Body: BodyDescriptor{
|
|
|
ContentType: "application/json; charset=utf-8",
|
|
|
- Format: unauthorizedErrorsBody,
|
|
|
+ Format: errorsBody,
|
|
|
+ },
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ errcode.ErrorCodeUnauthorized,
|
|
|
},
|
|
|
}
|
|
|
|
|
|
- unauthorizedResponsePush = ResponseDescriptor{
|
|
|
- Description: "The client does not have access to push to the repository.",
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
+ repositoryNotFoundResponseDescriptor = ResponseDescriptor{
|
|
|
+ Name: "No Such Repository Error",
|
|
|
+ StatusCode: http.StatusNotFound,
|
|
|
+ Description: "The repository is not known to the registry.",
|
|
|
Headers: []ParameterDescriptor{
|
|
|
- authChallengeHeader,
|
|
|
{
|
|
|
Name: "Content-Length",
|
|
|
Type: "integer",
|
|
|
- Description: "Length of the JSON error response body.",
|
|
|
+ Description: "Length of the JSON response body.",
|
|
|
Format: "<length>",
|
|
|
},
|
|
|
},
|
|
|
+ Body: BodyDescriptor{
|
|
|
+ ContentType: "application/json; charset=utf-8",
|
|
|
+ Format: errorsBody,
|
|
|
+ },
|
|
|
ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
+ ErrorCodeNameUnknown,
|
|
|
+ },
|
|
|
+ }
|
|
|
+
|
|
|
+ deniedResponseDescriptor = ResponseDescriptor{
|
|
|
+ Name: "Access Denied",
|
|
|
+ StatusCode: http.StatusForbidden,
|
|
|
+ Description: "The client does not have required access to the repository.",
|
|
|
+ Headers: []ParameterDescriptor{
|
|
|
+ {
|
|
|
+ Name: "Content-Length",
|
|
|
+ Type: "integer",
|
|
|
+ Description: "Length of the JSON response body.",
|
|
|
+ Format: "<length>",
|
|
|
+ },
|
|
|
},
|
|
|
Body: BodyDescriptor{
|
|
|
ContentType: "application/json; charset=utf-8",
|
|
|
- Format: unauthorizedErrorsBody,
|
|
|
+ Format: errorsBody,
|
|
|
+ },
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ errcode.ErrorCodeDenied,
|
|
|
},
|
|
|
}
|
|
|
)
|
|
@@ -345,7 +368,7 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Name: RouteNameBase,
|
|
|
Path: "/v2/",
|
|
|
Entity: "Base",
|
|
|
- Description: `Base V2 API route. Typically, this can be used for lightweight version checks and to validate registry authorization.`,
|
|
|
+ Description: `Base V2 API route. Typically, this can be used for lightweight version checks and to validate registry authentication.`,
|
|
|
Methods: []MethodDescriptor{
|
|
|
{
|
|
|
Method: "GET",
|
|
@@ -363,24 +386,11 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
},
|
|
|
Failures: []ResponseDescriptor{
|
|
|
- {
|
|
|
- Description: "The client is not authorized to access the registry.",
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Headers: []ParameterDescriptor{
|
|
|
- authChallengeHeader,
|
|
|
- },
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- },
|
|
|
{
|
|
|
Description: "The registry does not implement the V2 API.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -389,7 +399,7 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
{
|
|
|
Name: RouteNameTags,
|
|
|
- Path: "/v2/{name:" + RepositoryNameRegexp.String() + "}/tags/list",
|
|
|
+ Path: "/v2/{name:" + reference.NameRegexp.String() + "}/tags/list",
|
|
|
Entity: "Tags",
|
|
|
Description: "Retrieve information about tags.",
|
|
|
Methods: []MethodDescriptor{
|
|
@@ -432,28 +442,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
},
|
|
|
Failures: []ResponseDescriptor{
|
|
|
- {
|
|
|
- StatusCode: http.StatusNotFound,
|
|
|
- Description: "The repository is not known to the registry.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeNameUnknown,
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Description: "The client does not have access to the repository.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -487,28 +478,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
},
|
|
|
Failures: []ResponseDescriptor{
|
|
|
- {
|
|
|
- StatusCode: http.StatusNotFound,
|
|
|
- Description: "The repository is not known to the registry.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeNameUnknown,
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Description: "The client does not have access to the repository.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -517,9 +489,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
{
|
|
|
Name: RouteNameManifest,
|
|
|
- Path: "/v2/{name:" + RepositoryNameRegexp.String() + "}/manifests/{reference:" + TagNameRegexp.String() + "|" + digest.DigestRegexp.String() + "}",
|
|
|
+ Path: "/v2/{name:" + reference.NameRegexp.String() + "}/manifests/{reference:" + reference.TagRegexp.String() + "|" + digest.DigestRegexp.String() + "}",
|
|
|
Entity: "Manifest",
|
|
|
- Description: "Create, update and retrieve manifests.",
|
|
|
+ Description: "Create, update, delete and retrieve manifests.",
|
|
|
Methods: []MethodDescriptor{
|
|
|
{
|
|
|
Method: "GET",
|
|
@@ -536,7 +508,7 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
Successes: []ResponseDescriptor{
|
|
|
{
|
|
|
- Description: "The manifest idenfied by `name` and `reference`. The contents can be used to identify and resolve resources required to run the specified image.",
|
|
|
+ Description: "The manifest identified by `name` and `reference`. The contents can be used to identify and resolve resources required to run the specified image.",
|
|
|
StatusCode: http.StatusOK,
|
|
|
Headers: []ParameterDescriptor{
|
|
|
digestHeader,
|
|
@@ -560,29 +532,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Description: "The client does not have access to the repository.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- Description: "The named manifest is not known to the registry.",
|
|
|
- StatusCode: http.StatusNotFound,
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeNameUnknown,
|
|
|
- ErrorCodeManifestUnknown,
|
|
|
- },
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -637,17 +589,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
ErrorCodeBlobUnknown,
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Description: "The client does not have permission to push to the repository.",
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
{
|
|
|
Name: "Missing Layer(s)",
|
|
|
Description: "One or more layers may be missing during a manifest upload. If so, the missing layers will be enumerated in the error response.",
|
|
@@ -671,22 +615,11 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Headers: []ParameterDescriptor{
|
|
|
- authChallengeHeader,
|
|
|
- {
|
|
|
- Name: "Content-Length",
|
|
|
- Type: "integer",
|
|
|
- Description: "Length of the JSON error response body.",
|
|
|
- Format: "<length>",
|
|
|
- },
|
|
|
- },
|
|
|
+ Name: "Not allowed",
|
|
|
+ Description: "Manifest put is not allowed because the registry is configured as a pull-through cache or for some other reason",
|
|
|
+ StatusCode: http.StatusMethodNotAllowed,
|
|
|
ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
+ errcode.ErrorCodeUnsupported,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -725,25 +658,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- StatusCode: http.StatusUnauthorized,
|
|
|
- Headers: []ParameterDescriptor{
|
|
|
- authChallengeHeader,
|
|
|
- {
|
|
|
- Name: "Content-Length",
|
|
|
- Type: "integer",
|
|
|
- Description: "Length of the JSON error response body.",
|
|
|
- Format: "<length>",
|
|
|
- },
|
|
|
- },
|
|
|
- ErrorCodes: []errcode.ErrorCode{
|
|
|
- ErrorCodeUnauthorized,
|
|
|
- },
|
|
|
- Body: BodyDescriptor{
|
|
|
- ContentType: "application/json; charset=utf-8",
|
|
|
- Format: errorsBody,
|
|
|
- },
|
|
|
- },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
{
|
|
|
Name: "Unknown Manifest",
|
|
|
Description: "The specified `name` or `reference` are unknown to the registry and the delete was unable to proceed. Clients can assume the manifest was already deleted if this response is returned.",
|
|
@@ -757,6 +674,14 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ Name: "Not allowed",
|
|
|
+ Description: "Manifest delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled.",
|
|
|
+ StatusCode: http.StatusMethodNotAllowed,
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ errcode.ErrorCodeUnsupported,
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -766,11 +691,10 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
|
|
|
{
|
|
|
Name: RouteNameBlob,
|
|
|
- Path: "/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/{digest:" + digest.DigestRegexp.String() + "}",
|
|
|
+ Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/{digest:" + digest.DigestRegexp.String() + "}",
|
|
|
Entity: "Blob",
|
|
|
- Description: "Fetch the blob identified by `name` and `digest`. Used to fetch layers by digest.",
|
|
|
+ Description: "Operations on blobs identified by `name` and `digest`. Used to fetch or delete layers by digest.",
|
|
|
Methods: []MethodDescriptor{
|
|
|
-
|
|
|
{
|
|
|
Method: "GET",
|
|
|
Description: "Retrieve the blob from the registry identified by `digest`. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.",
|
|
@@ -830,7 +754,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponse,
|
|
|
{
|
|
|
Description: "The blob, identified by `name` and `digest`, is unknown to the registry.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -843,6 +766,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
ErrorCodeBlobUnknown,
|
|
|
},
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -899,7 +825,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponse,
|
|
|
{
|
|
|
StatusCode: http.StatusNotFound,
|
|
|
ErrorCodes: []errcode.ErrorCode{
|
|
@@ -915,10 +840,80 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Description: "The range specification cannot be satisfied for the requested content. This can happen when the range is not formatted correctly or if the range is outside of the valid size of the content.",
|
|
|
StatusCode: http.StatusRequestedRangeNotSatisfiable,
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ Method: "DELETE",
|
|
|
+ Description: "Delete the blob identified by `name` and `digest`",
|
|
|
+ Requests: []RequestDescriptor{
|
|
|
+ {
|
|
|
+ Headers: []ParameterDescriptor{
|
|
|
+ hostHeader,
|
|
|
+ authHeader,
|
|
|
+ },
|
|
|
+ PathParameters: []ParameterDescriptor{
|
|
|
+ nameParameterDescriptor,
|
|
|
+ digestPathParameter,
|
|
|
+ },
|
|
|
+ Successes: []ResponseDescriptor{
|
|
|
+ {
|
|
|
+ StatusCode: http.StatusAccepted,
|
|
|
+ Headers: []ParameterDescriptor{
|
|
|
+ {
|
|
|
+ Name: "Content-Length",
|
|
|
+ Type: "integer",
|
|
|
+ Description: "0",
|
|
|
+ Format: "0",
|
|
|
+ },
|
|
|
+ digestHeader,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Failures: []ResponseDescriptor{
|
|
|
+ {
|
|
|
+ Name: "Invalid Name or Digest",
|
|
|
+ StatusCode: http.StatusBadRequest,
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ ErrorCodeDigestInvalid,
|
|
|
+ ErrorCodeNameInvalid,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Description: "The blob, identified by `name` and `digest`, is unknown to the registry.",
|
|
|
+ StatusCode: http.StatusNotFound,
|
|
|
+ Body: BodyDescriptor{
|
|
|
+ ContentType: "application/json; charset=utf-8",
|
|
|
+ Format: errorsBody,
|
|
|
+ },
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ ErrorCodeNameUnknown,
|
|
|
+ ErrorCodeBlobUnknown,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Description: "Blob delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled",
|
|
|
+ StatusCode: http.StatusMethodNotAllowed,
|
|
|
+ Body: BodyDescriptor{
|
|
|
+ ContentType: "application/json; charset=utf-8",
|
|
|
+ Format: errorsBody,
|
|
|
+ },
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ errcode.ErrorCodeUnsupported,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
// TODO(stevvooe): We may want to add a PUT request here to
|
|
|
// kickoff an upload of a blob, integrated with the blob upload
|
|
|
// API.
|
|
@@ -927,8 +922,8 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
|
|
|
{
|
|
|
Name: RouteNameBlobUpload,
|
|
|
- Path: "/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/uploads/",
|
|
|
- Entity: "Intiate Blob Upload",
|
|
|
+ Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/uploads/",
|
|
|
+ Entity: "Initiate Blob Upload",
|
|
|
Description: "Initiate a blob upload. This endpoint can be used to create resumable uploads or monolithic uploads.",
|
|
|
Methods: []MethodDescriptor{
|
|
|
{
|
|
@@ -987,7 +982,17 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
ErrorCodeNameInvalid,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponsePush,
|
|
|
+ {
|
|
|
+ Name: "Not allowed",
|
|
|
+ Description: "Blob upload is not allowed because the registry is configured as a pull-through cache or for some other reason",
|
|
|
+ StatusCode: http.StatusMethodNotAllowed,
|
|
|
+ ErrorCodes: []errcode.ErrorCode{
|
|
|
+ errcode.ErrorCodeUnsupported,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -1031,7 +1036,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
ErrorCodeNameInvalid,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponsePush,
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -1041,7 +1048,7 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
|
|
|
{
|
|
|
Name: RouteNameBlobUploadChunk,
|
|
|
- Path: "/v2/{name:" + RepositoryNameRegexp.String() + "}/blobs/uploads/{uuid:[a-zA-Z0-9-_.=]+}",
|
|
|
+ Path: "/v2/{name:" + reference.NameRegexp.String() + "}/blobs/uploads/{uuid:[a-zA-Z0-9-_.=]+}",
|
|
|
Entity: "Blob Upload",
|
|
|
Description: "Interact with blob uploads. Clients should never assemble URLs for this endpoint and should only take it through the `Location` header on related API requests. The `Location` header and its parameters should be preserved by clients, using the latest value returned via upload related API calls.",
|
|
|
Methods: []MethodDescriptor{
|
|
@@ -1090,7 +1097,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponse,
|
|
|
{
|
|
|
Description: "The upload is unknown to the registry. The upload must be restarted.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -1102,6 +1108,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -1162,7 +1171,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponsePush,
|
|
|
{
|
|
|
Description: "The upload is unknown to the registry. The upload must be restarted.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -1174,6 +1182,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -1241,7 +1252,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponsePush,
|
|
|
{
|
|
|
Description: "The upload is unknown to the registry. The upload must be restarted.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -1257,6 +1267,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Description: "The `Content-Range` specification cannot be accepted, either because it does not overlap with the current progress or it is invalid.",
|
|
|
StatusCode: http.StatusRequestedRangeNotSatisfiable,
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -1326,13 +1339,13 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
ErrorCodeDigestInvalid,
|
|
|
ErrorCodeNameInvalid,
|
|
|
ErrorCodeBlobUploadInvalid,
|
|
|
+ errcode.ErrorCodeUnsupported,
|
|
|
},
|
|
|
Body: BodyDescriptor{
|
|
|
ContentType: "application/json; charset=utf-8",
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponsePush,
|
|
|
{
|
|
|
Description: "The upload is unknown to the registry. The upload must be restarted.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -1344,6 +1357,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -1386,7 +1402,6 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
- unauthorizedResponse,
|
|
|
{
|
|
|
Description: "The upload is unknown to the registry. The client may ignore this error and assume the upload has been deleted.",
|
|
|
StatusCode: http.StatusNotFound,
|
|
@@ -1398,6 +1413,9 @@ var routeDescriptors = []RouteDescriptor{
|
|
|
Format: errorsBody,
|
|
|
},
|
|
|
},
|
|
|
+ unauthorizedResponseDescriptor,
|
|
|
+ repositoryNotFoundResponseDescriptor,
|
|
|
+ deniedResponseDescriptor,
|
|
|
},
|
|
|
},
|
|
|
},
|