Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultMetadataRestorer ¶
type DefaultMetadataRestorer struct { LayersDir string SkipLayers bool Logger log.Logger PlatformAPI *api.Version }
func NewDefaultMetadataRestorer ¶ added in v0.14.1
func NewDefaultMetadataRestorer(layersDir string, skipLayers bool, logger log.Logger, platformAPI *api.Version) *DefaultMetadataRestorer
NewDefaultMetadataRestorer returns an instance of the DefaultMetadataRestorer struct
func (*DefaultMetadataRestorer) Restore ¶
func (r *DefaultMetadataRestorer) Restore(buildpacks []buildpack.GroupElement, appMeta files.LayersMetadata, cacheMeta platform.CacheMetadata, layerSHAStore SHAStore) error
type DefaultSBOMRestorer ¶
func (*DefaultSBOMRestorer) RestoreFromCache ¶
func (r *DefaultSBOMRestorer) RestoreFromCache(cache Cache, layerDigest string) error
func (*DefaultSBOMRestorer) RestoreFromPrevious ¶
func (r *DefaultSBOMRestorer) RestoreFromPrevious(image imgutil.Image, layerDigest string) error
func (*DefaultSBOMRestorer) RestoreToBuildpackLayers ¶
func (r *DefaultSBOMRestorer) RestoreToBuildpackLayers(detectedBps []buildpack.GroupElement) error
type MetadataRestorer ¶
type MetadataRestorer interface {
Restore(buildpacks []buildpack.GroupElement, appMeta files.LayersMetadata, cacheMeta platform.CacheMetadata, layerSHAStore SHAStore) error
}
MetadataRestorer given a group of buildpacks and metadata from the previous image and cache, will create `<layers>/<buildpack-id>/<layer>.toml` files containing `metadata` that the buildpack previously wrote. Note that layer `types` information is not persisted, as the buildpack must opt in to layer re-use by editing the provided `<layer>.toml` to configure the desired layer type.
type NopMetadataRestorer ¶ added in v0.14.1
type NopMetadataRestorer struct{}
func (*NopMetadataRestorer) Restore ¶ added in v0.14.1
func (r *NopMetadataRestorer) Restore(_ []buildpack.GroupElement, _ files.LayersMetadata, _ platform.CacheMetadata, _ SHAStore) error
type NopSBOMRestorer ¶ added in v0.14.0
type NopSBOMRestorer struct{}
func (*NopSBOMRestorer) RestoreFromCache ¶ added in v0.14.0
func (r *NopSBOMRestorer) RestoreFromCache(_ Cache, _ string) error
func (*NopSBOMRestorer) RestoreFromPrevious ¶ added in v0.14.0
func (r *NopSBOMRestorer) RestoreFromPrevious(_ imgutil.Image, _ string) error
func (*NopSBOMRestorer) RestoreToBuildpackLayers ¶ added in v0.14.0
func (r *NopSBOMRestorer) RestoreToBuildpackLayers(_ []buildpack.GroupElement) error
type SBOMRestorer ¶
type SBOMRestorer interface { RestoreFromPrevious(image imgutil.Image, layerDigest string) error RestoreFromCache(cache Cache, layerDigest string) error RestoreToBuildpackLayers(detectedBps []buildpack.GroupElement) error }
SBOMRestorer handles the restoration of SBOM layer data. Given a previous image or cache, it will extract the SBOM layer to the local filesystem. Given a group of buildpacks and a `<layers>/sbom/<cache|launch>` directory, it will copy the relevant SBOM files to `<layers>/<buildpack-id>/ so that they can be used in the current build.
func NewSBOMRestorer ¶
func NewSBOMRestorer(opts SBOMRestorerOpts, platformAPI *api.Version) SBOMRestorer