Documentation
¶
Overview ¶
Package sourcebundle defines the source tree Airlock synchronizes with local workspaces. Hashing and archive creation use the same deterministic file set.
Index ¶
- Constants
- func Digest(root string) (string, error)
- func ExtractArchive(r io.Reader, dst string) error
- func ExtractArchiveState(r io.Reader, dst string) (string, error)
- func Included(root, rel string, isDir bool) (bool, error)
- func Mirror(src, dst string) error
- func WriteArchive(w io.Writer, root string) (string, error)
- type File
Constants ¶
const StatePrefix = "sha256:"
StatePrefix identifies source-state hashes on the wire and in agent.toml.
Variables ¶
This section is empty.
Functions ¶
func ExtractArchive ¶
ExtractArchive extracts a source archive into an empty or existing directory. Only regular files with safe relative paths are accepted.
func ExtractArchiveState ¶
ExtractArchiveState extracts a canonical source archive and returns the state represented by its paths, executable bits, sizes, and contents. Computing the state from archive metadata keeps verification portable to filesystems that cannot represent Unix executable bits, including Windows.
func Included ¶ added in v0.8.1
Included reports whether a root-relative path participates in the canonical source bundle. Callers must pass the path's directory status.