errors

package
v0.0.0-...-1858810 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlobUnknown = DockerError{
		Code:    "BLOB_UNKNOWN",
		Message: "blob unknown to registry",
		Detail: "This error may be returned when a blob is unknown " +
			"to the registry in a specified repository. " +
			"This can be returned with a standard get or " +
			"if a manifest references an unknown layer during upload",
	}
	BlobUploadInvalid = DockerError{
		Code:    "BLOB_UPLOAD_INVALID",
		Message: "blob upload invalid",
		Detail:  "The blob upload encountered an error and can no longer proceed.",
	}
	BlobUploadUnknown = DockerError{
		Code:    "BLOB_UPLOAD_UNKNOWN",
		Message: "blob upload unknown to registry",
		Detail:  "If a blob upload has been cancelled or was never started, this error code may be returned.",
	}
	DigestInvalid = DockerError{
		Code:    "DIGEST_INVALID",
		Message: "provided digest did not match uploaded content",
		Detail: "When a blob is uploaded, " +
			"the registry will check that the content matches the digest provided by the client. " +
			"The error may include a detail structure with the key “digest”, " +
			"including the invalid digest string. This error may also be returned " +
			"when a manifest includes an invalid layer digest.",
	}
)
View Source
var (
	NameInvalid = DockerError{
		Code:    "NAME_INVALID",
		Message: "invalid repository name",
		Detail:  "Invalid repository name encountered either during manifest validation or any API operation.",
	}
	NameUnknown = DockerError{
		Code:    "NAME_UNKNOWN",
		Message: "repository name not known to registry",
		Detail:  "This is returned if the name used during an operation is unknown to the registry.",
	}
	PaginationNumberInvalid = DockerError{
		Code:    "PAGINATION_NUMBER_INVALID",
		Message: "invalid number of results requested",
		Detail:  "Returned when the “n” parameter (number of results to return) is not an integer, or “n” is negative.",
	}
	RangeInvalid = DockerError{
		Code:    "RANGE_INVALID",
		Message: "invalid content range",
		Detail: "When a layer is uploaded, the provided range is checked against the uploaded chunk. " +
			"This error is returned if the range is out of order.",
	}
	TagInvalid = DockerError{
		Code:    "TAG_INVALID",
		Message: "manifest tag did not match URI",
		Detail: "During a manifest upload, if the tag in the manifest does not match " +
			"the uri tag, this error will be returned.",
	}
	Unauthorized = DockerError{
		Code:    "UNAUTHORIZED",
		Message: "authentication required",
		Detail: "The access controller was unable to authenticate the client. " +
			"Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate.",
	}
	Denied = DockerError{
		Code:    "DENIED",
		Message: "requested access to the resource is denied",
		Detail:  "The access controller denied access for the operation on a resource.",
	}
	Unsupported = DockerError{
		Code:    "UNSUPPORTED",
		Message: "The operation is unsupported.",
		Detail:  "The operation was unsupported due to a missing implementation or invalid set of parameters.",
	}
)
View Source
var (
	GetManifest = DockerError{
		Code:    "MANIFEST_GET",
		Message: "server error to get manifest",
		Detail:  "This error may be returned when a get manifest server error.",
	}
	CreateManifest = DockerError{
		Code:    "MANIFEST_CREATE",
		Message: "server error to update/create manifest",
		Detail:  "This error may be returned when a filesystem on server return error",
	}
	ManifestBlobUnknown = DockerError{
		Code:    "MANIFEST_BLOB_UNKNOWN",
		Message: "blob unknown to registry",
		Detail:  "This error may be returned when a manifest blob is unknown to the registry.",
	}
	ManifestInvalid = DockerError{
		Code:    "MANIFEST_INVALID",
		Message: "manifest invalid",
		Detail: `During upload, manifests undergo several checks ensuring validity.
			If those checks fail, this error may be returned,
			unless a more specific error is included.
			The detail will contain information the failed validation.`,
	}
	ManifestUnverified = DockerError{
		Code:    "MANIFEST_UNVERIFIED",
		Message: "manifest failed signature verification",
		Detail:  "During manifest upload, if the manifest fails signature verification, this error will be returned.",
	}
)
View Source
var NotSupportedMethod = errors.New("crypto method not supported")

Functions

This section is empty.

Types

type DockerError

type DockerError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Detail  string `json:"detail"`
}

func (DockerError) Error

func (e DockerError) Error() string

type ErrorResponse

type ErrorResponse struct {
	Errors []error `json:"errors"`
}

func NewErrorResponse

func NewErrorResponse(err error) ErrorResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL