imageutils

package
v0.0.0-...-d9c1391 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoIdentifier = errors.Errorf("could not parse a valid tag or digest from image reference")

Functions

func IsDigest

func IsDigest(d string) bool

func Join

func Join(registry, repository, identifier string) string

func NormalizeRegistryUrl

func NormalizeRegistryUrl(regUrl string) (bool, string)

func NormalizeRepositoryName

func NormalizeRepositoryName(repository string) string

Types

type Digest

type Digest string

func (Digest) IsDigest

func (Digest) IsDigest() bool

func (Digest) IsTag

func (Digest) IsTag() bool

func (Digest) Name

func (d Digest) Name() string

func (Digest) String

func (d Digest) String() string

type Identifier

type Identifier interface {
	fmt.Stringer
	Name() string
	IsTag() bool
	IsDigest() bool
}

type ImageRef

type ImageRef struct {
	Registry   string
	Repository string
	Identifier Identifier
}

func ParseReference

func ParseReference(ref string) (*ImageRef, error)

type Tag

type Tag string

func (Tag) IsDigest

func (Tag) IsDigest() bool

func (Tag) IsTag

func (Tag) IsTag() bool

func (Tag) Name

func (t Tag) Name() string

func (Tag) String

func (t Tag) String() string

Jump to

Keyboard shortcuts

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