remote

package
v0.0.0-...-186f89b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEmptyLayerOnSave

func AddEmptyLayerOnSave() func(*imgutil.ImageOptions)

AddEmptyLayerOnSave adds an empty layer before saving if the image has no layers at all. This option is useful when exporting to registries that do not allow saving an image without layers, for example: gcr.io.

func FromBaseImage

func FromBaseImage(name string) func(*imgutil.ImageOptions)

func NewIndex

func NewIndex(repoName string, ops ...imgutil.IndexOption) (*imgutil.CNBIndex, error)

NewIndex returns a new ImageIndex from the registry that can be modified and saved to the local file system.

func NewV1Image

func NewV1Image(baseImageRepoName string, keychain authn.Keychain, ops ...func(*imgutil.ImageOptions)) (v1.Image, error)

NewV1Image returns a new v1.Image. It exists to provide library users (such as pack) an easy way to construct a v1.Image with configurable options (such as platform and insecure registry). FIXME: this function can be deprecated in favor of remote.NewImage as this now also implements the v1.Image interface

func WithConfig

func WithConfig(c *v1.Config) func(*imgutil.ImageOptions)

func WithCreatedAt

func WithCreatedAt(t time.Time) func(*imgutil.ImageOptions)

func WithDefaultPlatform

func WithDefaultPlatform(p imgutil.Platform) func(*imgutil.ImageOptions)

func WithHistory

func WithHistory() func(*imgutil.ImageOptions)

func WithMediaTypes

func WithMediaTypes(m imgutil.MediaTypes) func(*imgutil.ImageOptions)

func WithPreviousImage

func WithPreviousImage(name string) func(*imgutil.ImageOptions)

func WithRegistrySetting

func WithRegistrySetting(repository string, insecure bool) func(*imgutil.ImageOptions)

WithRegistrySetting registers options to use when accessing images in a registry in order to construct the image. The referenced images could include the base image, a previous image, or the image itself. The insecure parameter allows image references to be fetched without TLS.

Types

type DigestIdentifier

type DigestIdentifier struct {
	Digest name.Digest
}

func (DigestIdentifier) String

func (d DigestIdentifier) String() string

type Image

type Image struct {
	*imgutil.CNBImageCore
	// contains filtered or unexported fields
}

func NewImage

func NewImage(repoName string, keychain authn.Keychain, ops ...imgutil.ImageOption) (*Image, error)

NewImage returns a new image that can be modified and saved to an OCI image registry.

func (*Image) CheckReadAccess

func (i *Image) CheckReadAccess() (bool, error)

func (*Image) CheckReadWriteAccess

func (i *Image) CheckReadWriteAccess() (bool, error)

func (*Image) Delete

func (i *Image) Delete() error

func (*Image) Found

func (i *Image) Found() bool

func (*Image) Identifier

func (i *Image) Identifier() (imgutil.Identifier, error)

func (*Image) Kind

func (i *Image) Kind() string

func (*Image) Name

func (i *Image) Name() string

func (*Image) Rename

func (i *Image) Rename(name string)

func (*Image) Save

func (i *Image) Save(additionalNames ...string) error

func (*Image) SaveAs

func (i *Image) SaveAs(name string, additionalNames ...string) error

func (*Image) SaveFile

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

func (*Image) Valid

func (i *Image) Valid() bool

Valid returns true if the (saved) image is valid.

type ImageIndex

type ImageIndex struct {
	*imgutil.CNBIndex
}

Jump to

Keyboard shortcuts

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