Documentation
¶
Overview ¶
Package source freezes and verifies a declared source archive before extracting regular files and directories into a caller-owned private empty workspace. It never executes patches or publishes output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Preparer ¶
type Preparer struct{}
Preparer implements the fixed version 1 source preparation limits.
func (Preparer) Prepare ¶
func (Preparer) Prepare(ctx context.Context, req contracts.SourceRequest) (contracts.SourceResult, error)
Prepare hashes while copying to a private staged file, compares the declared hash, then extracts only those staged bytes. WorkspaceDir must be an existing empty private directory; StagingDir must be an existing private directory. On failure, created staging and workspace contents are removed. File modes in IntendedModes are final 0777 bits; extracted files retain temporary owner access.