engine

package
v0.0.0-...-8114a04 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoFixApprover

type AutoFixApprover struct{}

func (AutoFixApprover) Approve

type FixApprover

type FixApprover interface {
	Approve(candidate FixCandidate) (FixDecision, error)
}

type FixCandidate

type FixCandidate struct {
	Project     string
	ScopeID     string
	DisplayName string
	Command     string
	Summary     string
}

type FixDecision

type FixDecision int
const (
	FixApply FixDecision = iota
	FixSkip
	FixAbort
)

type FixProgress

type FixProgress interface {
	Plan(candidates []FixCandidate)
	Start(candidate FixCandidate)
	Finish(item result.FixItem)
}

type Mode

type Mode string
const (
	ModeCheck Mode = "check"
	ModeFix   Mode = "fix"
	ModeAudit Mode = "audit"
)

type NoopFixProgress

type NoopFixProgress struct{}

func (NoopFixProgress) Finish

func (NoopFixProgress) Finish(result.FixItem)

func (NoopFixProgress) Plan

func (NoopFixProgress) Plan([]FixCandidate)

func (NoopFixProgress) Start

type NoopScanProgress

type NoopScanProgress struct{}

func (NoopScanProgress) Close

func (NoopScanProgress) Close()

func (NoopScanProgress) Finish

func (NoopScanProgress) Finish(string, bool)

func (NoopScanProgress) Plan

func (NoopScanProgress) Plan(int)

func (NoopScanProgress) Start

func (NoopScanProgress) Start(string, string)

type Runner

type Runner struct {
	WorkDir       string
	FS            fs.FS
	Command       exec.Runner
	CommandStream exec.StreamRunner
}

func NewRunner

func NewRunner(workDir string) Runner

func (Runner) Audit

func (r Runner) Audit(
	ctx context.Context,
	only []string,
	minSeverity string,
	ignoredCVEs []string,
	progress ScanProgress,
	disableMonorepo bool,
	projectGlobs []string,
) (result.AuditReport, error)

func (Runner) Check

func (r Runner) Check(
	ctx context.Context,
	only []string,
	withEnv bool,
	outdated bool,
	progress ScanProgress,
	disableMonorepo bool,
	projectGlobs []string,
) (result.CheckReport, error)

func (Runner) Fix

func (r Runner) Fix(
	ctx context.Context,
	only []string,
	opts ecosystem.FixOptions,
	diff bool,
	approver FixApprover,
	progress FixProgress,
	disableMonorepo bool,
	projectGlobs []string,
) (result.FixReport, error)

func (Runner) Licenses

func (r Runner) Licenses(
	ctx context.Context,
	only []string,
	allow []string,
	deny []string,
	progress ScanProgress,
	disableMonorepo bool,
	projectGlobs []string,
) (result.LicenseReport, error)

type ScanProgress

type ScanProgress interface {
	Plan(total int)
	Start(scopeID, displayName string)
	Finish(scopeID string, included bool)
	Close()
}

type SelectInput

type SelectInput struct {
	Only []string
	Mode Mode
}

type Selection

type Selection struct {
	Specs         []*ecosystem.Spec
	SpecIDs       []string
	FixSelectors  []string
	RequestedMode Mode
}

func Select

func Select(input SelectInput) (Selection, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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