Documentation
¶
Index ¶
- func MandatoryLayoutsForModule(modulePkgDir string) map[string]string
- func MandatoryLayoutsForPackage(packagePkgDir string) map[string]string
- func MandatoryLayoutsForPlatform(platformPkgDir string) map[string]string
- func MandatoryLayoutsForSecurityDatabase(securityDBPkgDir string) map[string]string
- func Pack(ctx context.Context, sourcePath string, sink io.Writer) error
- func PackSourcesWithPrefix(ctx context.Context, sink io.Writer, sources ...PackSource) error
- func PackWithPrefix(ctx context.Context, sourcePath string, prefix string, sink io.Writer) error
- func Unpack(ctx context.Context, source io.Reader, targetPath string, pkgName string) error
- func ValidateUnpackedPackage(mandatoryLayouts map[string]string) error
- type PackSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MandatoryLayoutsForModule ¶ added in v0.10.0
func MandatoryLayoutsForPackage ¶ added in v0.30.18
func MandatoryLayoutsForPlatform ¶ added in v0.10.0
func MandatoryLayoutsForSecurityDatabase ¶ added in v0.10.0
func PackSourcesWithPrefix ¶ added in v0.30.18
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
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 ValidateUnpackedPackage ¶ added in v0.10.0
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.
Click to show internal directories.
Click to hide internal directories.