cmd

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cmd contains the ClI execution logic using cobra

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorFileAccess permissions, missing an expected file, etc.
	ErrorFileAccess = errors.New("File Access Failure")
	// ErrorEncoding anything dealing with encoding / decoding
	ErrorEncoding = errors.New("Encoding Failure")
	// ErrorValidation violations of validtion rules
	ErrorValidation = errors.New("Validation Failure")
	// ErrorAPI unexpected responses from APIs
	ErrorAPI = errors.New("API Failure")
	// ErrorUserInput unexpected or non-processable user input
	ErrorUserInput = errors.New("User Input Failure")
)

Functions

func NewRootCommand added in v0.0.8

func NewRootCommand(config CLIConfig) *cobra.Command

NewRootCommand configures the sub commands.

Types

type AsyncDecoder added in v0.1.0

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

AsyncDecoder decodes into a specific report type given content.

The Async Decoder should read content and decode it into any number of object types or return an encoding error

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
}

CLIConfig used by all of the cmds

Directories

Path Synopsis
Package main executes the CLI for gatecheck
Package main executes the CLI for gatecheck

Jump to

Keyboard shortcuts

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