cmd

package
v0.0.10-test Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source

Variables

View Source
var (
	ErrorFileAccess     = errors.New("file access")
	ErrorEncoding       = errors.New("encoding")
	ErrorValidation     = errors.New("validation")
	ErrorAPI            = errors.New("request API")
	ErrorUserInput      = errors.New("user error")
	GlobalVerboseOutput = false
)

Functions

func NewBundleCmd added in v0.0.8

func NewBundleCmd() *cobra.Command

func NewConfigCmd added in v0.0.2

func NewConfigCmd() *cobra.Command

func NewEPSSCmd added in v0.0.8

func NewEPSSCmd(service EPSSService) *cobra.Command

func NewExportCmd added in v0.0.2

func NewExportCmd(
	ddService DDExportService,
	ddTimeout time.Duration,
	ddEngagement defectdojo.EngagementQuery,
	awsService AWSExportService,
	awsTimeout time.Duration,
) *cobra.Command

func NewPrintCommand added in v0.0.8

func NewPrintCommand(decodeTimeout time.Duration, pipedFile *os.File) *cobra.Command

NewPrintCommand will pretty print a report file table, r can be piped input from standard out

func NewRootCommand added in v0.0.8

func NewRootCommand(config CLIConfig) *cobra.Command

func NewValidateCmd added in v0.0.2

func NewValidateCmd(decodeTimeout time.Duration) *cobra.Command

func NewVersionCmd added in v0.0.10

func NewVersionCmd(version string) *cobra.Command

func ParseAndFPrint added in v0.0.8

func ParseAndFPrint(r io.Reader, w io.Writer, timeout time.Duration) error

func ParseAndValidate added in v0.0.8

func ParseAndValidate(r io.Reader, config artifact.Config, timeout time.Duration) error

Types

type AWSExportService added in v0.0.10

type AWSExportService interface {
	Export(context.Context, io.Reader, string) error
}

type CLIConfig added in v0.0.8

type CLIConfig struct {
	AutoDecoderTimeout time.Duration
	Version            string
	PipedInput         *os.File
	DefaultReport      string
	EPSSService        EPSSService
	DDExportService    DDExportService
	DDEngagement       defectdojo.EngagementQuery
	DDExportTimeout    time.Duration
	AWSExportService   AWSExportService
	AWSExportTimeout   time.Duration
}

type DDExportService added in v0.0.8

type DDExportService interface {
	Export(context.Context, io.Reader, defectdojo.EngagementQuery, defectdojo.ScanType) error
}

type EPSSService added in v0.0.8

type EPSSService interface {
	WriteCSV(w io.Writer, url string) (int64, error)
	WriteEPSS([]epss.CVE) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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