Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatPretty = "pretty" FormatJSON = "json" FormatCSV = "csv" FormatSARIF = "sarif" )
Variables ¶
View Source
var ( ErrMissingToken = errors.New("missing token, please provide your GuardRails CLI token via -—token option or GUARDRAILS_CLI_TOKEN environment variable") ErrInvalidFormatParam = errors.New("failed to parse format value") )
View Source
var ( ErrFailedToSaveOutput = func(err error) error { return fmt.Errorf("Couldn't save output, %s", err.Error()) } )
Functions ¶
This section is empty.
Types ¶
type Args ¶
Args provides arguments for scan command handler.
func (*Args) SetDefault ¶
SetDefault sets default value for some of args variables.
type Handler ¶
type Handler struct { Args *Args Spinner *spinner.Spinner Config *config.Config OutputWriter *outputwriter.OutputWriter Repository repository.Repository Archiver archiver.Archiver GRClient grclient.GuardRailsClient }
Handler contains scan command dependencies.
func New ¶
func New( args *Args, spinner *spinner.Spinner, config *config.Config, repo repository.Repository, arc archiver.Archiver, out *outputwriter.OutputWriter, grClient grclient.GuardRailsClient) *Handler
New instantiates new scan command handler.
func (*Handler) GetScanDataFormatter ¶
func (h *Handler) GetScanDataFormatter(resp *guardrailsclient.GetScanDataResp) error
GetScanDataFormatter parses guardrailsclient.GetScanDataResp to chosen format.
Click to show internal directories.
Click to hide internal directories.