Add tag delete API

Signed-off-by: João Pereira <484633+joaodrp@users.noreply.github.com>
This commit is contained in:
João Pereira 2021-05-27 23:13:59 +01:00
parent d80a63f1ea
commit 6ae6df7d75
No known key found for this signature in database
GPG key ID: C325CA2B821F7043
8 changed files with 179 additions and 23 deletions

View file

@ -655,7 +655,7 @@ var routeDescriptors = []RouteDescriptor{
},
{
Method: "DELETE",
Description: "Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.",
Description: "Delete the manifest or tag identified by `name` and `reference` where `reference` can be a tag or digest. Note that a manifest can _only_ be deleted by digest.",
Requests: []RequestDescriptor{
{
Headers: []ParameterDescriptor{
@ -691,7 +691,7 @@ var routeDescriptors = []RouteDescriptor{
tooManyRequestsDescriptor,
{
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.",
Description: "The specified `name` or `reference` are unknown to the registry and the delete was unable to proceed. Clients can assume the manifest or tag was already deleted if this response is returned.",
StatusCode: http.StatusNotFound,
ErrorCodes: []errcode.ErrorCode{
ErrorCodeNameUnknown,
@ -704,7 +704,7 @@ var routeDescriptors = []RouteDescriptor{
},
{
Name: "Not allowed",
Description: "Manifest delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled.",
Description: "Manifest or tag 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,