engine

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: AGPL-3.0 Imports: 657 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDetectors

func DefaultDetectors() []detectors.Detector

func SetLineNumber

func SetLineNumber(chunk *sources.Chunk, result *detectors.Result)

SetLineNumber sets the line number for a provided source chunk with a given detector result.

Types

type Engine

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

func Start

func Start(ctx context.Context, options ...EngineOption) *Engine

func (*Engine) ChunksChan

func (e *Engine) ChunksChan() chan *sources.Chunk

func (*Engine) ChunksScanned

func (e *Engine) ChunksScanned() uint64

func (*Engine) DetectorAvgTime

func (e *Engine) DetectorAvgTime() map[string][]time.Duration

func (*Engine) ResultsChan

func (e *Engine) ResultsChan() chan detectors.ResultWithMetadata

func (*Engine) ScanFileSystem

func (e *Engine) ScanFileSystem(ctx context.Context, directories []string) error

func (*Engine) ScanGit

func (e *Engine) ScanGit(ctx context.Context, repoPath, headRef, baseRef string, maxDepth int, filter *common.Filter) error

func (*Engine) ScanGitHub

func (e *Engine) ScanGitHub(ctx context.Context, endpoint string, repos, orgs []string, token string, includeForks bool, filter *common.Filter, concurrency int, includeMembers bool) error

func (*Engine) ScanGitLab

func (e *Engine) ScanGitLab(ctx context.Context, endpoint, token string, repositories []string) error

func (*Engine) ScanS3

func (e *Engine) ScanS3(ctx context.Context, key, secret string, cloudCred bool, buckets []string) error

type EngineOption

type EngineOption func(*Engine)

func WithConcurrency

func WithConcurrency(concurrency int) EngineOption

func WithDecoders

func WithDecoders(decoders ...decoders.Decoder) EngineOption

func WithDetectors

func WithDetectors(verify bool, d ...detectors.Detector) EngineOption

Jump to

Keyboard shortcuts

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