filedigest

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentDigestCache

type ContentDigestCache struct {
	// contains filtered or unexported fields
}

ContentDigestCache memoizes per-file content digests for one run. It is safe for concurrent use. Callers own staleness: a run-scoped cache assumes worktree content is stable for the run — the same contract as the path-set memoization layered above it. Verification recomputes MUST pass a nil cache so they re-read disk.

func NewContentDigestCache

func NewContentDigestCache() *ContentDigestCache

type PathDigestInput

type PathDigestInput struct {
	RepoRoot       string
	Paths          []PathDigestPath
	ForbiddenRoots []string
	ContentCache   *ContentDigestCache
}

type PathDigestPath

type PathDigestPath struct {
	Path       string
	Optional   bool
	MarkerKind string
}

type PathDigestResult

type PathDigestResult struct {
	Digest string
}

func PathDigest

func PathDigest(ctx context.Context, input PathDigestInput) (PathDigestResult, error)

PathDigest returns a stable digest for repository-relative filesystem inputs. It reads the working tree as drydock renderers see it: untracked and ignored files under requested directories are included, while symlinks and special files are rejected so callers can fail closed.

Jump to

Keyboard shortcuts

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