Documentation ¶
Overview ¶
Package indexbuilder provides a few shortbuts to building a checksum index by generating and then loading the checksums, and building an index from that. It's potentially a sign that the responsibilities here need refactoring.
Index ¶
- func BuildChecksumIndex(check *filechecksum.FileChecksumGenerator, r io.Reader) (fcheck []byte, i *index.ChecksumIndex, lookup filechecksum.ChecksumLookup, ...)
- func BuildIndexFromString(generator *filechecksum.FileChecksumGenerator, reference string) (fileCheckSum []byte, referenceIndex *index.ChecksumIndex, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildChecksumIndex ¶
func BuildChecksumIndex(check *filechecksum.FileChecksumGenerator, r io.Reader) ( fcheck []byte, i *index.ChecksumIndex, lookup filechecksum.ChecksumLookup, err error, )
Generates an index from a reader This is mostly a utility function to avoid being overly verbose in tests that need an index to work, but don't want to construct one by hand in order to avoid the dependencies obviously this means that those tests are likely to fail if there are issues with any of the other modules, which is not ideal. TODO: move to util?
func BuildIndexFromString ¶
func BuildIndexFromString(generator *filechecksum.FileChecksumGenerator, reference string) ( fileCheckSum []byte, referenceIndex *index.ChecksumIndex, lookup filechecksum.ChecksumLookup, err error, )
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.