resultshandling

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrinter

func NewPrinter(ctx context.Context, printFormat, formatVersion string, verboseMode, 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) GetComplianceScore added in v2.3.0

func (rh *ResultsHandler) GetComplianceScore() float32

GetComplianceScore returns the result’s compliance score

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

GetRiskScore returns the result’s risk score

func (*ResultsHandler) HandleResults

func (rh *ResultsHandler) HandleResults(ctx context.Context) 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