internal

package
v0.0.0-...-197ed72 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//Results is a thread safe list containing results of the scanner action.
	Results resultList
)

Functions

func GenerateTable

func GenerateTable(data [][]string) *tablewriter.Table

GenerateTable generates a table with given data

func InitLog

func InitLog(cmd *cobra.Command, debug bool, develop bool, verbose bool)

InitLog initializes the log interface with the correct logging level.

func ResultTo2DSlice

func ResultTo2DSlice(res *resultList) [][]string

ResultTo2DSlice converts a resultList to a 2d slice to be used in table generation.

func StartJobs

func StartJobs(expected *Expected, maxProcs int, rootDir string)

StartJobs starts the consumers and producer.

Types

type Expected

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

Expected struct containing values to be expected.

func NewExpected

func NewExpected(name []string, regex []string, size int64, digest string, function string) *Expected

NewExpected creates a new struct of type Expected

type File

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

File struct used to store file information.

type Result

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

Result object contains results of match checks.

func MatchFile

func MatchFile(file os.FileInfo, path string, exp *Expected) *Result

MatchFile attempts to match a file according to the values given in program args.

func (*Result) ValidateResult

func (res *Result) ValidateResult(exp *Expected) bool

ValidateResult compares expected values to the result values. todo: needs to check if more than one has to be valid.

Jump to

Keyboard shortcuts

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