Documentation ¶
Index ¶
Constants ¶
View Source
const ( PrettyPrinter string = "pretty-printer" JsonPrinter string = "json" JunitResultPrinter string = "junit" )
View Source
const EmptyPercentage = "NaN"
Variables ¶
View Source
var INDENT = " "
Functions ¶
This section is empty.
Types ¶
type ControlSummary ¶
type ControlSummary struct { TotalResources int TotalFailed int TotalWarnign int Description string Remediation string ListInputKinds []string WorkloadSummary map[string][]WorkloadSummary // <namespace>:[<WorkloadSummary>] }
func (*ControlSummary) ToSlice ¶
func (controlSummary *ControlSummary) ToSlice() []string
type JUnitFailure ¶
type JUnitFailure struct { Message string `xml:"message,attr"` Type string `xml:"type,attr"` Contents string `xml:",chardata"` }
JUnitFailure contains data related to a failed test.
type JUnitProperty ¶
JUnitProperty represents a key/value pair used to define properties.
type JUnitSkipMessage ¶
type JUnitSkipMessage struct {
Message string `xml:"message,attr"`
}
JUnitSkipMessage contains the reason why a testcase was skipped.
type JUnitTestCase ¶
type JUnitTestCase struct { XMLName xml.Name `xml:"testcase"` Classname string `xml:"classname,attr"` Name string `xml:"name,attr"` Time string `xml:"time,attr"` SkipMessage *JUnitSkipMessage `xml:"skipped,omitempty"` Failure *JUnitFailure `xml:"failure,omitempty"` }
JUnitTestCase is a single test case with its result.
type JUnitTestSuite ¶
type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Time string `xml:"time,attr"` Name string `xml:"name,attr"` Properties []JUnitProperty `xml:"properties>property,omitempty"` TestCases []JUnitTestCase `xml:"testcase"` }
JUnitTestSuite is a single JUnit test suite which may contain many testcases.
type JUnitTestSuites ¶
type JUnitTestSuites struct { XMLName xml.Name `xml:"testsuites"` Suites []JUnitTestSuite `xml:"testsuite"` }
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
func NewPrinter ¶
func (*Printer) ActionPrint ¶
func (printer *Printer) ActionPrint(opaSessionObj *cautils.OPASessionObj) float32
func (*Printer) PrintResults ¶
func (printer *Printer) PrintResults()
func (*Printer) PrintSummaryTable ¶
func (printer *Printer) PrintSummaryTable()
func (*Printer) SummarySetup ¶
func (printer *Printer) SummarySetup(postureReport *opapolicy.PostureReport)
type WorkloadSummary ¶
type WorkloadSummary struct { Kind string Name string Namespace string Group string Exception *armotypes.PostureExceptionPolicy }
func (*WorkloadSummary) ToString ¶
func (workloadSummary *WorkloadSummary) ToString() string
Click to show internal directories.
Click to hide internal directories.