fingerprint

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HASH_SIZE = 16
View Source
const (
	OutputFileNameFingerprints = "debricked.fingerprints.txt"
)

Variables

View Source
var EXCLUDED_DIRS = []string{
	".idea",
}
View Source
var EXCLUDED_EXT = []string{}/* 142 elements not displayed */
View Source
var EXCLUDED_FILES = []string{
	"gradlew", "gradlew.bat", "mvnw", "mvnw.cmd", "gradle-wrapper.jar", "maven-wrapper.jar",
	"thumbs.db", "babel.config.js", "license.txt", "license.md", "copying.lib", "makefile",
	"[content_types].xml", "py.typed", "LICENSE.APACHE2", "LICENSE.MIT",
}
View Source
var EXCLUDED_FILE_ENDINGS = []string{
	"-doc", "changelog", "config", "copying", "license", "authors", "news", "licenses", "notice",
	"readme", "swiftdoc", "texidoc", "todo", "version", "ignore", "manifest", "sqlite", "sqlite3",
	"nycrc", "targ", "eslintrc", "prettierrc",
}
View Source
var INCLUDED_FILES = []string{
	"package.json",
}
View Source
var TAR_BZIP2_FILE_ENDINGS = []string{".tar.bz2"}
View Source
var TAR_GZIP_FILE_ENDINGS = []string{".tgz", ".tar.gz"}
View Source
var ZIP_FILE_ENDINGS = []string{".jar", ".nupkg", ".war", ".zip", ".ear"}

Functions

This section is empty.

Types

type FileFingerprint

type FileFingerprint struct {
	// contains filtered or unexported fields
}

func (FileFingerprint) ToString

func (f FileFingerprint) ToString() string

type Fingerprinter

type Fingerprinter struct {
	// contains filtered or unexported fields
}

func NewFingerprinter

func NewFingerprinter() *Fingerprinter

func (*Fingerprinter) FingerprintFiles

func (f *Fingerprinter) FingerprintFiles(
	rootPath string, exclusions []string, fingerprintCompressedContent bool, minFingerprintContentLength int,
) (Fingerprints, error)

type Fingerprints

type Fingerprints struct {
	Entries []FileFingerprint `json:"fingerprints"`
}

func (*Fingerprints) Len

func (f *Fingerprints) Len() int

func (*Fingerprints) ToFile

func (f *Fingerprints) ToFile(outputFile string) error

type IFingerprint

type IFingerprint interface {
	FingerprintFiles(
		rootPath string, exclusions []string, fingerprintCompressedContent bool, minFingerprintContentLength int,
	) (Fingerprints, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL