kubernetes/vendor/github.com/distribution/reference/reference.go

const RepositoryNameTotalLengthMax

const NameTotalLengthMax

var ErrReferenceInvalidFormat

var ErrTagInvalidFormat

var ErrDigestInvalidFormat

var ErrNameContainsUppercase

var ErrNameEmpty

var ErrNameTooLong

var ErrNameNotCanonical

type Reference

type Field

// AsField wraps a reference in a Field for encoding.
func AsField(reference Reference) Field {}

// Reference unwraps the reference type from the field to
// return the Reference object. This object should be
// of the appropriate type to further check for different
// reference types.
func (f Field) Reference() Reference {}

// MarshalText serializes the field to byte text which
// is the string of the reference.
func (f Field) MarshalText() (p []byte, err error) {}

// UnmarshalText parses text bytes by invoking the
// reference parser to ensure the appropriately
// typed reference object is wrapped by field.
func (f *Field) UnmarshalText(p []byte) error {}

type Named

type Tagged

type NamedTagged

type Digested

type Canonical

type namedRepository

// Domain returns the domain part of the [Named] reference.
func Domain(named Named) string {}

// Path returns the name without the domain part of the [Named] reference.
func Path(named Named) (name string) {}

// splitDomain splits a named reference into a hostname and path string.
// If no valid hostname is found, the hostname is empty and the full value
// is returned as name
func splitDomain(name string) (string, string) {}

// Parse parses s and returns a syntactically valid Reference.
// If an error was encountered it is returned, along with a nil Reference.
func Parse(s string) (Reference, error) {}

// ParseNamed 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.
func ParseNamed(s string) (Named, error) {}

// WithName returns a named object representing the given string. If the input
// is invalid ErrReferenceInvalidFormat will be returned.
func WithName(name string) (Named, error) {}

// WithTag combines the name from "name" and the tag from "tag" to form a
// reference incorporating both the name and the tag.
func WithTag(name Named, tag string) (NamedTagged, error) {}

// WithDigest combines the name from "name" and the digest from "digest" to form
// a reference incorporating both the name and the digest.
func WithDigest(name Named, digest digest.Digest) (Canonical, error) {}

// TrimNamed removes any tag or digest from the named reference.
func TrimNamed(ref Named) Named {}

func getBestReferenceType(ref reference) Reference {}

type reference

func (r reference) String() string {}

func (r reference) Tag() string {}

func (r reference) Digest() digest.Digest {}

type repository

func (r repository) String() string {}

func (r repository) Name() string {}

func (r repository) Domain() string {}

func (r repository) Path() string {}

type digestReference

func (d digestReference) String() string {}

func (d digestReference) Digest() digest.Digest {}

type taggedReference

func (t taggedReference) String() string {}

func (t taggedReference) Tag() string {}

type canonicalReference

func (c canonicalReference) String() string {}

func (c canonicalReference) Digest() digest.Digest {}