bundle

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImgpkgDir      = ".imgpkg"
	BundlesDir     = "bundles"
	ImagesLockFile = "images.yml"
)
View Source
const (
	LocationFilepath   = "image-locations.yml"
	ImageLocationsKind = "ImageLocations"
	LocationAPIVersion = "imgpkg.carvel.dev/v1alpha1"
)
View Source
const (
	BundleConfigLabel = "dev.carvel.imgpkg.bundle"
)

Variables

This section is empty.

Functions

func IsNotBundleError

func IsNotBundleError(err error) bool

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

func NewBundle

func NewBundle(ref string, imagesMetadata ImagesMetadata) *Bundle

func NewBundleFromPlainImage

func NewBundleFromPlainImage(plainImg *plainimg.PlainImage, imagesMetadata ImagesMetadata) *Bundle

func NewBundleWithReader added in v0.6.0

func NewBundleWithReader(ref string, imagesMetadata ImagesMetadata, imagesLockReader ImagesLockReader) *Bundle

func (*Bundle) AllImagesRefs added in v0.9.0

func (o *Bundle) AllImagesRefs(concurrency int, ui util.UIWithLevels) ([]*Bundle, ImageRefs, error)

AllImagesRefs returns a flat list of nested bundles and every image reference for a specific bundle

func (*Bundle) DigestRef

func (o *Bundle) DigestRef() string

func (*Bundle) IsBundle

func (o *Bundle) IsBundle() (bool, error)

func (*Bundle) NoteCopy added in v0.9.0

func (o *Bundle) NoteCopy(processedImages *imageset.ProcessedImages, reg ImagesMetadataWriter, ui util.UIWithLevels) error

NoteCopy writes an image-location representing the bundle / images that have been copied

func (*Bundle) Pull

func (o *Bundle) Pull(outputPath string, ui goui.UI, pullNestedBundles bool) error

func (*Bundle) Repo

func (o *Bundle) Repo() string

func (*Bundle) Tag

func (o *Bundle) Tag() string

type Contents

type Contents struct {
	// contains filtered or unexported fields
}

func NewContents

func NewContents(paths []string, excludedPaths []string) Contents

func (Contents) PresentsAsBundle

func (b Contents) PresentsAsBundle() (bool, error)

func (Contents) Push

func (b Contents) Push(uploadRef regname.Tag, registry ImagesMetadataWriter, ui ui.UI) (string, error)

type ImageLocation added in v0.9.0

type ImageLocation struct {
	Image    string `json:"image"`    // This generated yaml, but due to lib we need to use `json`
	IsBundle bool   `json:"isBundle"` // This generated yaml, but due to lib we need to use `json`
}

type ImageLocationsConfig added in v0.9.0

type ImageLocationsConfig struct {
	APIVersion string          `json:"apiVersion"` // This generated yaml, but due to lib we need to use `json`
	Kind       string          `json:"kind"`       // This generated yaml, but due to lib we need to use `json`
	Images     []ImageLocation `json:"images"`     // This generated yaml, but due to lib we need to use `json`
}

func NewLocationConfigFromBytes added in v0.9.0

func NewLocationConfigFromBytes(data []byte) (ImageLocationsConfig, error)

func NewLocationConfigFromPath added in v0.9.0

func NewLocationConfigFromPath(path string) (ImageLocationsConfig, error)

func (ImageLocationsConfig) AsBytes added in v0.9.0

func (c ImageLocationsConfig) AsBytes() ([]byte, error)

func (ImageLocationsConfig) Validate added in v0.9.0

func (c ImageLocationsConfig) Validate() error

func (ImageLocationsConfig) WriteToPath added in v0.9.0

func (c ImageLocationsConfig) WriteToPath(path string) error

type ImageRef added in v0.9.0

type ImageRef struct {
	lockconfig.ImageRef
	IsBundle *bool
}

func NewImageRef added in v0.9.0

func NewImageRef(imgRef lockconfig.ImageRef, isBundle bool) ImageRef

func (ImageRef) DeepCopy added in v0.9.0

func (i ImageRef) DeepCopy() ImageRef

type ImageRefLocationsConfig added in v0.13.0

type ImageRefLocationsConfig interface {
	Config() (ImageLocationsConfig, error)
}

type ImageRefs added in v0.9.0

type ImageRefs struct {
	// contains filtered or unexported fields
}

func NewImageRefs added in v0.12.0

func NewImageRefs() ImageRefs

func NewImageRefsFromImagesLock added in v0.13.0

func NewImageRefsFromImagesLock(imagesLock lockconfig.ImagesLock, imageRefsLocationConfig ImageRefLocationsConfig) (ImageRefs, error)

func (*ImageRefs) AddImagesRef added in v0.9.0

func (i *ImageRefs) AddImagesRef(refs ...ImageRef)

func (*ImageRefs) Find added in v0.9.0

func (i *ImageRefs) Find(ref string) (ImageRef, bool)

func (ImageRefs) ImageRefs added in v0.9.0

func (i ImageRefs) ImageRefs() []ImageRef

func (ImageRefs) ImagesLock added in v0.13.0

func (i ImageRefs) ImagesLock() lockconfig.ImagesLock

func (*ImageRefs) LocalizeToRepo added in v0.13.0

func (i *ImageRefs) LocalizeToRepo(relativeToRepo string)

func (*ImageRefs) MarkAsBundle added in v0.12.0

func (i *ImageRefs) MarkAsBundle(image string, isBundle bool)

func (*ImageRefs) UpdateRelativeToRepo added in v0.13.0

func (i *ImageRefs) UpdateRelativeToRepo(imgRetriever ImagesMetadata, relativeToRepo string) (bool, error)

type ImagesLockReader added in v0.6.0

type ImagesLockReader interface {
	Read(img regv1.Image) (lockconfig.ImagesLock, error)
}

type ImagesMetadata added in v0.15.0

type ImagesMetadata interface {
	Get(regname.Reference) (*regremote.Descriptor, error)
	Image(regname.Reference) (regv1.Image, error)
	Digest(regname.Reference) (regv1.Hash, error)
	FirstImageExists(digests []string) (string, error)
}

type ImagesMetadataWriter added in v0.6.0

type ImagesMetadataWriter interface {
	ImagesMetadata
	WriteImage(regname.Reference, regv1.Image) error
}

type InfoLog

type InfoLog struct {
	// contains filtered or unexported fields
}

func (InfoLog) Write

func (l InfoLog) Write(data []byte) (int, error)

type LocationImageReader added in v0.9.0

type LocationImageReader interface {
	Read(img regv1.Image) (ImageLocationsConfig, error)
}

type LocationsConfig added in v0.12.0

type LocationsConfig struct {
	// contains filtered or unexported fields
}

func (LocationsConfig) Config added in v0.12.0

type LocationsConfigs added in v0.12.0

type LocationsConfigs struct {
	// contains filtered or unexported fields
}

func NewLocations added in v0.9.0

func NewLocations(ui util.UIWithLevels) *LocationsConfigs

NewLocations constructor for creating a LocationsConfigs

func NewLocationsWithReader added in v0.9.0

func NewLocationsWithReader(reader LocationImageReader, ui util.UIWithLevels) *LocationsConfigs

NewLocationsWithReader constructor for LocationsConfigs

func (LocationsConfigs) Fetch added in v0.12.0

func (r LocationsConfigs) Fetch(registry ImagesMetadata, bundleRef name.Digest) (ImageLocationsConfig, error)

func (LocationsConfigs) Save added in v0.12.0

func (r LocationsConfigs) Save(reg ImagesMetadataWriter, bundleRef name.Digest, config ImageLocationsConfig, ui ui.UI) error

type LocationsNotFound added in v0.9.0

type LocationsNotFound struct {
	// contains filtered or unexported fields
}

func (LocationsNotFound) Error added in v0.9.0

func (n LocationsNotFound) Error() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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