MCPcopy Create free account
hub / github.com/bufbuild/buf / getFilesDigestForB5Digest

Function getFilesDigestForB5Digest

private/bufpkg/bufmodule/digest.go:373–384  ·  view source on GitHub ↗

The bucket should have already been filtered to just module files.

(
	ctx context.Context,
	bucketWithStorageMatcherApplied storage.ReadBucket,
)

Source from the content-addressed store, hash-verified

371
372// The bucket should have already been filtered to just module files.
373func getFilesDigestForB5Digest(
374 ctx context.Context,
375 bucketWithStorageMatcherApplied storage.ReadBucket,
376) (cas.Digest, error) {
377 return cas.BucketToDigest(
378 ctx,
379 // This is extreme defensive programming. We've gone out of our way to make sure
380 // that the bucket is already filtered, but it's just too important to mess up here.
381 storage.FilterReadBucket(bucketWithStorageMatcherApplied, getStorageMatcher(ctx, bucketWithStorageMatcherApplied)),
382 cas.DigestTypeShake256,
383 )
384}

Callers 1

Calls 3

BucketToDigestFunction · 0.92
FilterReadBucketFunction · 0.92
getStorageMatcherFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…