viewsmodels

package
v0.3.11-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

this package provides models for views

Index

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 ComplianceReportMetadata

type ComplianceReportMetadata struct {
	Name  string `json:"name"`
	Title string `json:"title"`
}

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 ComplianceReportSummary struct {
	Failcount int `json:"failcount"`
	Passcount int `json:"passcount"`
}

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 PolicyreportGlobal struct {
	Cluster string `json:"cluster"`
	Policy  string `json:"policy"`
	Fail    int    `json:"fail"`
	Pass    int    `json:"pass"`
}

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 PolicyreportSummary struct {
	Fail  int `json:"failed" validate:""`
	Pass  int `json:"passed" validate:""`
	Error int `json:"error" validate:""`
	Warn  int `json:"warning" validate:""`
	Skip  int `json:"skipped" validate:""`
	Total int `json:"total" validate:""`
}

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 (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 (*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

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 VulnerabilityReportsArtifact

type VulnerabilityReportsArtifact struct {
	Repository string `json:"repository,omitempty"`
	Tag        string `json:"tag,omitempty"`
}

type VulnerabilityReportsScanner

type VulnerabilityReportsScanner struct {
	Name    string `json:"name,omitempty"`
	Vendor  string `json:"vendor,omitempty"`
	Version string `json:"version,omitempty"`
}

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 (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

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
}

Jump to

Keyboard shortcuts

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