plugin

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 13 modules, 5 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

Overview

Package plugin collects the common code used by extractor and detector plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// A unique name used to identify this plugin.
	Name() string
	// Plugin version, should get bumped whenever major changes are made.
	Version() int
}

Plugin is the part of the plugin interface that's shared between extractors and detectors.

type ScanStatus

type ScanStatus struct {
	Status        ScanStatusEnum
	FailureReason string
}

ScanStatus is the status of a scan run. In case the scan fails, FailureReason contains details.

func (*ScanStatus) String

func (s *ScanStatus) String() string

String returns a string representation of the scan status.

type ScanStatusEnum

type ScanStatusEnum int

ScanStatusEnum is the enum for the scan status.

const (
	ScanStatusUnspecified ScanStatusEnum = iota
	ScanStatusSucceeded
	ScanStatusPartiallySucceeded
	ScanStatusFailed
)

ScanStatusEnum values.

type Status

type Status struct {
	Name    string
	Version int
	Status  *ScanStatus
}

Status contains the status and version of the inventory+vuln plugins that ran.

func StatusFromErr

func StatusFromErr(p Plugin, partial bool, err error) *Status

StatusFromErr returns a successful or failed plugin scan status for a given plugin based on an error.

Jump to

Keyboard shortcuts

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