types

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 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

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

func (e *FormatError) Error() string

type ParsingError

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

func (e *ParsingError) Error() string

func (*ParsingError) Unwrap

func (e *ParsingError) Unwrap() error

type Report

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