entity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputModeCsvFile  = "csv"
	OutputModeTextFile = "text"
	OutputModeStdOut   = "print"
)

Different output modes

Variables

View Source
var OutputModes = map[string]string{
	OutputModeTextFile: "creates a text file in current directory with basic information",
	OutputModeCsvFile:  "creates a csv file in current directory with detailed information",
	OutputModeStdOut:   "just prints the report without creating any file",
}

OutputModes and their brief descriptions

Functions

This section is empty.

Types

type DigestToFiles

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

DigestToFiles is a multi-map with FileDigest keys and string values. Writes to this is goroutine-safe.

func NewDigestToFiles

func NewDigestToFiles(size int) (m *DigestToFiles)

NewDigestToFiles creates new DigestToFiles

func (*DigestToFiles) Map

func (m *DigestToFiles) Map() map[FileDigest][]string

Map returns internal map to iterate over

func (*DigestToFiles) Remove

func (m *DigestToFiles) Remove(fd FileDigest)

Remove removes entry in the map

func (*DigestToFiles) Set

func (m *DigestToFiles) Set(key FileDigest, value string)

Set sets a value for the key

func (*DigestToFiles) Size

func (m *DigestToFiles) Size() int

Size returns size of map

type FileDigest

type FileDigest struct {
	FileExtension string
	FileSize      int64
	FileFuzzyHash string
}

FileDigest contains properties of a file that makes the file unique to a very high degree of confidence

func (FileDigest) String

func (f FileDigest) String() string

type FileExtAndSize

type FileExtAndSize struct {
	FileExtension string
	FileSize      int64
}

FileExtAndSize is a struct of file extension and file size

func (FileExtAndSize) String

func (f FileExtAndSize) String() string

type FileExtAndSizeToFiles

type FileExtAndSizeToFiles map[FileExtAndSize][]string

FileExtAndSizeToFiles is a multi-map of FileExtAndSize key and string values

type FileMeta

type FileMeta struct {
	Size              int64
	ModifiedTimestamp int64
}

FileMeta is a combination of file size and its modification timestamp

func (FileMeta) String

func (f FileMeta) String() string

type FilePathToMeta

type FilePathToMeta map[string]FileMeta

FilePathToMeta is a map of file path to its FileMeta

Jump to

Keyboard shortcuts

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