cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source

Variables

View Source
var (
	ErrorFileAccess     = errors.New("File Access Failure")
	ErrorEncoding       = errors.New("Encoding Failure")
	ErrorValidation     = errors.New("Validation Failure")
	ErrorAPI            = errors.New("API Failure")
	ErrorUserInput      = errors.New("User Input Failure")
	GlobalVerboseOutput = false
)

Functions

func NewBundleCmd added in v0.0.8

func NewBundleCmd(newAsyncDecoder func() AsyncDecoder) *cobra.Command

func NewConfigCmd added in v0.0.2

func NewConfigCmd(configMap map[string]any, configFileUsed string, configPath string) *cobra.Command

func NewEPSSCmd added in v0.0.8

func NewEPSSCmd(EPSSDownloadAgent io.Reader) *cobra.Command

func NewExportCmd added in v0.0.2

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

func NewPrintCommand added in v0.0.8

func NewPrintCommand(pipedFile *os.File, newAsyncDecoder func() AsyncDecoder) *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(newAsyncDecoder func() AsyncDecoder, KEVDownloadAgent io.Reader, EPSSDownloadAgent io.Reader) *cobra.Command

func NewVersionCmd added in v0.0.10

func NewVersionCmd(version string) *cobra.Command

Types

type AWSExportService added in v0.0.10

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

type AsyncDecoder added in v0.1.0

type AsyncDecoder interface {
	io.Writer
	Decode() (any, error)
	DecodeFrom(r io.Reader) (any, error)
	FileType() string
	Reset()
}

type CLIConfig added in v0.0.8

type CLIConfig struct {
	Version             string
	PipedInput          *os.File
	EPSSDownloadAgent   io.Reader
	KEVDownloadAgent    io.Reader
	DDExportService     DDExportService
	DDEngagement        defectdojo.EngagementQuery
	DDExportTimeout     time.Duration
	AWSExportService    AWSExportService
	AWSExportTimeout    time.Duration
	NewAsyncDecoderFunc func() AsyncDecoder
	ConfigMap           map[string]any
	ConfigFileUsed      string
	ConfigPath          string
}

type DDExportService added in v0.0.8

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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