Versions in this module Expand all Collapse all v0 v0.6.0 Mar 20, 2024 Changes in this version + const RepositoryNameTotalLengthMax v0.5.0 Aug 31, 2023 Changes in this version + const NameTotalLengthMax + var DigestRegexp = regexp.MustCompile(digestPat) + var DomainRegexp = regexp.MustCompile(domainAndPort) + var ErrDigestInvalidFormat = errors.New("invalid digest format") + var ErrNameContainsUppercase = errors.New("repository name must be lowercase") + var ErrNameEmpty = errors.New("repository name must have at least one component") + var ErrNameNotCanonical = errors.New("repository name must be canonical") + var ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", NameTotalLengthMax) + var ErrReferenceInvalidFormat = errors.New("invalid reference format") + var ErrTagInvalidFormat = errors.New("invalid tag format") + var IdentifierRegexp = regexp.MustCompile(identifier) + var NameRegexp = regexp.MustCompile(namePat) + var ReferenceRegexp = regexp.MustCompile(referencePat) + var TagRegexp = regexp.MustCompile(tag) + func Domain(named Named) string + func FamiliarMatch(pattern string, ref Reference) (bool, error) + func FamiliarName(ref Named) string + func FamiliarString(ref Reference) string + func IsNameOnly(ref Named) bool + func Path(named Named) (name string) + func Sort(references []string) []string + func SplitHostname(named Named) (string, string) + type Canonical interface + Digest func() digest.Digest + func WithDigest(name Named, digest digest.Digest) (Canonical, error) + type Digested interface + Digest func() digest.Digest + type Field struct + func AsField(reference Reference) Field + func (f *Field) UnmarshalText(p []byte) error + func (f Field) MarshalText() (p []byte, err error) + func (f Field) Reference() Reference + type Named interface + Name func() string + func ParseDockerRef(ref string) (Named, error) + func ParseNamed(s string) (Named, error) + func ParseNormalizedNamed(s string) (Named, error) + func TagNameOnly(ref Named) Named + func TrimNamed(ref Named) Named + func WithName(name string) (Named, error) + type NamedTagged interface + Tag func() string + func WithTag(name Named, tag string) (NamedTagged, error) + type Reference interface + String func() string + func Parse(s string) (Reference, error) + func ParseAnyReference(ref string) (Reference, error) + type Tagged interface + Tag func() string