working commit
This commit is contained in:
@@ -213,6 +213,44 @@ func (svc *Service) Build() error {
|
||||
|
||||
svc.rout.Put(`/v2/{name}/uploads/{reference}`, svc.hand.PutUpload)
|
||||
|
||||
// Pulling blobs
|
||||
//
|
||||
// To pull a blob, perform a GET request to a URL in the following form:
|
||||
//
|
||||
// /v2/<name>/blobs/<digest> end-2
|
||||
//
|
||||
// <name> is the namespace of the repository, and <digest> is the blob's digest.
|
||||
//
|
||||
// A GET request to an existing blob URL MUST provide the expected blob,
|
||||
// with a response code that MUST be 200 OK.
|
||||
// A successful response SHOULD contain the digest of the uploaded blob in the header Docker-Content-Digest.
|
||||
// If present, the value of this header MUST be a digest matching that of the response body.
|
||||
// Most clients MAY ignore the value, but if it is used, the client MUST verify the value
|
||||
// matches the returned response body. Clients SHOULD verify that the response body
|
||||
// matches the requested digest.
|
||||
//
|
||||
// If the blob is not found in the repository, the response code MUST be 404 Not Found.
|
||||
//
|
||||
// A registry SHOULD support the Range request header in accordance with RFC 9110.
|
||||
|
||||
svc.rout.Get(`/v2/{name}/blobs/{digest}`, svc.hand.GetBlob)
|
||||
|
||||
// Deleting Blobs
|
||||
//
|
||||
// To delete a blob, perform a DELETE request to a path in the following format:
|
||||
//
|
||||
// /v2/<name>/blobs/<digest>
|
||||
//
|
||||
// <name> is the namespace of the repository, and <digest> is the digest
|
||||
// of the blob to be deleted.
|
||||
//
|
||||
// Upon success, the registry MUST respond with code 202 Accepted.
|
||||
// If the blob is not found, a 404 Not Found code MUST be returned.
|
||||
// If blob deletion is disabled, the registry MUST respond with either
|
||||
// a 400 Bad Request or a 405 Method Not Allowed.
|
||||
|
||||
svc.rout.Delete(`/v2/{name}/blobs/{digest}`, svc.hand.DeleteBlob)
|
||||
|
||||
svc.rout.NotFound(svc.hand.NotFound)
|
||||
|
||||
selector := svc.rout.Selector()
|
||||
|
||||
Reference in New Issue
Block a user