Documentation ¶
Index ¶
- Constants
- func AllPreProcessors() []preprocessor.PreProcessor
- func CalcDirectoryFingerprint(cfg *config.SourceConfig, processors []preprocessor.PreProcessor) (*model.Fingerprint, error)
- func CalcFileFingerprint(cfg *config.SourceConfig, processors []preprocessor.PreProcessor) (*model.Fingerprint, error)
- func CalcFingerprint(cfg *config.SourceConfig) (*model.Fingerprint, error)
- func Compare(a string, b string) uint8
- func Distance(a uint64, b uint64) uint8
- func DistanceHex(a string, b string) (uint8, error)
- func GetPreProcessors(languages string) []preprocessor.PreProcessor
- func PreprocessorMap() map[string]preprocessor.PreProcessor
Constants ¶
View Source
const ( LineSep = "\n" Algorithm = "simhash" AlgorithmVersion = "1.0" Vendor = "JD" )
Variables ¶
This section is empty.
Functions ¶
func AllPreProcessors ¶
func AllPreProcessors() []preprocessor.PreProcessor
func CalcDirectoryFingerprint ¶
func CalcDirectoryFingerprint(cfg *config.SourceConfig, processors []preprocessor.PreProcessor) (*model.Fingerprint, error)
CalcDirectoryFingerprint calculates the fingerprint of a directory
func CalcFileFingerprint ¶
func CalcFileFingerprint(cfg *config.SourceConfig, processors []preprocessor.PreProcessor) (*model.Fingerprint, error)
CalcFileFingerprint calculates the fingerprint of a file
func CalcFingerprint ¶
func CalcFingerprint(cfg *config.SourceConfig) (*model.Fingerprint, error)
CalcFingerprint calculates the fingerprint of a file or directory
func DistanceHex ¶
DistanceHex compares two fingerprints, returns the hamming distance
func GetPreProcessors ¶
func GetPreProcessors(languages string) []preprocessor.PreProcessor
func PreprocessorMap ¶
func PreprocessorMap() map[string]preprocessor.PreProcessor
PreprocessorMap return PreProcessors info.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.