Documentation ¶
Index ¶
- type ResourceAssociatedControl
- func (control *ResourceAssociatedControl) GetID() string
- func (control *ResourceAssociatedControl) GetName() string
- func (control *ResourceAssociatedControl) GetStatus(f *helpersv1.Filters) apis.IStatus
- func (control *ResourceAssociatedControl) ListRules() []ResourceAssociatedRule
- func (control *ResourceAssociatedControl) SetID(id string)
- func (control *ResourceAssociatedControl) SetName(name string)
- type ResourceAssociatedRule
- type Result
- func (result *Result) GetResourceID() string
- func (result *Result) GetStatus(f *helpersv1.Filters) apis.IStatus
- func (result *Result) ListControls() []ResourceAssociatedControl
- func (result *Result) ListControlsIDs(f *helpersv1.Filters) *helpersv1.AllLists
- func (result *Result) ListControlsNames(f *helpersv1.Filters) *helpersv1.AllLists
- func (result *Result) ListRules() []ResourceAssociatedRule
- func (result *Result) ListRulesNames(f *helpersv1.Filters) *helpersv1.AllLists
- func (result *Result) ListRulesOfControl(controlID, controlName string) []ResourceAssociatedRule
- func (result *Result) SetExceptions(workload workloadinterface.IMetadata, ...)
- func (result *Result) SetResourceID(resourceID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceAssociatedControl ¶
type ResourceAssociatedControl struct { ControlID string `json:"controlID"` Name string `json:"name"` ResourceAssociatedRules []ResourceAssociatedRule `json:"rules,omitempty"` }
ResourceAssociatedControl control that is associated to a resource
func (*ResourceAssociatedControl) GetID ¶
func (control *ResourceAssociatedControl) GetID() string
GetID get control ID
func (*ResourceAssociatedControl) GetName ¶
func (control *ResourceAssociatedControl) GetName() string
GetID get control ID
func (*ResourceAssociatedControl) GetStatus ¶
func (control *ResourceAssociatedControl) GetStatus(f *helpersv1.Filters) apis.IStatus
Status get control status
func (*ResourceAssociatedControl) ListRules ¶
func (control *ResourceAssociatedControl) ListRules() []ResourceAssociatedRule
ListRules return list of rules
func (*ResourceAssociatedControl) SetID ¶
func (control *ResourceAssociatedControl) SetID(id string)
SetID set control ID
func (*ResourceAssociatedControl) SetName ¶
func (control *ResourceAssociatedControl) SetName(name string)
SetID set control ID
type ResourceAssociatedRule ¶
type ResourceAssociatedRule struct { Name string `json:"name"` // rule name Status apis.ScanningStatus `json:"status"` Paths []armotypes.PosturePaths `json:"paths,omitempty"` Exception []armotypes.PostureExceptionPolicy `json:"exception,omitempty"` ControlConfigurations map[string][]string `json:"controlConfigurations,omitempty"` }
ResourceAssociatedRule failed rule that is associated to a resource
func (*ResourceAssociatedRule) GetName ¶
func (rule *ResourceAssociatedRule) GetName() string
GetName get rule name
func (*ResourceAssociatedRule) GetStatus ¶
func (rule *ResourceAssociatedRule) GetStatus(f *helpersv1.Filters) apis.IStatus
SetName set rule name
func (*ResourceAssociatedRule) SetName ¶
func (rule *ResourceAssociatedRule) SetName(n string)
SetName set rule name
type Result ¶
type Result struct { ResourceID string `json:"resourceID"` // <apigroup>/<namespace>/<kind>/<name> AssociatedControls []ResourceAssociatedControl `json:"controls,omitempty"` }
Result - resource result resourceID and the controls that where tested against the resource
func MockResults ¶
func MockResults() []Result
func (*Result) GetResourceID ¶
GetResourceID get the resource ID
func (*Result) ListControls ¶
func (result *Result) ListControls() []ResourceAssociatedControl
// ListControls return list of controls
func (*Result) ListControlsIDs ¶
ListFailedControls return list of failed controls IDs
func (*Result) ListControlsNames ¶
ListFailedControls return list of controls IDs
func (*Result) ListRules ¶
func (result *Result) ListRules() []ResourceAssociatedRule
ListRules return list of rules
func (*Result) ListRulesNames ¶
ListRulesNames return list of rules names
func (*Result) ListRulesOfControl ¶
func (result *Result) ListRulesOfControl(controlID, controlName string) []ResourceAssociatedRule
ListRulesOfControl return list of rules related to a controlID or controlName
func (*Result) SetExceptions ¶
func (result *Result) SetExceptions(workload workloadinterface.IMetadata, exceptionsPolicies []armotypes.PostureExceptionPolicy, clusterName string)
SetExceptions add exceptions to result
func (*Result) SetResourceID ¶
SetResourceID set the resource ID