scanner

package
v4.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPluginChannels added in v4.3.0

func WithPluginChannels(pluginChannels plugins.PluginChannels) scannerOption

Types

type ScanItem

type ScanItem struct {
	Content *string
	// Unique identifier of the item
	ID string
	// User-friendly description and/or link to the item
	Source string
}

func (ScanItem) GetContent

func (i ScanItem) GetContent() *string

func (ScanItem) GetGitInfo

func (i ScanItem) GetGitInfo() *plugins.GitInfo

func (ScanItem) GetID

func (i ScanItem) GetID() string

func (ScanItem) GetSource

func (i ScanItem) GetSource() string

type Scanner

type Scanner interface {
	Reset(scanConfig resources.ScanConfig, opts ...engine.EngineOption) error
	Scan(scanItems []ScanItem, scanConfig resources.ScanConfig, opts ...engine.EngineOption) (reporting.IReport, error)
	// ScanDynamic performs a scans with custom input of items and optional custom plugin channels.
	//
	// To provide custom plugin channels, use engine.WithPluginChannels:
	//
	//	pluginChannels := plugins.NewChannels(func(c *plugins.Channels) {
	//		c.Items = make(chan plugins.ISourceItem, 100)
	//	})
	//	s.ScanDynamic(ScanConfig{}, engine.WithPluginChannels(pluginChannels))
	ScanDynamic(itemsIn <-chan ScanItem, scanConfig resources.ScanConfig, opts ...engine.EngineOption) (reporting.IReport, error)
}

func NewScanner

func NewScanner() Scanner

Jump to

Keyboard shortcuts

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