archive

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package archive contains the SDK for Zarf archival and compression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(_ context.Context, sources []string, dest string, _ CompressOpts) error

Compress takes any number of source files and archives them into a tarball at dest path. TODO(mkcp): Migrate to mholt/archives, see CVE-2024-0406

func Decompress

func Decompress(ctx context.Context, sourceArchive, dst string, opts DecompressOpts) error

Decompress takes Zarf package or arbitrary archive and decompresses it to the path at dest with options.

Types

type CompressOpts

type CompressOpts struct{}

CompressOpts is a placeholder for future optional Compress params

type DecompressOpts

type DecompressOpts struct {
	// UnarchiveAll, when enabled, walks the sourceArchive and unarchives everything at the root of the archive.
	// NOTE(mkcp): This is equivalent to a recursive walk with depth 1.
	UnarchiveAll bool
}

DecompressOpts provides optional parameters for Decompress

Jump to

Keyboard shortcuts

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