reportsummary

package
v0.0.77 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlSummary

type ControlSummary struct {
	Name             string  `json:"name"`
	Score            float32 `json:"score"`
	ResourceCounters `json:",inline"`
}

ControlSummary summary of scanning from a single control perspective

func (*ControlSummary) GetScore

func (controlSummary *ControlSummary) GetScore() float32

GetScore return control score

func (*ControlSummary) IsExcluded

func (controlSummary *ControlSummary) IsExcluded() bool

IsExcluded is this control excluded

func (*ControlSummary) IsFailed

func (controlSummary *ControlSummary) IsFailed() bool

IsFailed did this control fail

func (*ControlSummary) IsPassed

func (controlSummary *ControlSummary) IsPassed() bool

IsPassed did this control pass

func (*ControlSummary) IsSkipped

func (controlSummary *ControlSummary) IsSkipped() bool

IsSkipped was this control skipped

func (*ControlSummary) NumberOfAll

func (controlSummary *ControlSummary) NumberOfAll() int

NumberOfAll get the number of all resources

func (*ControlSummary) NumberOfExcluded

func (controlSummary *ControlSummary) NumberOfExcluded() int

NumberOfExcluded get the number of excluded resources

func (*ControlSummary) NumberOfFailed

func (controlSummary *ControlSummary) NumberOfFailed() int

NumberOfFailed get the number of failed resources

func (*ControlSummary) NumberOfPassed

func (controlSummary *ControlSummary) NumberOfPassed() int

NumberOfPassed get the number of passed resources

func (*ControlSummary) NumberOfSkipped

func (controlSummary *ControlSummary) NumberOfSkipped() int

NumberOfSkipped get the number of skipped resources

func (*ControlSummary) Status

func (controlSummary *ControlSummary) Status() apis.ScanningStatus

Status get the control status. returns an apis.ScanningStatus object

type FrameworkSummary

type FrameworkSummary struct {
	Name             string                    `json:"name"`               // framework name
	Score            float32                   `json:"score"`              // framework score
	Version          string                    `json:"version"`            // framework version
	Controls         map[string]ControlSummary `json:"controls,omitempty"` // mapping of control - map[<control ID>]<control summary>
	ResourceCounters `json:",inline"`
}

FrameworkSummary summary of scanning from a single framework perspective

func (*FrameworkSummary) GetName

func (frameworkSummary *FrameworkSummary) GetName() string

GetName return framework name

func (*FrameworkSummary) GetScore

func (frameworkSummary *FrameworkSummary) GetScore() float32

GetScore return framework score

func (*FrameworkSummary) IsExcluded

func (frameworkSummary *FrameworkSummary) IsExcluded() bool

IsExcluded is this framework excluded

func (*FrameworkSummary) IsFailed

func (frameworkSummary *FrameworkSummary) IsFailed() bool

IsFailed did this framework fail

func (*FrameworkSummary) IsPassed

func (frameworkSummary *FrameworkSummary) IsPassed() bool

IsPassed did this framework pass

func (*FrameworkSummary) IsSkipped

func (frameworkSummary *FrameworkSummary) IsSkipped() bool

IsSkipped was this framework skipped

func (*FrameworkSummary) NumberOfAll

func (frameworkSummary *FrameworkSummary) NumberOfAll() int

NumberOfAll get the number of all resources

func (*FrameworkSummary) NumberOfExcluded

func (frameworkSummary *FrameworkSummary) NumberOfExcluded() int

NumberOfExcluded get the number of excluded resources

func (*FrameworkSummary) NumberOfFailed

func (frameworkSummary *FrameworkSummary) NumberOfFailed() int

NumberOfFailed get the number of failed resources

func (*FrameworkSummary) NumberOfPassed

func (frameworkSummary *FrameworkSummary) NumberOfPassed() int

NumberOfPassed get the number of passed resources

func (*FrameworkSummary) NumberOfSkipped

func (frameworkSummary *FrameworkSummary) NumberOfSkipped() int

NumberOfSkipped get the number of skipped resources

func (*FrameworkSummary) Status

func (frameworkSummary *FrameworkSummary) Status() apis.ScanningStatus

Status get the framework status. returns an apis.ScanningStatus object

type ResourceCounters

type ResourceCounters struct {
	PassedResources   int `json:"passedResources"`
	FailedResources   int `json:"failedResources"`
	ExcludedResources int `json:"excludedResources"`
	SkippedResources  int `json:"skippedResources"`
}

func (*ResourceCounters) NumberOfAll

func (resourceCounters *ResourceCounters) NumberOfAll() int

NumberOfAll get the number of all resources

func (*ResourceCounters) NumberOfExcluded

func (resourceCounters *ResourceCounters) NumberOfExcluded() int

NumberOfExcluded get the number of excluded resources

func (*ResourceCounters) NumberOfFailed

func (resourceCounters *ResourceCounters) NumberOfFailed() int

NumberOfFailed get the number of failed resources

func (*ResourceCounters) NumberOfPassed

func (resourceCounters *ResourceCounters) NumberOfPassed() int

NumberOfPassed get the number of passed resources

func (*ResourceCounters) NumberOfSkipped

func (resourceCounters *ResourceCounters) NumberOfSkipped() int

NumberOfSkipped get the number of skipped resources

type SummaryDetails

type SummaryDetails struct {
	Frameworks       []FrameworkSummary        `json:"frameworks"`         // list of framework summary
	Controls         map[string]ControlSummary `json:"controls,omitempty"` // mapping of control - map[<control ID>]<control summary>
	ResourceCounters `json:",inline"`
}

SummaryDetails detailed summary of the scanning. will contain versions, counters, etc.

func (*SummaryDetails) IsExcluded

func (summaryDetails *SummaryDetails) IsExcluded(f *helpersv1.Filters) bool

IsExcluded is the scan excluded

func (*SummaryDetails) IsFailed

func (summaryDetails *SummaryDetails) IsFailed(f *helpersv1.Filters) bool

IsFailed did the scan fail

func (*SummaryDetails) IsPassed

func (summaryDetails *SummaryDetails) IsPassed(f *helpersv1.Filters) bool

IsPassed did the scan pass

func (*SummaryDetails) IsSkipped

func (summaryDetails *SummaryDetails) IsSkipped(f *helpersv1.Filters) bool

IsSkipped was the scan skipped

func (*SummaryDetails) ListAllControls

func (summaryDetails *SummaryDetails) ListAllControls(f *helpersv1.Filters) *helpersv1.AllLists

ListAllResources list all resources IDs. This function lists the resources IDs from the "results" and not from the "resources"

func (*SummaryDetails) ListAllFrameworks

func (summaryDetails *SummaryDetails) ListAllFrameworks() *helpersv1.AllLists

ListAllResources list all resources IDs. This function lists the resources IDs from the "results" and not from the "resources"

func (*SummaryDetails) ListControls

func (summaryDetails *SummaryDetails) ListControls(f *helpersv1.Filters, status apis.ScanningStatus) *helpersv1.AllLists

func (*SummaryDetails) ListExcludedControls

func (summaryDetails *SummaryDetails) ListExcludedControls(f *helpersv1.Filters) []string

ListExcludedResources list all excluded resources IDs

func (*SummaryDetails) ListExcludedFrameworks

func (summaryDetails *SummaryDetails) ListExcludedFrameworks() []string

ListExcludedResources list all excluded resources IDs

func (*SummaryDetails) ListFailedControls

func (summaryDetails *SummaryDetails) ListFailedControls(f *helpersv1.Filters) []string

ListFailedResources list all failed resources IDs

func (*SummaryDetails) ListFailedFrameworks

func (summaryDetails *SummaryDetails) ListFailedFrameworks() []string

ListFailedResources list all failed resources IDs

func (*SummaryDetails) ListFrameworks

func (summaryDetails *SummaryDetails) ListFrameworks(status apis.ScanningStatus) *helpersv1.AllLists

func (*SummaryDetails) ListPassedControls

func (summaryDetails *SummaryDetails) ListPassedControls(f *helpersv1.Filters) []string

ListPassedResources list all passed resources IDs

func (*SummaryDetails) ListPassedFrameworks

func (summaryDetails *SummaryDetails) ListPassedFrameworks() []string

ListPassedResources list all passed resources IDs

func (*SummaryDetails) ListSkippedControls

func (summaryDetails *SummaryDetails) ListSkippedControls(f *helpersv1.Filters) []string

ListSkippedResources list all skipped resources IDs

func (*SummaryDetails) ListSkippedFrameworks

func (summaryDetails *SummaryDetails) ListSkippedFrameworks() []string

ListSkippedResources list all skipped resources IDs

func (*SummaryDetails) NumberOfAll

func (summaryDetails *SummaryDetails) NumberOfAll() int

NumberOfAll get the number of all resources

func (*SummaryDetails) NumberOfExcluded

func (summaryDetails *SummaryDetails) NumberOfExcluded() int

NumberOfExcluded get the number of excluded resources

func (*SummaryDetails) NumberOfFailed

func (summaryDetails *SummaryDetails) NumberOfFailed() int

NumberOfFailed get the number of failed resources

func (*SummaryDetails) NumberOfPassed

func (summaryDetails *SummaryDetails) NumberOfPassed() int

NumberOfPassed get the number of passed resources

func (*SummaryDetails) NumberOfSkipped

func (summaryDetails *SummaryDetails) NumberOfSkipped() int

NumberOfSkipped get the number of skipped resources

func (*SummaryDetails) Status

func (summaryDetails *SummaryDetails) Status(f *helpersv1.Filters) apis.ScanningStatus

Status get the scan status. returns an apis.ScanningStatus object

Jump to

Keyboard shortcuts

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