bundle

package
v0.30.20 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MandatoryLayoutsForModule added in v0.10.0

func MandatoryLayoutsForModule(modulePkgDir string) map[string]string

func MandatoryLayoutsForPackage added in v0.30.18

func MandatoryLayoutsForPackage(packagePkgDir string) map[string]string

func MandatoryLayoutsForPlatform added in v0.10.0

func MandatoryLayoutsForPlatform(platformPkgDir string) map[string]string

func MandatoryLayoutsForSecurityDatabase added in v0.10.0

func MandatoryLayoutsForSecurityDatabase(securityDBPkgDir string) map[string]string

func Pack

func Pack(ctx context.Context, sourcePath string, sink io.Writer) error

func PackSourcesWithPrefix added in v0.30.18

func PackSourcesWithPrefix(ctx context.Context, sink io.Writer, sources ...PackSource) error

PackSourcesWithPrefix packs several (dir, prefix) sources into a single tar stream written to sink. It is the multi-source counterpart of PackWithPrefix and is used to aggregate layouts from many packages into one archive (e.g. package-versions.tar).

func PackWithPrefix added in v0.26.4

func PackWithPrefix(ctx context.Context, sourcePath string, prefix string, sink io.Writer) error

PackWithPrefix packs directory contents into tar with an optional prefix for all paths. For example, PackWithPrefix(ctx, "/tmp/module", "modules/stronghold", sink) will create tar entries like "modules/stronghold/index.json" instead of just "index.json".

func Unpack

func Unpack(ctx context.Context, source io.Reader, targetPath string, pkgName string) error

func ValidateUnpackedPackage added in v0.10.0

func ValidateUnpackedPackage(mandatoryLayouts map[string]string) error

Types

type PackSource added in v0.30.18

type PackSource struct {
	// Dir is the source directory on disk whose contents are packed.
	Dir string
	// Prefix is prepended to every entry's path inside the tar.
	Prefix string
	// ExcludeDirs lists directories (by path) to skip together with their
	// descendants. It is used to keep a nested OCI layout (e.g. a package's
	// version/ sub-layout) out of an archive that is produced separately.
	ExcludeDirs []string
}

PackSource describes one directory to be packed into a tar stream.

Jump to

Keyboard shortcuts

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