MCPcopy
hub / github.com/perkeep/perkeep / PopulateParts

Method PopulateParts

pkg/schema/schema.go:735–737  ·  view source on GitHub ↗

PopulateParts sets the "parts" field of the blob with the provided parts. The sum of the sizes of parts must match the provided size or an error is returned. Also, each BytesPart may only contain either a BytesPart or a BlobRef, but not both.

(size int64, parts []BytesPart)

Source from the content-addressed store, hash-verified

733// or an error is returned. Also, each BytesPart may only contain either
734// a BytesPart or a BlobRef, but not both.
735func (bb *Builder) PopulateParts(size int64, parts []BytesPart) error {
736 return populateParts(bb.m, size, parts)
737}
738
739func populateParts(m map[string]interface{}, size int64, parts []BytesPart) error {
740 sumSize := int64(0)

Callers 8

fileMapFromDuplicateMethod · 0.80
searchDescribeSetupFunction · 0.80
TestPackerBoundarySplitsFunction · 0.80
UploadFileMethod · 0.80
uploadBytesFunction · 0.80
WriteFileChunksFunction · 0.80
filePartFunction · 0.80
fileMapFromDuplicateMethod · 0.80

Calls 1

populatePartsFunction · 0.85

Tested by 3

searchDescribeSetupFunction · 0.64
TestPackerBoundarySplitsFunction · 0.64
filePartFunction · 0.64