{"modulePath":"github.com/AlaudaDevops/distribution","version":"v2.8.3+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package reference\n\nPackage reference is deprecated, and has moved to github.com/distribution/reference.\n\nDeprecated: use github.com/distribution/reference instead.\n\n## Constants\n\n```go\nconst (\n\t// NameTotalLengthMax is the maximum total number of characters in a repository name.\n\t//\n\t// Deprecated: use [reference.NameTotalLengthMax].\n\tNameTotalLengthMax = reference.NameTotalLengthMax\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference.\n\t//\n\t// Deprecated: use [reference.ErrReferenceInvalidFormat].\n\tErrReferenceInvalidFormat = reference.ErrReferenceInvalidFormat\n\n\t// ErrTagInvalidFormat represents an error while trying to parse a string as a tag.\n\t//\n\t// Deprecated: use [reference.ErrTagInvalidFormat].\n\tErrTagInvalidFormat = reference.ErrTagInvalidFormat\n\n\t// ErrDigestInvalidFormat represents an error while trying to parse a string as a tag.\n\t//\n\t// Deprecated: use [reference.ErrDigestInvalidFormat].\n\tErrDigestInvalidFormat = reference.ErrDigestInvalidFormat\n\n\t// ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters.\n\t//\n\t// Deprecated: use [reference.ErrNameContainsUppercase].\n\tErrNameContainsUppercase = reference.ErrNameContainsUppercase\n\n\t// ErrNameEmpty is returned for empty, invalid repository names.\n\t//\n\t// Deprecated: use [reference.ErrNameEmpty].\n\tErrNameEmpty = reference.ErrNameEmpty\n\n\t// ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax.\n\t//\n\t// Deprecated: use [reference.ErrNameTooLong].\n\tErrNameTooLong = reference.ErrNameTooLong\n\n\t// ErrNameNotCanonical is returned when a name is not canonical.\n\t//\n\t// Deprecated: use [reference.ErrNameNotCanonical].\n\tErrNameNotCanonical = reference.ErrNameNotCanonical\n)\n```\n\n```go\nvar DigestRegexp = reference.DigestRegexp\n```\nDigestRegexp matches well-formed digests, including algorithm (e.g. \"sha256:\\\u003cencoded\u003e\").\n\nDeprecated: use [reference.DigestRegexp](/github.com/distribution/reference#DigestRegexp).\n\n```go\nvar DomainRegexp = reference.DigestRegexp\n```\nDomainRegexp matches hostname or IP-addresses, optionally including a port number. It defines the structure of potential domain components that may be part of image names. This is purposely a subset of what is allowed by DNS to ensure backwards compatibility with Docker image names. It may be a subset of DNS domain name, an IPv4 address in decimal format, or an IPv6 address between square brackets (excluding zone identifiers as defined by [RFC 6874](https://www.rfc-editor.org/rfc/rfc6874.) or special addresses such as IPv4-Mapped).\n\nDeprecated: use [reference.DomainRegexp](/github.com/distribution/reference#DomainRegexp).\n\n```go\nvar IdentifierRegexp = reference.IdentifierRegexp\n```\nIdentifierRegexp is the format for string identifier used as a content addressable identifier using sha256. These identifiers are like digests without the algorithm, since sha256 is used.\n\nDeprecated: use [reference.IdentifierRegexp](/github.com/distribution/reference#IdentifierRegexp).\n\n```go\nvar NameRegexp = reference.NameRegexp\n```\nNameRegexp is the format for the name component of references, including an optional domain and port, but without tag or digest suffix.\n\nDeprecated: use [reference.NameRegexp](/github.com/distribution/reference#NameRegexp).\n\n```go\nvar ReferenceRegexp = reference.ReferenceRegexp\n```\nReferenceRegexp is the full supported format of a reference. The regexp is anchored and has capturing groups for name, tag, and digest components.\n\nDeprecated: use [reference.ReferenceRegexp](/github.com/distribution/reference#ReferenceRegexp).\n\n```go\nvar (\n\t// ShortIdentifierRegexp is the format used to represent a prefix\n\t// of an identifier. A prefix may be used to match a sha256 identifier\n\t// within a list of trusted identifiers.\n\t//\n\t// Deprecated: support for short-identifiers is deprecated, and will be removed in v3.\n\tShortIdentifierRegexp = regexp.MustCompile(shortIdentifier)\n)\n```\n\n```go\nvar TagRegexp = reference.TagRegexp\n```\nTagRegexp matches valid tag names. From [docker/docker:graph/tags.go](https://github.com/moby/moby/blob/v1.6.0/graph/tags.go#L26-L28).\n\nDeprecated: use [reference.TagRegexp](/github.com/distribution/reference#TagRegexp).\n\n## Functions\n\n```go\nfunc AsField(ref reference.Reference) reference.Field\n```\nAsField wraps a reference in a Field for encoding.\n\nDeprecated: use [reference.AsField](/github.com/distribution/reference#AsField).\n\n```go\nfunc Domain(named reference.Named) string\n```\nDomain returns the domain part of the [Named](#Named) reference.\n\nDeprecated: use [reference.Domain](/github.com/distribution/reference#Domain).\n\n```go\nfunc FamiliarMatch(pattern string, ref reference.Reference) (bool, error)\n```\nFamiliarMatch reports whether ref matches the specified pattern. See [path.Match](/path#Match) for supported patterns.\n\nDeprecated: use [reference.FamiliarMatch](/github.com/distribution/reference#FamiliarMatch).\n\n```go\nfunc FamiliarName(ref reference.Named) string\n```\nFamiliarName returns the familiar name string for the given named, familiarizing if needed.\n\nDeprecated: use [reference.FamiliarName](/github.com/distribution/reference#FamiliarName).\n\n```go\nfunc FamiliarString(ref reference.Reference) string\n```\nFamiliarString returns the familiar string representation for the given reference, familiarizing if needed.\n\nDeprecated: use [reference.FamiliarString](/github.com/distribution/reference#FamiliarString).\n\n```go\nfunc IsNameOnly(ref reference.Named) bool\n```\nIsNameOnly returns true if reference only contains a repo name.\n\nDeprecated: use [reference.IsNameOnly](/github.com/distribution/reference#IsNameOnly).\n\n```go\nfunc Parse(s string) (reference.Reference, error)\n```\nParse parses s and returns a syntactically valid Reference. If an error was encountered it is returned, along with a nil Reference.\n\nDeprecated: use [reference.Parse](/github.com/distribution/reference#Parse).\n\n```go\nfunc ParseAnyReference(ref string) (reference.Reference, error)\n```\nParseAnyReference parses a reference string as a possible identifier, full digest, or familiar name.\n\nDeprecated: use [reference.ParseAnyReference](/github.com/distribution/reference#ParseAnyReference).\n\n```go\nfunc ParseDockerRef(ref string) (reference.Named, error)\n```\nParseDockerRef normalizes the image reference following the docker convention, which allows for references to contain both a tag and a digest.\n\nDeprecated: use [reference.ParseDockerRef](/github.com/distribution/reference#ParseDockerRef).\n\n```go\nfunc ParseNamed(s string) (reference.Named, error)\n```\nParseNamed parses s and returns a syntactically valid reference implementing the Named interface. The reference must have a name and be in the canonical form, otherwise an error is returned. If an error was encountered it is returned, along with a nil Reference.\n\nDeprecated: use [reference.ParseNamed](/github.com/distribution/reference#ParseNamed).\n\n```go\nfunc ParseNormalizedNamed(s string) (reference.Named, error)\n```\nParseNormalizedNamed parses a string into a named reference transforming a familiar name from Docker UI to a fully qualified reference. If the value may be an identifier use ParseAnyReference.\n\nDeprecated: use [reference.ParseNormalizedNamed](/github.com/distribution/reference#ParseNormalizedNamed).\n\n```go\nfunc Path(named reference.Named) (name string)\n```\nPath returns the name without the domain part of the [Named](#Named) reference.\n\nDeprecated: use [reference.Path](/github.com/distribution/reference#Path).\n\n```go\nfunc Sort(references []string) []string\n```\nSort sorts string references preferring higher information references.\n\nDeprecated: use [reference.Sort](/github.com/distribution/reference#Sort).\n\n```go\nfunc SplitHostname(named reference.Named) (string, string)\n```\nSplitHostname splits a named reference into a hostname and name string. If no valid hostname is found, the hostname is empty and the full value is returned as name\n\nDeprecated: Use [reference.Domain](/github.com/distribution/reference#Domain) or [reference.Path](/github.com/distribution/reference#Path).\n\n```go\nfunc TagNameOnly(ref reference.Named) reference.Named\n```\nTagNameOnly adds the default tag \"latest\" to a reference if it only has a repo name.\n\nDeprecated: use [reference.TagNameOnly](/github.com/distribution/reference#TagNameOnly).\n\n```go\nfunc TrimNamed(ref reference.Named) reference.Named\n```\nTrimNamed removes any tag or digest from the named reference.\n\nDeprecated: use [reference.TrimNamed](/github.com/distribution/reference#TrimNamed).\n\n```go\nfunc WithDigest(name reference.Named, digest digest.Digest) (reference.Canonical, error)\n```\nWithDigest combines the name from \"name\" and the digest from \"digest\" to form a reference incorporating both the name and the digest.\n\nDeprecated: use [reference.WithDigest](/github.com/distribution/reference#WithDigest).\n\n```go\nfunc WithName(name string) (reference.Named, error)\n```\nWithName returns a named object representing the given string. If the input is invalid ErrReferenceInvalidFormat will be returned.\n\nDeprecated: use [reference.WithName](/github.com/distribution/reference#WithName).\n\n```go\nfunc WithTag(name reference.Named, tag string) (reference.NamedTagged, error)\n```\nWithTag combines the name from \"name\" and the tag from \"tag\" to form a reference incorporating both the name and the tag.\n\nDeprecated: use [reference.WithTag](/github.com/distribution/reference#WithTag).\n\n## Types\n\n```go\ntype Canonical reference.Canonical\n```\nCanonical reference is an object with a fully unique name including a name with domain and digest\n\nDeprecated: use [reference.Canonical](/github.com/distribution/reference#Canonical).\n\n```go\ntype Digested reference.Digested\n```\nDigested is an object which has a digest in which it can be referenced by\n\nDeprecated: use [reference.Digested](/github.com/distribution/reference#Digested).\n\n```go\ntype Field = reference.Field\n```\nField provides a wrapper type for resolving correct reference types when working with encoding.\n\nDeprecated: use [reference.Field](/github.com/distribution/reference#Field).\n\n```go\ntype Named = reference.Named\n```\nNamed is an object with a full name\n\nDeprecated: use [reference.Named](/github.com/distribution/reference#Named).\n\n```go\ntype NamedTagged reference.NamedTagged\n```\nNamedTagged is an object including a name and tag.\n\nDeprecated: use [reference.NamedTagged](/github.com/distribution/reference#NamedTagged).\n\n```go\ntype Reference = reference.Reference\n```\nReference is an opaque object reference identifier that may include modifiers such as a hostname, name, tag, and digest.\n\nDeprecated: use [reference.Reference](/github.com/distribution/reference#Reference).\n\n```go\nfunc ParseAnyReferenceWithSet(ref string, ds *digestset.Set) (Reference, error)\n```\nParseAnyReferenceWithSet parses a reference string as a possible short identifier to be matched in a digest set, a full digest, or familiar name.\n\nDeprecated: support for short-identifiers is deprecated, and will be removed in v3.\n\n```go\ntype Tagged = reference.Tagged\n```\nTagged is an object which has a tag\n\nDeprecated: use [reference.Tagged](/github.com/distribution/reference#Tagged).\n\n","path":"github.com/AlaudaDevops/distribution/reference","name":"reference","synopsis":"Package reference is deprecated, and has moved to github.com/distribution/reference.","isRedistributable":true}
