Documentation ¶
Index ¶
- func AddEmptyLayerOnSave() func(*imgutil.ImageOptions)
- func FromBaseImage(name string) func(*imgutil.ImageOptions)
- func NewIndex(repoName string, ops ...imgutil.IndexOption) (*imgutil.CNBIndex, error)
- func NewV1Image(baseImageRepoName string, keychain authn.Keychain, ...) (v1.Image, error)
- func WithConfig(c *v1.Config) func(*imgutil.ImageOptions)
- func WithCreatedAt(t time.Time) func(*imgutil.ImageOptions)
- func WithDefaultPlatform(p imgutil.Platform) func(*imgutil.ImageOptions)
- func WithHistory() func(*imgutil.ImageOptions)
- func WithMediaTypes(m imgutil.MediaTypes) func(*imgutil.ImageOptions)
- func WithPreviousImage(name string) func(*imgutil.ImageOptions)
- func WithRegistrySetting(repository string, insecure bool) func(*imgutil.ImageOptions)
- type DigestIdentifier
- type Image
- func (i *Image) CheckReadAccess() (bool, error)
- func (i *Image) CheckReadWriteAccess() (bool, error)
- func (i *Image) Delete() error
- func (i *Image) Found() bool
- func (i *Image) Identifier() (imgutil.Identifier, error)
- func (i *Image) Kind() string
- func (i *Image) Name() string
- func (i *Image) Rename(name string)
- func (i *Image) Save(additionalNames ...string) error
- func (i *Image) SaveAs(name string, additionalNames ...string) error
- func (i *Image) SaveFile() (string, error)
- func (i *Image) Valid() bool
- type ImageIndex
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 ¶
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 ¶
func (DigestIdentifier) String ¶
func (d DigestIdentifier) String() string
type Image ¶
type Image struct { *imgutil.CNBImageCore // contains filtered or unexported fields }
func NewImage ¶
NewImage returns a new image that can be modified and saved to an OCI image registry.
func (*Image) CheckReadAccess ¶
func (*Image) CheckReadWriteAccess ¶
func (*Image) Identifier ¶
func (i *Image) Identifier() (imgutil.Identifier, error)