Documentation ¶
Overview ¶
this package provides models for views
Index ¶
- type ComplianceReport
- type ComplianceReportMetadata
- type ComplianceReportReport
- type ComplianceReportSeverity
- type ComplianceReportSummary
- type GlobalVulnerabilityReportsViewById
- type PolicyreportGlobal
- type PolicyreportGlobalQuery
- type PolicyreportGlobalQueryType
- type PolicyreportSummary
- type PolicyreportView
- func (pr *PolicyreportView) FindOrCreatePolicyreportNamespace(namespaceToReturn string) *PolicyreportViewNamespace
- func (pr *PolicyreportView) ImportData(reports apiresourcecontracts.ResourceListPolicyreports) error
- func (pr PolicyreportView) ReturnPolicyreportNamespace(namespaceToReturn string) *PolicyreportViewNamespace
- func (pr PolicyreportView) ReturnPolicyreportNamespaceIdx(namespaceToReturn string) int
- func (pr *PolicyreportView) UpdateSummary()
- type PolicyreportViewNamespace
- func (prn *PolicyreportViewNamespace) AddPolicyreport(reports apiresourcecontracts.ResourcePolicyReport) error
- func (prn *PolicyreportViewNamespace) FindOrCreatePolicyreportReport(policyToReturn string, ...) *PolicyreportViewPolicies
- func (prn PolicyreportViewNamespace) ReturnPolicyreportPolicy(policyToReturn string) *PolicyreportViewPolicies
- func (prn PolicyreportViewNamespace) ReturnPolicyreportPolicyIdx(policyToReturn string) int
- type PolicyreportViewPolicies
- type PolicyreportViewReports
- type VulnerabilityById
- type VulnerabilityByIdAffected
- type VulnerabilityByIdDB
- type VulnerabilityByIdDBVulnerability
- type VulnerabilityReportsArtifact
- type VulnerabilityReportsScanner
- type VulnerabilityReportsView
- func (vr *VulnerabilityReportsView) FindOrCreateVulnerabilityReportNamespace(namespaceToReturn string) *VulnerabilityReportsViewNamespace
- func (vr *VulnerabilityReportsView) ImportData(reports apiresourcecontracts.ResourceListVulnerabilityreports) error
- func (vr VulnerabilityReportsView) ReturnVulnerabilityReportNamespace(namespaceToReturn string) *VulnerabilityReportsViewNamespace
- func (vr VulnerabilityReportsView) ReturnVulnerabilityReportNamespaceIdx(namespaceToReturn string) int
- func (vr *VulnerabilityReportsView) UpdateSummary()
- type VulnerabilityReportsViewNamespace
- type VulnerabilityReportsViewReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComplianceReport ¶
type ComplianceReport struct { Clusterid string `json:"clusterid"` Metadata ComplianceReportMetadata `json:"metadata"` Summary ComplianceReportSummary `json:"summary"` Reports []ComplianceReportReport `json:"reports"` }
type ComplianceReportReport ¶
type ComplianceReportReport struct { Name string `json:"name"` Severity ComplianceReportSeverity `json:"severity"` Totalfail int `json:"totalfail"` Id string `json:"id"` }
type ComplianceReportSeverity ¶
type ComplianceReportSeverity string
const ( CRITICAL ComplianceReportSeverity = "CRITICAL" HIGH ComplianceReportSeverity = "HIGH" MEDIUM ComplianceReportSeverity = "MEDIUM" LOW ComplianceReportSeverity = "LOW" UNKNOWN ComplianceReportSeverity = "UNKOWN" )
type ComplianceReportSummary ¶
type GlobalVulnerabilityReportsViewById ¶
type GlobalVulnerabilityReportsViewById struct { ClusterId string `json:"clusterId"` Environment string `json:"environment"` Criticality apicontracts.CriticalityLevel `json:"criticality"` Sensitivity apicontracts.SensitivityLevel `json:"sensitivity"` Project apicontracts.Project `json:"project"` }
type PolicyreportGlobal ¶
type PolicyreportGlobalQuery ¶
type PolicyreportGlobalQuery struct { Type PolicyreportGlobalQueryType `json:"type"` Internal bool `json:"internal"` }
type PolicyreportGlobalQueryType ¶
type PolicyreportGlobalQueryType string
const ( PolicyreportGlobalQueryTypeUnknown PolicyreportGlobalQueryType = "Unknown" PolicyreportGlobalQueryTypeCluster PolicyreportGlobalQueryType = "Cluster" PolicyreportGlobalQueryTypePolicy PolicyreportGlobalQueryType = "Policy" )
type PolicyreportSummary ¶
type PolicyreportView ¶
type PolicyreportView struct { Clusterid string `json:"clusterid" validate:""` Namespaces []PolicyreportViewNamespace `json:"namespaces" validate:""` PolicyreportSummary }
func (*PolicyreportView) FindOrCreatePolicyreportNamespace ¶
func (pr *PolicyreportView) FindOrCreatePolicyreportNamespace(namespaceToReturn string) *PolicyreportViewNamespace
func (*PolicyreportView) ImportData ¶
func (pr *PolicyreportView) ImportData(reports apiresourcecontracts.ResourceListPolicyreports) error
func (PolicyreportView) ReturnPolicyreportNamespace ¶
func (pr PolicyreportView) ReturnPolicyreportNamespace(namespaceToReturn string) *PolicyreportViewNamespace
func (PolicyreportView) ReturnPolicyreportNamespaceIdx ¶
func (pr PolicyreportView) ReturnPolicyreportNamespaceIdx(namespaceToReturn string) int
func (*PolicyreportView) UpdateSummary ¶
func (pr *PolicyreportView) UpdateSummary()
type PolicyreportViewNamespace ¶
type PolicyreportViewNamespace struct { Name string `json:"name" validate:""` Policies []PolicyreportViewPolicies `json:"policies" validate:""` PolicyreportSummary }
func (*PolicyreportViewNamespace) AddPolicyreport ¶
func (prn *PolicyreportViewNamespace) AddPolicyreport(reports apiresourcecontracts.ResourcePolicyReport) error
func (*PolicyreportViewNamespace) FindOrCreatePolicyreportReport ¶
func (prn *PolicyreportViewNamespace) FindOrCreatePolicyreportReport(policyToReturn string, summary apiresourcecontracts.ResourcePolicyReportSummary) *PolicyreportViewPolicies
func (PolicyreportViewNamespace) ReturnPolicyreportPolicy ¶
func (prn PolicyreportViewNamespace) ReturnPolicyreportPolicy(policyToReturn string) *PolicyreportViewPolicies
func (PolicyreportViewNamespace) ReturnPolicyreportPolicyIdx ¶
func (prn PolicyreportViewNamespace) ReturnPolicyreportPolicyIdx(policyToReturn string) int
type PolicyreportViewPolicies ¶
type PolicyreportViewPolicies struct { Name string `json:"name" validate:""` Reports []PolicyreportViewReports `json:"reports" validate:""` PolicyreportSummary }
func (*PolicyreportViewPolicies) AddPolicyreportPolicy ¶
func (prp *PolicyreportViewPolicies) AddPolicyreportPolicy(result apiresourcecontracts.ResourcePolicyReportResults) error
type PolicyreportViewReports ¶
type PolicyreportViewReports struct { Uid string `json:"uid" validate:""` Name string `json:"name" validate:""` ApiVersion string `json:"apiversion" validate:""` Kind string `json:"kind" validate:""` Result string `json:"result" validate:""` Category string `json:"category" validate:""` Message string `json:"message" validate:""` }
type VulnerabilityById ¶
type VulnerabilityById struct { CveId string `json:"cveId"` Severity string `json:"severity"` Score float32 `json:"score"` Title string `json:"title"` Link string `json:"link"` Affected []VulnerabilityByIdAffected `json:"affected"` }
func (*VulnerabilityById) ImportData ¶
func (v *VulnerabilityById) ImportData(data []VulnerabilityByIdDB)
type VulnerabilityByIdAffected ¶
type VulnerabilityByIdAffected struct { ClusterId string `json:"clusterId"` Internal bool `json:"internal"` Ownerref []apiresourcecontracts.ResourceMetadataOwnerReference `json:"ownerref"` Scanner apiresourcecontracts.AquaReportScanner `json:"scanner"` Artifact apiresourcecontracts.ResourceVulnerabilityReportReportArtifact `json:"artifact"` Resource string `json:"resource"` InstalledVersion string `json:"installedVersion"` FixedVersion string `json:"fixedVersion"` }
type VulnerabilityByIdDB ¶
type VulnerabilityByIdDB struct { Owner apiresourcecontracts.ResourceOwnerReference `bson:"owner"` Internal bool `bson:"internal"` Ownerref []apiresourcecontracts.ResourceMetadataOwnerReference `bson:"ownerref"` Scanner apiresourcecontracts.AquaReportScanner `bson:"scanner"` Artifact apiresourcecontracts.ResourceVulnerabilityReportReportArtifact `bson:"artifact"` Vulnerabilities VulnerabilityByIdDBVulnerability `bson:"vulnerabilities"` }
type VulnerabilityByIdDBVulnerability ¶
type VulnerabilityByIdDBVulnerability struct { Vulnerabilityid string `bson:"vulnerabilityid"` Severity string `bson:"severity"` Score float32 `bson:"score"` Title string `bson:"title"` Resource string `bson:"resource"` Link string `bson:"link"` InstalledVersion string `json:"installedVersion"` FixedVersion string `json:"fixedVersion"` }
type VulnerabilityReportsView ¶
type VulnerabilityReportsView struct { ClusterId string `json:"clusterId,omitempty"` Namespaces []VulnerabilityReportsViewNamespace `json:"namespaces,omitempty"` Environment string `json:"environment,omitempty"` Project apicontracts.Project `json:"project,omitempty"` apiresourcecontracts.AquaReportSummary `bson:"inline"` }
Struct that defines the output for the Vulnerabilityreport view
func (*VulnerabilityReportsView) FindOrCreateVulnerabilityReportNamespace ¶
func (vr *VulnerabilityReportsView) FindOrCreateVulnerabilityReportNamespace(namespaceToReturn string) *VulnerabilityReportsViewNamespace
func (*VulnerabilityReportsView) ImportData ¶
func (vr *VulnerabilityReportsView) ImportData(reports apiresourcecontracts.ResourceListVulnerabilityreports) error
func (VulnerabilityReportsView) ReturnVulnerabilityReportNamespace ¶
func (vr VulnerabilityReportsView) ReturnVulnerabilityReportNamespace(namespaceToReturn string) *VulnerabilityReportsViewNamespace
func (VulnerabilityReportsView) ReturnVulnerabilityReportNamespaceIdx ¶
func (vr VulnerabilityReportsView) ReturnVulnerabilityReportNamespaceIdx(namespaceToReturn string) int
func (*VulnerabilityReportsView) UpdateSummary ¶
func (vr *VulnerabilityReportsView) UpdateSummary()
type VulnerabilityReportsViewNamespace ¶
type VulnerabilityReportsViewNamespace struct { Name string `json:"name,omitempty"` Reports []VulnerabilityReportsViewReport `json:"reports,omitempty"` apiresourcecontracts.AquaReportSummary }
func (*VulnerabilityReportsViewNamespace) AddVulnerabilityreport ¶
func (vrn *VulnerabilityReportsViewNamespace) AddVulnerabilityreport(report apiresourcecontracts.ResourceVulnerabilityReport) error
type VulnerabilityReportsViewReport ¶
type VulnerabilityReportsViewReport struct { Uid string `json:"uid,omitempty"` Name string `json:"name,omitempty"` OwnerRef apiresourcecontracts.ResourceMetadataOwnerReference `json:"owner_ref,omitempty"` Scanner VulnerabilityReportsScanner `json:"scanner,omitempty"` Artifact VulnerabilityReportsArtifact `json:"artifact,omitempty"` UpdateTimestamp string `json:"updateTimestamp"` Vulnerabilities []apiresourcecontracts.ResourceVulnerabilityReportReportVulnerability `json:"vulnerabilities,omitempty"` apiresourcecontracts.AquaReportSummary }
Click to show internal directories.
Click to hide internal directories.