image

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateNameWithPrefixSource

func UpdateNameWithPrefixSource(i *Image) (string, error)

UpdateNameWithPrefixSource updates the image name with the registry prefix if PrefixSource is enabled.

Types

type Image

type Image struct {
	Registry   string
	Repository string
	Tag        string
	Digest     string
	UseDigest  bool
	Patch      *bool
	// contains filtered or unexported fields
}

func RefToImage

func RefToImage(r string) (Image, error)

RefToImage parses the reference string and returns an Image.

func (Image) Elements

func (i Image) Elements() (string, string, string, error)

Elements returns the registry, repository, and name of the image.

func (Image) ImageName

func (i Image) ImageName() (string, error)

ImageName returns the full name of the image.

func (*Image) In

func (i *Image) In(s []Image) bool

In checks if the image is in a slice of images.

func (*Image) InP

func (i *Image) InP(s []*Image) bool

InP checks if the image is in a slice of pointers to images.

func (Image) IsEmpty

func (i Image) IsEmpty() bool

IsEmpty determines if an image is empty (i.e., registry, repository, and name are empty).

func (*Image) ReplaceRegistry

func (i *Image) ReplaceRegistry(new string) string

func (*Image) ResetParsedRef added in v0.2.1

func (i *Image) ResetParsedRef()

func (*Image) String

func (i *Image) String() string

func (Image) TagOrDigest

func (i Image) TagOrDigest() (string, error)

TagOrDigest returns a string representation of either the tag or digest.

Jump to

Keyboard shortcuts

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