Documentation ¶
Index ¶
- Variables
- func HashRouter(input <-chan FileHash, hashOutput, nilOutput chan<- FileHash, ...)
- func HashSink(input <-chan FileHash, wg *sync.WaitGroup)
- func OutputProtobufFile(input <-chan *FileHash, wg *sync.WaitGroup)
- func OutputTextFile(input <-chan *FileHash, wg *sync.WaitGroup)
- func SortByFifo(input <-chan *FileHash, output chan<- *FileHash, wg *sync.WaitGroup)
- func SortByPath(input <-chan *FileHash, output chan<- *FileHash, wg *sync.WaitGroup)
- func Sprintf(format string, item *FileHash) string
- type FileHash
- type Hasher
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedAlgorithms = map[string]algorithm{ "blake2b": blake2b.New512, "blake2b-256": blake2b.New256, "blake2b-384": blake2b.New384, "blake2b-512": blake2b.New512, "blake2s-128": blake2s.New128, "blake2s-256": blake2s.New256, "blake3": newBlake3Hash, "blake3-dk": newBlake3DerivedKey, "crc32": crc32.NewIEEE, "md5": md5.New, "sha1": sha1.New, "sha224": sha256.New224, "sha256": sha256.New, "sha256-simd": sha256simd.New, "sha384": sha512.New384, "sha512": sha512.New, "sha3-224": sha3.New224, "sha3-256": sha3.New256, "sha3-384": sha3.New384, "sha3-512": sha3.New512, "skein-256": algoSize{skein.NewMAC, 256 / 8}, "skein-512": algoSize{skein.NewMAC, 512 / 8}, }
SupportedAlgorithms maps algorithm names to implementations
Functions ¶
func HashRouter ¶
HashRouter splits an input FileHash channel into separate outputs based upon whether the item Hash is nil
func OutputProtobufFile ¶
OutputProtobufFile goroutine
func OutputTextFile ¶
OutputTextFile goroutine
func SortByFifo ¶
SortByFifo takes an input channel of FileHash and adds each item directly to the output in the order received
func SortByPath ¶
SortByPath takes an input channel of FileHash and lexicographically sorts by file path
Types ¶
type FileHash ¶
type FileHash struct { File *pathwalk.File Hash []byte AttrInfo struct { Hash []byte Time time.Time } FileInfo struct { Hash []byte Time time.Time } Type string }
FileHash type
Click to show internal directories.
Click to hide internal directories.