Documentation ¶
Index ¶
- type ByAuthor
- type ByLanguage
- type ByRepository
- type BySeverities
- func (s *BySeverities) SumVulnerabilityCritical(vuln *Vulnerability) *BySeverities
- func (s *BySeverities) SumVulnerabilityHigh(vuln *Vulnerability) *BySeverities
- func (s *BySeverities) SumVulnerabilityInfo(vuln *Vulnerability) *BySeverities
- func (s *BySeverities) SumVulnerabilityLow(vuln *Vulnerability) *BySeverities
- func (s *BySeverities) SumVulnerabilityMedium(vuln *Vulnerability) *BySeverities
- func (s *BySeverities) SumVulnerabilityUnknown(vuln *Vulnerability) *BySeverities
- type BySeverity
- type ByTime
- type ByVulnerabilityTypes
- type Filter
- func (f *Filter) GetDateFilter() (query string, args []interface{})
- func (f *Filter) GetRepositoryFilter() interface{}
- func (f *Filter) GetWorkspaceFilter() interface{}
- func (f *Filter) SetDateRangeAndPagination(request *http.Request) error
- func (f *Filter) SetWorkspaceAndRepositoryID(request *http.Request) (err error)
- func (f *Filter) Validate() error
- type Response
- func (r *Response) SetChartByAuthor(vulns []*VulnerabilitiesByAuthor, err error) error
- func (r *Response) SetChartByLanguage(vulns []*VulnerabilitiesByLanguage, err error) error
- func (r *Response) SetChartByRepository(vulns []*VulnerabilitiesByRepository, err error) error
- func (r *Response) SetChartBySeverity(vulnerability *Vulnerability, err error) error
- func (r *Response) SetChartByTime(vulns []*VulnerabilitiesByTime, err error) error
- func (r *Response) SetTotalAuthors(totalAuthors int, err error) error
- func (r *Response) SetTotalRepositories(totalRepositories int, err error) error
- type VulnerabilitiesByAuthor
- type VulnerabilitiesByLanguage
- type VulnerabilitiesByRepository
- type VulnerabilitiesByTime
- type Vulnerability
- func (v *Vulnerability) AddCountVulnerabilityBySeverity(severity severities.Severity, vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityCritical(vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityHigh(vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityInfo(vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityLow(vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityMedium(vulnType vulnerability.Type)
- func (v *Vulnerability) AddCountVulnerabilityUnknown(vulnType vulnerability.Type)
- func (v *Vulnerability) ToResponseBySeverities() *BySeverities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByAuthor ¶
type ByAuthor struct { Author string `json:"author"` *BySeverities }
type ByLanguage ¶
type ByLanguage struct { Language languages.Language `json:"language"` *BySeverities }
type ByRepository ¶
type ByRepository struct { RepositoryName string `json:"repositoryName"` *BySeverities }
type BySeverities ¶
type BySeverities struct { Critical *BySeverity `json:"critical"` High *BySeverity `json:"high"` Medium *BySeverity `json:"medium"` Low *BySeverity `json:"low"` Info *BySeverity `json:"info"` Unknown *BySeverity `json:"unknown"` }
func (*BySeverities) SumVulnerabilityCritical ¶
func (s *BySeverities) SumVulnerabilityCritical(vuln *Vulnerability) *BySeverities
func (*BySeverities) SumVulnerabilityHigh ¶
func (s *BySeverities) SumVulnerabilityHigh(vuln *Vulnerability) *BySeverities
func (*BySeverities) SumVulnerabilityInfo ¶
func (s *BySeverities) SumVulnerabilityInfo(vuln *Vulnerability) *BySeverities
func (*BySeverities) SumVulnerabilityLow ¶
func (s *BySeverities) SumVulnerabilityLow(vuln *Vulnerability) *BySeverities
func (*BySeverities) SumVulnerabilityMedium ¶
func (s *BySeverities) SumVulnerabilityMedium(vuln *Vulnerability) *BySeverities
func (*BySeverities) SumVulnerabilityUnknown ¶
func (s *BySeverities) SumVulnerabilityUnknown(vuln *Vulnerability) *BySeverities
type BySeverity ¶
type BySeverity struct { Count int `json:"count"` Types *ByVulnerabilityTypes `json:"types"` }
type ByTime ¶
type ByTime struct { Time time.Time `json:"time"` *BySeverities }
type ByVulnerabilityTypes ¶
type Filter ¶
type Filter struct { RepositoryID uuid.UUID WorkspaceID uuid.UUID StartTime time.Time EndTime time.Time Page int Size int }
func (*Filter) GetDateFilter ¶
func (*Filter) GetRepositoryFilter ¶
func (f *Filter) GetRepositoryFilter() interface{}
func (*Filter) GetWorkspaceFilter ¶
func (f *Filter) GetWorkspaceFilter() interface{}
func (*Filter) SetDateRangeAndPagination ¶
func (*Filter) SetWorkspaceAndRepositoryID ¶
type Response ¶
type Response struct { TotalAuthors int `json:"totalAuthors"` TotalRepositories int `json:"totalRepositories"` VulnerabilityBySeverity *BySeverities `json:"vulnerabilityBySeverity"` VulnerabilitiesByAuthor []ByAuthor `json:"vulnerabilitiesByAuthor"` VulnerabilitiesByRepository []ByRepository `json:"vulnerabilitiesByRepository"` VulnerabilitiesByLanguage []ByLanguage `json:"vulnerabilitiesByLanguage"` VulnerabilitiesByTime []ByTime `json:"vulnerabilityByTime"` }
func (*Response) SetChartByAuthor ¶
func (r *Response) SetChartByAuthor(vulns []*VulnerabilitiesByAuthor, err error) error
func (*Response) SetChartByLanguage ¶
func (r *Response) SetChartByLanguage(vulns []*VulnerabilitiesByLanguage, err error) error
func (*Response) SetChartByRepository ¶
func (r *Response) SetChartByRepository(vulns []*VulnerabilitiesByRepository, err error) error
func (*Response) SetChartBySeverity ¶
func (r *Response) SetChartBySeverity(vulnerability *Vulnerability, err error) error
func (*Response) SetChartByTime ¶
func (r *Response) SetChartByTime(vulns []*VulnerabilitiesByTime, err error) error
func (*Response) SetTotalAuthors ¶
type VulnerabilitiesByAuthor ¶
type VulnerabilitiesByAuthor struct { Author string `json:"author" gorm:"Column:author"` Vulnerability }
func (*VulnerabilitiesByAuthor) ToResponseByAuthor ¶
func (v *VulnerabilitiesByAuthor) ToResponseByAuthor() ByAuthor
type VulnerabilitiesByLanguage ¶
type VulnerabilitiesByLanguage struct { Language languages.Language `json:"language" gorm:"Column:language"` Vulnerability }
func (*VulnerabilitiesByLanguage) ToResponseByLanguage ¶
func (v *VulnerabilitiesByLanguage) ToResponseByLanguage() ByLanguage
type VulnerabilitiesByRepository ¶
type VulnerabilitiesByRepository struct { RepositoryName string `json:"repository_name" gorm:"Column:repository_name"` Vulnerability }
func (*VulnerabilitiesByRepository) ToResponseByRepository ¶
func (v *VulnerabilitiesByRepository) ToResponseByRepository() ByRepository
type VulnerabilitiesByTime ¶
type VulnerabilitiesByTime struct {
Vulnerability
}
func (*VulnerabilitiesByTime) ToResponseByTime ¶
func (v *VulnerabilitiesByTime) ToResponseByTime() ByTime
type Vulnerability ¶
type Vulnerability struct { VulnerabilityID uuid.UUID `json:"vulnerabilityID" gorm:"Column:vulnerability_id"` CreatedAt time.Time `json:"createdAt" gorm:"Column:created_at"` WorkspaceID uuid.UUID `json:"workspaceID" gorm:"Column:workspace_id"` RepositoryID uuid.UUID `json:"repositoryID" gorm:"Column:repository_id"` CriticalVulnerability int `json:"criticalVulnerability" gorm:"Column:critical_vulnerability"` CriticalFalsePositive int `json:"criticalFalsePositive" gorm:"Column:critical_false_positive"` CriticalRiskAccepted int `json:"criticalRiskAccepted" gorm:"Column:critical_risk_accepted"` CriticalCorrected int `json:"criticalCorrected" gorm:"Column:critical_corrected"` HighVulnerability int `json:"highVulnerability" gorm:"Column:high_vulnerability"` HighFalsePositive int `json:"highFalsePositive" gorm:"Column:high_false_positive"` HighRiskAccepted int `json:"highRiskAccepted" gorm:"Column:high_risk_accepted"` HighCorrected int `json:"highCorrected" gorm:"Column:high_corrected"` MediumVulnerability int `json:"mediumVulnerability" gorm:"Column:medium_vulnerability"` MediumFalsePositive int `json:"mediumFalsePositive" gorm:"Column:medium_false_positive"` MediumRiskAccepted int `json:"mediumRiskAccepted" gorm:"Column:medium_risk_accepted"` MediumCorrected int `json:"mediumCorrected" gorm:"Column:medium_corrected"` LowVulnerability int `json:"lowVulnerability" gorm:"Column:low_vulnerability"` LowFalsePositive int `json:"lowFalsePositive" gorm:"Column:low_false_positive"` LowRiskAccepted int `json:"lowRiskAccepted" gorm:"Column:low_risk_accepted"` LowCorrected int `json:"lowCorrected" gorm:"Column:low_corrected"` InfoVulnerability int `json:"infoVulnerability" gorm:"Column:info_vulnerability"` InfoFalsePositive int `json:"infoFalsePositive" gorm:"Column:info_false_positive"` InfoRiskAccepted int `json:"infoRiskAccepted" gorm:"Column:info_risk_accepted"` InfoCorrected int `json:"infoCorrected" gorm:"Column:info_corrected"` UnknownVulnerability int `json:"unknownVulnerability" gorm:"Column:unknown_vulnerability"` UnknownFalsePositive int `json:"unknownFalsePositive" gorm:"Column:unknown_false_positive"` UnknownRiskAccepted int `json:"unknownRiskAccepted" gorm:"Column:unknown_risk_accepted"` UnknownCorrected int `json:"unknownCorrected" gorm:"Column:unknown_corrected"` }
func (*Vulnerability) AddCountVulnerabilityBySeverity ¶
func (v *Vulnerability) AddCountVulnerabilityBySeverity(severity severities.Severity, vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityCritical ¶
func (v *Vulnerability) AddCountVulnerabilityCritical(vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityHigh ¶
func (v *Vulnerability) AddCountVulnerabilityHigh(vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityInfo ¶
func (v *Vulnerability) AddCountVulnerabilityInfo(vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityLow ¶
func (v *Vulnerability) AddCountVulnerabilityLow(vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityMedium ¶
func (v *Vulnerability) AddCountVulnerabilityMedium(vulnType vulnerability.Type)
func (*Vulnerability) AddCountVulnerabilityUnknown ¶
func (v *Vulnerability) AddCountVulnerabilityUnknown(vulnType vulnerability.Type)
func (*Vulnerability) ToResponseBySeverities ¶
func (v *Vulnerability) ToResponseBySeverities() *BySeverities
Source Files ¶
- filter.go
- response.go
- response_by_author.go
- response_by_language.go
- response_by_repository.go
- response_by_severities.go
- response_by_severity.go
- response_by_time.go
- response_by_vulnerability_types.go
- vulnerability_data.go
- vulns_by_author.go
- vulns_by_language.go
- vulns_by_repository.go
- vulns_by_time.go
Click to show internal directories.
Click to hide internal directories.