scan

package
v3.2.12 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScanContext

type ScanContext struct {

	// exported / configurable fields
	Input *contextargs.Context

	// callbacks or hooks
	OnError   func(error)
	OnResult  func(e *output.InternalWrappedEvent)
	OnWarning func(string)
	// contains filtered or unexported fields
}

func NewScanContext

func NewScanContext(ctx context.Context, input *contextargs.Context) *ScanContext

NewScanContext creates a new scan context using input

func (*ScanContext) Context

func (s *ScanContext) Context() context.Context

Context returns the context of the scan

func (*ScanContext) GenerateResult

func (s *ScanContext) GenerateResult() []*output.ResultEvent

GenerateResult returns final results slice from all events

func (*ScanContext) LogError

func (s *ScanContext) LogError(err error)

LogError logs error to all events and triggeres any callbacks

func (*ScanContext) LogEvent

func (s *ScanContext) LogEvent(e *output.InternalWrappedEvent)

LogEvent logs events to all events and triggeres any callbacks

func (*ScanContext) LogWarning

func (s *ScanContext) LogWarning(format string, args ...any)

LogWarning logs warning to all events

type ScanContextOption

type ScanContextOption func(*ScanContext)

func WithEvents

func WithEvents() ScanContextOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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