Documentation ¶
Overview ¶
Package layout contains functions for interacting with Zarf's package layout on disk.
Package layout contains functions for interacting with Zarf's package layout on disk.
Package layout contains functions for interacting with Zarf's package layout on disk.
Package layout contains functions for interacting with Zarf's package layout on disk.
Package layout contains functions for interacting with Zarf's package layout on disk.
Index ¶
- Constants
- Variables
- func IsNotLoaded(err error) bool
- type ComponentPaths
- type ComponentSBOM
- type Components
- type Images
- type InjectionMadnessPaths
- type PackagePaths
- func (pp *PackagePaths) AddImages() *PackagePaths
- func (pp *PackagePaths) AddSBOMs() *PackagePaths
- func (pp *PackagePaths) AddSignature(keyPath string) *PackagePaths
- func (pp *PackagePaths) Files() map[string]string
- func (pp *PackagePaths) IsLegacyLayout() bool
- func (pp *PackagePaths) MigrateLegacy() (err error)
- func (pp *PackagePaths) SetFromLayers(layers []ocispec.Descriptor)
- func (pp *PackagePaths) SetFromPaths(paths []string)
- type SBOMs
Constants ¶
const ( TempDir = "temp" FilesDir = "files" ChartsDir = "charts" ReposDir = "repos" ManifestsDir = "manifests" DataInjectionsDir = "data" ValuesDir = "values" ZarfYAML = "zarf.yaml" Signature = "zarf.yaml.sig" Checksums = "checksums.txt" ImagesDir = "images" ComponentsDir = "components" SBOMDir = "zarf-sbom" SBOMTar = "sboms.tar" IndexJSON = "index.json" OCILayout = "oci-layout" SeedImagesDir = "seed-images" InjectorBinary = "zarf-injector" InjectorPayloadTarGz = "payload.tgz" )
Constants used in the default package layout.
Variables ¶
var ErrNotLoaded = fmt.Errorf("not loaded")
ErrNotLoaded is returned when a path is not loaded.
Functions ¶
Types ¶
type ComponentPaths ¶
type ComponentPaths struct { Base string Temp string Files string Charts string Values string Repos string Manifests string DataInjections string }
ComponentPaths contains paths for a component.
type ComponentSBOM ¶
type ComponentSBOM struct { Files []string Component *ComponentPaths }
ComponentSBOM contains paths for a component's SBOM.
type Components ¶
type Components struct { Base string Dirs map[string]*ComponentPaths Tarballs map[string]string }
Components contains paths for components.
func (*Components) Archive ¶
func (c *Components) Archive(component types.ZarfComponent, cleanupTemp bool) (err error)
Archive archives a component.
func (*Components) Create ¶
func (c *Components) Create(component types.ZarfComponent) (cp *ComponentPaths, err error)
Create creates a new component directory structure.
func (*Components) Unarchive ¶
func (c *Components) Unarchive(component types.ZarfComponent) (err error)
Unarchive unarchives a component.
type Images ¶
Images contains paths for images.
type InjectionMadnessPaths ¶
type InjectionMadnessPaths struct { InjectionBinary string SeedImagesDir string InjectorPayloadTarGz string }
InjectionMadnessPaths contains paths for injection madness.
type PackagePaths ¶
type PackagePaths struct { Base string ZarfYAML string Checksums string Signature string Components Components SBOMs SBOMs Images Images // contains filtered or unexported fields }
PackagePaths is the default package layout.
func (*PackagePaths) AddImages ¶
func (pp *PackagePaths) AddImages() *PackagePaths
AddImages sets the default image paths.
func (*PackagePaths) AddSBOMs ¶
func (pp *PackagePaths) AddSBOMs() *PackagePaths
AddSBOMs sets the default sbom paths.
func (*PackagePaths) AddSignature ¶
func (pp *PackagePaths) AddSignature(keyPath string) *PackagePaths
AddSignature sets the signature path if the keyPath is not empty.
func (*PackagePaths) Files ¶
func (pp *PackagePaths) Files() map[string]string
Files returns a map of all the files in the package.
func (*PackagePaths) IsLegacyLayout ¶
func (pp *PackagePaths) IsLegacyLayout() bool
IsLegacyLayout returns true if the package is using the legacy layout.
func (*PackagePaths) MigrateLegacy ¶
func (pp *PackagePaths) MigrateLegacy() (err error)
MigrateLegacy migrates a legacy package layout to the new layout.
func (*PackagePaths) SetFromLayers ¶
func (pp *PackagePaths) SetFromLayers(layers []ocispec.Descriptor)
SetFromLayers maps layers to package paths.
func (*PackagePaths) SetFromPaths ¶
func (pp *PackagePaths) SetFromPaths(paths []string)
SetFromPaths maps paths to package paths.