data

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotatedOpenVEXTransformerV2

type AnnotatedOpenVEXTransformerV2 func(entry unmarshal.AnnotatedOpenVEXVulnerability, state provider.State) ([]Entry, error)

type CSAFVEXTransformerV2 added in v0.111.0

type CSAFVEXTransformerV2 func(entry unmarshal.CSAFVEXAdvisory, state provider.State) ([]Entry, error)

type EOLTransformerV2

type EOLTransformerV2 func(entry unmarshal.EndOfLifeDateRelease, state provider.State) ([]Entry, error)

type EPSSTransformerV2

type EPSSTransformerV2 func(entry unmarshal.EPSS, state provider.State) ([]Entry, error)

type Entry

type Entry struct {
	DBSchemaVersion int
	// Data is the specific payload that should be written (usually a grype-db v*.Entry struct)
	Data any
}

Entry is a data structure responsible for capturing an individual writable entry from a data.Processor (written by a data.Writer).

type GitHubTransformer

type GitHubTransformer func(entry unmarshal.GitHubAdvisory) ([]Entry, error)

type GitHubTransformerV2

type GitHubTransformerV2 func(entry unmarshal.GitHubAdvisory, state provider.State) ([]Entry, error)

type KnownExploitedVulnerabilityTransformerV2

type KnownExploitedVulnerabilityTransformerV2 func(entry unmarshal.KnownExploitedVulnerability, state provider.State) ([]Entry, error)

type MSRCTransformer

type MSRCTransformer func(entry unmarshal.MSRCVulnerability) ([]Entry, error)

type MSRCTransformerV2

type MSRCTransformerV2 func(entry unmarshal.MSRCVulnerability, state provider.State) ([]Entry, error)

type MatchExclusionTransformer

type MatchExclusionTransformer func(entry unmarshal.MatchExclusion) ([]Entry, error)

type MatchExclusionTransformerV2

type MatchExclusionTransformerV2 func(entry unmarshal.MatchExclusion, state provider.State) ([]Entry, error)

type NVDTransformer

type NVDTransformer func(entry unmarshal.NVDVulnerability) ([]Entry, error)

type NVDTransformerV2

type NVDTransformerV2 func(entry unmarshal.NVDVulnerability, state provider.State) ([]Entry, error)

type OSTransformer

type OSTransformer func(entry unmarshal.OSVulnerability) ([]Entry, error)

type OSTransformerV2

type OSTransformerV2 func(entry unmarshal.OSVulnerability, state provider.State) ([]Entry, error)

type OSVTransformerV2

type OSVTransformerV2 func(entry unmarshal.OSVVulnerability, state provider.State) ([]Entry, error)

type OpenVEXTransformerV2

type OpenVEXTransformerV2 func(entry unmarshal.OpenVEXVulnerability, state provider.State) ([]Entry, error)

type Processor

type Processor interface {
	IsSupported(schemaURL string) bool
	Process(reader io.Reader, state provider.State) ([]Entry, error)
}

Processor takes individual feed group cache files (for select feed groups) and is responsible to producing data.Entry objects to be written to the DB.

type Severity

type Severity string
const (
	SeverityUnknown    Severity = "Unknown"
	SeverityNegligible Severity = "Negligible"
	SeverityLow        Severity = "Low"
	SeverityMedium     Severity = "Medium"
	SeverityHigh       Severity = "High"
	SeverityCritical   Severity = "Critical"
)

func ParseSeverity

func ParseSeverity(s string) Severity

type Writer

type Writer interface {
	Write(...Entry) error
	Close() error
}

Writer knows how to persist one or more data.Entry objects to a database. Note that the backing implementations may take advantage of bulk writes when possible (positively improving performance), which is why multiple entries can be written at once.

Jump to

Keyboard shortcuts

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