v1

package
v0.0.180 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatusInfo

func NewStatusInfo(status apis.ScanningStatus, info string) *apis.StatusInfo

Types

type AllLists

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

AllLists lists of resources/policies grouped by the status, this structure is meant for internal use of report handling and not an API

func MockAllListsForIntegration

func MockAllListsForIntegration() *AllLists

func (*AllLists) All

func (all *AllLists) All() Iterator

func (*AllLists) Append

func (all *AllLists) Append(status apis.ScanningStatus, str ...string)

Append append single string to matching status list

func (*AllLists) Excluded

func (all *AllLists) Excluded() []string

func (*AllLists) Failed

func (all *AllLists) Failed() []string

func (*AllLists) Other

func (all *AllLists) Other() []string

func (*AllLists) Passed

func (all *AllLists) Passed() []string

func (*AllLists) Skipped

func (all *AllLists) Skipped() []string

func (*AllLists) ToUniqueControls added in v0.0.174

func (all *AllLists) ToUniqueControls()

ToUnique - Call this function only when setting the List

func (*AllLists) ToUniqueResources added in v0.0.174

func (all *AllLists) ToUniqueResources()

ToUnique - Call this function only when setting the List

func (*AllLists) Update

func (all *AllLists) Update(all2 *AllLists)

Update AllLists objects with

type AllListsIterator added in v0.0.174

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

func (*AllListsIterator) HasNext added in v0.0.174

func (iter *AllListsIterator) HasNext() bool

func (*AllListsIterator) Len added in v0.0.174

func (iter *AllListsIterator) Len() int

func (*AllListsIterator) Next added in v0.0.174

func (iter *AllListsIterator) Next() string

type Filters

type Filters struct {
	FrameworkNames []string // Framework name may effect the status
}

Filters fields that might take effect on the resource status. If this objects is empty or nil, the status will be as determined by pre-defined logic

func (*Filters) FilterExceptions

func (f *Filters) FilterExceptions(exceptions []armotypes.PostureExceptionPolicy) []armotypes.PostureExceptionPolicy

FilterExceptions get list of exceptions and return the list of filtered exceptions

func (*Filters) ListFrameworkNames

func (f *Filters) ListFrameworkNames() []string

ListFrameworkNames list the framework name in filter object. Removes empty names

type Iterator added in v0.0.174

type Iterator interface {
	HasNext() bool
	Next() string
	Len() int
}

type ListingFilters

type ListingFilters struct {
	FrameworkNames []string              // Framework name may effect the status
	ControlsNames  []string              // Framework name may effect the status
	ControlsIDs    []string              // Framework name may effect the status
	Statuses       []apis.ScanningStatus // Framework name may effect the status
}

ListingFilters filter list based on filters. If nil of empty list, the list will be ignored

type ReportObject

type ReportObject map[string]interface{}

ReportObject any report object must be compliment with a map[string]interface{} structures

type Status

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

func NewStatus

func NewStatus(status apis.ScanningStatus) *Status

func (*Status) Info

func (s *Status) Info() string

func (*Status) IsExcluded

func (s *Status) IsExcluded() bool

IsExcluded is the status excluded

func (*Status) IsFailed

func (s *Status) IsFailed() bool

IsFailed is the status fail

func (*Status) IsPassed

func (s *Status) IsPassed() bool

IsPassed is the status pass

func (*Status) IsSkipped

func (s *Status) IsSkipped() bool

IsSkipped is the status skipped

func (*Status) Status

func (s *Status) Status() apis.ScanningStatus

Jump to

Keyboard shortcuts

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