Documentation
¶
Index ¶
- func DefaultOCIArtifact(compatibilityVersion int, opts *ImageCommitOpts) bool
- func DefaultOCITypes(compatibilityVersion int, src *exporter.Source) bool
- func New(opt Opt) (exporter.Exporter, error)
- func NewDescriptorReference(desc ocispecs.Descriptor, release func(context.Context) error) exporter.DescriptorReference
- func RemoveInternalLayerAnnotations(in map[string]string, oci bool) map[string]string
- type Annotations
- type AnnotationsGroup
- type ImageCommitOpts
- func (c *ImageCommitOpts) Load(ctx context.Context, opt map[string]string) (map[string]string, error)
- func (c *ImageCommitOpts) OCIArtifactEnabled() bool
- func (c *ImageCommitOpts) OCITypesEnabled() bool
- func (c *ImageCommitOpts) SetOCIArtifactDefault(v bool)
- func (c *ImageCommitOpts) SetOCITypesDefault(v bool)
- func (c *ImageCommitOpts) Validate() error
- type ImageWriter
- func (ic *ImageWriter) Applier() diff.Applier
- func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, ...) (*ocispecs.Descriptor, *result.Result[*solver.Remote], error)
- func (ic *ImageWriter) ContentStore() content.Store
- func (ic *ImageWriter) Snapshotter() snapshot.Snapshotter
- type Opt
- type WriterOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultOCIArtifact ¶ added in v0.32.0
func DefaultOCIArtifact(compatibilityVersion int, opts *ImageCommitOpts) bool
DefaultOCIArtifact returns the default attestation manifest format.
func DefaultOCITypes ¶ added in v0.31.0
DefaultOCITypes returns the default media type behavior for image exports.
func New ¶
New returns a new containerimage exporter instance that supports exporting to an image store and pushing the image to registry. This exporter supports following values in returned kv map: - containerimage.digest - The digest of the root manifest for the image.
func NewDescriptorReference ¶ added in v0.11.0
func NewDescriptorReference(desc ocispecs.Descriptor, release func(context.Context) error) exporter.DescriptorReference
Types ¶
type Annotations ¶ added in v0.11.0
type AnnotationsGroup ¶ added in v0.11.0
type AnnotationsGroup map[string]*Annotations
AnnotationsGroup is a map of annotations keyed by the reference key
func ParseAnnotations ¶ added in v0.11.0
func (AnnotationsGroup) Merge ¶ added in v0.11.0
func (ag AnnotationsGroup) Merge(other AnnotationsGroup) AnnotationsGroup
func (AnnotationsGroup) Platform ¶ added in v0.11.0
func (ag AnnotationsGroup) Platform(p *ocispecs.Platform) *Annotations
type ImageCommitOpts ¶ added in v0.11.0
type ImageCommitOpts struct {
ImageName string
RefCfg cacheconfig.RefConfig
OCITypes *bool
OCIArtifact *bool
Annotations AnnotationsGroup
Epoch *epoch.Epoch
ForceInlineAttestations bool // force inline attestations to be attached
RewriteTimestamp bool // rewrite timestamps in layers to match the epoch
}
func (*ImageCommitOpts) OCIArtifactEnabled ¶ added in v0.32.0
func (c *ImageCommitOpts) OCIArtifactEnabled() bool
func (*ImageCommitOpts) OCITypesEnabled ¶ added in v0.31.0
func (c *ImageCommitOpts) OCITypesEnabled() bool
func (*ImageCommitOpts) SetOCIArtifactDefault ¶ added in v0.32.0
func (c *ImageCommitOpts) SetOCIArtifactDefault(v bool)
func (*ImageCommitOpts) SetOCITypesDefault ¶ added in v0.31.0
func (c *ImageCommitOpts) SetOCITypesDefault(v bool)
func (*ImageCommitOpts) Validate ¶ added in v0.31.0
func (c *ImageCommitOpts) Validate() error
type ImageWriter ¶
type ImageWriter struct {
// contains filtered or unexported fields
}
func NewImageWriter ¶
func NewImageWriter(opt WriterOpt) (*ImageWriter, error)
func (*ImageWriter) Applier ¶ added in v0.5.0
func (ic *ImageWriter) Applier() diff.Applier
func (*ImageWriter) Commit ¶
func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, inlineCache exptypes.InlineCache, opts *ImageCommitOpts, compatibilityVersion int, exporterType string) (*ocispecs.Descriptor, *result.Result[*solver.Remote], error)
Commit commits the image to the content store and returns the descriptor of the manifest (or the manifest list) and the remotes that were committed for each platform. The returned remotes contain the rewritten layers when opts.RewriteTimestamp is set.
func (*ImageWriter) ContentStore ¶
func (ic *ImageWriter) ContentStore() content.Store
func (*ImageWriter) Snapshotter ¶ added in v0.5.0
func (ic *ImageWriter) Snapshotter() snapshot.Snapshotter