types

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package types provides common types for audit report formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatError added in v0.11.0

type FormatError struct {
	Type          string
	PrintableType string
}

FormatError indicates that a given string could be parsed as a particular audit report type, but does not satisfy the required format for that type of audit report.

func (*FormatError) Error added in v0.11.0

func (e *FormatError) Error() string

type ParsingError added in v0.11.0

type ParsingError struct {
	Type          string
	PrintableType string
	Err           error
}

ParsingError indicates that a given string could not be parsed as a particular audit report type.

func (*ParsingError) Error added in v0.11.0

func (e *ParsingError) Error() string

func (*ParsingError) Unwrap added in v0.11.0

func (e *ParsingError) Unwrap() error

type Report added in v0.11.0

type Report interface {
	// SetPackagePath sets the path to the package to which this audit report
	// belongs.
	SetPackagePath(string)

	// Type returns a short textual description of this report type.
	Type() string

	// AsIssues transforms this Report into a slice of Dracon Issues that can be
	// processed by the Dracon enricher.
	AsIssues() []*v1.Issue
}

Report is an interface for audit report formats.

Directories

Path Synopsis
Package npmfullaudit provides types and functions for working with audit reports from npm's "Full Audit" endpoint (/-/npm/v1/security/audits) and transforming them into data structures understood by the Dracon enricher.
Package npmfullaudit provides types and functions for working with audit reports from npm's "Full Audit" endpoint (/-/npm/v1/security/audits) and transforming them into data structures understood by the Dracon enricher.
Package npmquickaudit provides types and functions for working with audit reports from npm's "Quick Audit" endpoint (/-/npm/v1/security/audits/quick) and transforming them into data structures understood by the Dracon enricher.
Package npmquickaudit provides types and functions for working with audit reports from npm's "Quick Audit" endpoint (/-/npm/v1/security/audits/quick) and transforming them into data structures understood by the Dracon enricher.

Jump to

Keyboard shortcuts

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