Add error code for unknown repository

This commit is contained in:
Stephen J Day 2014-12-09 14:19:38 -08:00
parent 33b2b80a8c
commit 10e5276c0e

View file

@ -34,6 +34,9 @@ const (
// match the provided tag. // match the provided tag.
ErrorCodeInvalidTag ErrorCodeInvalidTag
// ErrorCodeUnknownRepository when the repository name is not known.
ErrorCodeUnknownRepository
// ErrorCodeUnknownManifest returned when image manifest name and tag is // ErrorCodeUnknownManifest returned when image manifest name and tag is
// unknown, accompanied by a 404 status. // unknown, accompanied by a 404 status.
ErrorCodeUnknownManifest ErrorCodeUnknownManifest
@ -64,6 +67,7 @@ var errorCodeStrings = map[ErrorCode]string{
ErrorCodeInvalidLength: "INVALID_LENGTH", ErrorCodeInvalidLength: "INVALID_LENGTH",
ErrorCodeInvalidName: "INVALID_NAME", ErrorCodeInvalidName: "INVALID_NAME",
ErrorCodeInvalidTag: "INVALID_TAG", ErrorCodeInvalidTag: "INVALID_TAG",
ErrorCodeUnknownRepository: "UNKNOWN_REPOSITORY",
ErrorCodeUnknownManifest: "UNKNOWN_MANIFEST", ErrorCodeUnknownManifest: "UNKNOWN_MANIFEST",
ErrorCodeInvalidManifest: "INVALID_MANIFEST", ErrorCodeInvalidManifest: "INVALID_MANIFEST",
ErrorCodeUnverifiedManifest: "UNVERIFIED_MANIFEST", ErrorCodeUnverifiedManifest: "UNVERIFIED_MANIFEST",
@ -78,6 +82,7 @@ var errorCodesMessages = map[ErrorCode]string{
ErrorCodeInvalidLength: "provided length did not match content length", ErrorCodeInvalidLength: "provided length did not match content length",
ErrorCodeInvalidName: "manifest name did not match URI", ErrorCodeInvalidName: "manifest name did not match URI",
ErrorCodeInvalidTag: "manifest tag did not match URI", ErrorCodeInvalidTag: "manifest tag did not match URI",
ErrorCodeUnknownRepository: "repository not known to registry",
ErrorCodeUnknownManifest: "manifest not known", ErrorCodeUnknownManifest: "manifest not known",
ErrorCodeInvalidManifest: "manifest is invalid", ErrorCodeInvalidManifest: "manifest is invalid",
ErrorCodeUnverifiedManifest: "manifest failed signature validation", ErrorCodeUnverifiedManifest: "manifest failed signature validation",