resultshandling

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrinter

func NewPrinter(printFormat, formatVersion string, verboseMode bool, attackTree bool, viewType cautils.ViewTypes) printer.IPrinter

NewPrinter returns a new printer for a given format and configuration options

Types

type ResultsHandler

type ResultsHandler struct {
	// contains filtered or unexported fields
}

func NewResultsHandler

func NewResultsHandler(reporterObj reporter.IReport, printerObjs []printer.IPrinter, uiPrinter printer.IPrinter) *ResultsHandler

func (*ResultsHandler) GetData

func (rh *ResultsHandler) GetData() *cautils.OPASessionObj

GetData returns scan/action related data (policies, resources, results, etc.)

Call the ToJson() method if you want the JSON representation of the data

func (*ResultsHandler) GetPrinters

func (rh *ResultsHandler) GetPrinters() []printer.IPrinter

GetPrinter returns all printers

func (*ResultsHandler) GetReporter

func (rh *ResultsHandler) GetReporter() reporter.IReport

GetReporter returns the reporter object

func (*ResultsHandler) GetResults

func (rh *ResultsHandler) GetResults() *reporthandlingv2.PostureReport

GetResults returns the results

func (*ResultsHandler) GetRiskScore

func (rh *ResultsHandler) GetRiskScore() float32

GetScore returns the result’s risk score

func (*ResultsHandler) HandleResults

func (rh *ResultsHandler) HandleResults() error

HandleResults handles all necessary actions for the scan results

func (*ResultsHandler) SetData

func (rh *ResultsHandler) SetData(data *cautils.OPASessionObj)

SetData sets the scan/action related data

func (*ResultsHandler) ToJson

func (rh *ResultsHandler) ToJson() ([]byte, error)

ToJson returns the results in the JSON format

Directories

Path Synopsis
v1
v2
v2

Jump to

Keyboard shortcuts

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