package
2.0.0-alpha.1+incompatible
Repository: https://github.com/estesp/distribution.git
Documentation: pkg.go.dev
# Functions
NewURLBuilder creates a URLBuilder with provided root url object.
NewURLBuilderFromRequest uses information from an *http.Request to construct the root url.
NewURLBuilderFromString workes identically to NewURLBuilder except it takes a string argument for the root, returning an error if it is not a valid url.
ParseErrorCode attempts to parse the error code string, returning ErrorCodeUnknown if the error is not known.
Router builds a gorilla router with named routes for the various API methods.
ValidateRespositoryName ensures the repository name is valid for use in the registry.
# Constants
ErrorCodeBlobUnknown is returned when a blob is unknown to the registry.
ErrorCodeBlobUploadInvalid is returned when an upload is invalid.
ErrorCodeBlobUploadUnknown is returned when an upload is unknown.
ErrorCodeDigestInvalid is returned when uploading a blob if the provided digest does not match the blob contents.
ErrorCodeManifestInvalid returned when an image manifest is invalid, typically during a PUT operation.
ErrorCodeManifestUnknown returned when image manifest is unknown.
ErrorCodeManifestUnverified is returned when the manifest fails signature verfication.
ErrorCodeNameInvalid is returned when the name in the manifest does not match the provided name.
ErrorCodeNameUnknown when the repository name is not known.
ErrorCodeSizeInvalid is returned when uploading a blob if the provided size does not match the content length.
ErrorCodeTagInvalid is returned when the tag in the manifest does not match the provided tag.
ErrorCodeUnauthorized is returned if a request is not authorized.
ErrorCodeUnknown is a catch-all for errors not defined below.
RepositoryNameComponentMaxLength is the maximum number of characters in a single repository name slash-delimited component.
RepositoryNameComponentMinLength is the minimum number of characters in a single repository name slash-delimited component.
RepositoryNameMaxComponents is the maximum number of slash-delimited components that a repository name must have.
RepositoryNameMinComponents is the minimum number of slash-delimited components that a repository name must have.
RepositoryNameTotalLengthMax is the maximum total number of characters in a repository name.
The following are definitions of the name under which all V2 routes are registered.
The following are definitions of the name under which all V2 routes are registered.
The following are definitions of the name under which all V2 routes are registered.
The following are definitions of the name under which all V2 routes are registered.
The following are definitions of the name under which all V2 routes are registered.
The following are definitions of the name under which all V2 routes are registered.
# Variables
APIDescriptor exports descriptions of the layout of the v2 registry API.
ErrRepositoryNameComponentInvalid is returned when a repository name does not match RepositoryNameComponentRegexp.
ErrRepositoryNameComponentLong is returned when a repository name contains a component which is longer than RepositoryNameComponentMaxLength.
ErrRepositoryNameComponentShort is returned when a repository name contains a component which is shorter than RepositoryNameComponentMinLength.
ErrRepositoryNameLong is returned when a repository name is longer than RepositoryNameTotalLengthMax.
ErrRepositoryNameMissingComponents is returned when a repository name contains fewer than RepositoryNameMinComponents components.
ErrRepositoryNameTooManyComponents is returned when a repository name contains more than RepositoryNameMaxComponents components.
RepositoryNameComponentAnchoredRegexp is the version of RepositoryNameComponentRegexp which must completely match the content.
RepositoryNameComponentRegexp restricts registtry path components names to start with at least two letters or numbers, with following parts able to separated by one period, dash or underscore.
RepositoryNameRegexp builds on RepositoryNameComponentRegexp to allow 2 to 5 path components, separated by a forward slash.
TagNameRegexp matches valid tag names.
# Structs
BodyDescriptor describes a request body and its expected content type.
Error provides a wrapper around ErrorCode with extra Details provided.
ErrorDescriptor provides relevant information about a given error code.
Errors provides the envelope for multiple errors and a few sugar methods for use within the application.
MethodDescriptor provides a description of the requests that may be conducted with the target method.
ParameterDescriptor describes the format of a request parameter, which may be a header, path parameter or query parameter.
RequestDescriptor covers a particular set of headers and parameters that can be carried out with the parent method.
ResponseDescriptor describes the components of an API response.
RouteDescriptor describes a route specified by name.
URLBuilder creates registry API urls from a single base endpoint.
# Type aliases
ErrorCode represents the error type.