Documentation
¶
Index ¶
- Variables
- func ValidateCurrentExposure(result *CurrentExposure) (err error)
- func ValidateCurrentExposureView(result *CurrentExposureView) (err error)
- func ValidateExposure(result *Exposure) (err error)
- func ValidateExposureView(result *ExposureView) (err error)
- func ValidateIssueStatsCollection(result IssueStatsCollection) (err error)
- func ValidateIssueStatsCollectionView(result IssueStatsCollectionView) (err error)
- func ValidateIssueStatsView(result *IssueStatsView) (err error)
- func ValidateSeverity(result *Severity) (err error)
- func ValidateSeverityAndTotal(result *SeverityAndTotal) (err error)
- func ValidateSeverityAndTotalView(result *SeverityAndTotalView) (err error)
- func ValidateSeverityView(result *SeverityView) (err error)
- func ValidateSize(result *Size) (err error)
- func ValidateSizeView(result *SizeView) (err error)
- type CurrentExposure
- type CurrentExposureView
- type Exposure
- type ExposureView
- type IssueStatsCollection
- type IssueStatsCollectionView
- type IssueStatsView
- type Severity
- type SeverityAndTotal
- type SeverityAndTotalView
- type SeverityView
- type Size
- type SizeView
Constants ¶
This section is empty.
Variables ¶
var ( // SizeMap is a map indexing the attribute names of Size by view name. SizeMap = map[string][]string{ "default": { "sources", "targets", "issues", "findings", "finding_events", }, } // SeverityMap is a map indexing the attribute names of Severity by view name. SeverityMap = map[string][]string{ "default": { "critical", "high", "medium", "low", "informational", }, } // SeverityAndTotalMap is a map indexing the attribute names of // SeverityAndTotal by view name. SeverityAndTotalMap = map[string][]string{ "default": { "critical", "high", "medium", "low", "informational", "total", }, } // IssueStatsCollectionMap is a map indexing the attribute names of // IssueStatsCollection by view name. IssueStatsCollectionMap = map[string][]string{ "default": { "id", "summary", "cwe_id", "description", "recommendations", "reference_links", "open", "fixed", }, } // ExposureMap is a map indexing the attribute names of Exposure by view name. ExposureMap = map[string][]string{ "default": { "percentile_10", "percentile_25", "percentile_50", "percentile_75", "percentile_90", "mean", }, } // CurrentExposureMap is a map indexing the attribute names of CurrentExposure // by view name. CurrentExposureMap = map[string][]string{ "default": { "percentile_10", "percentile_25", "percentile_50", "percentile_75", "percentile_90", "mean", }, } // IssueStatsMap is a map indexing the attribute names of IssueStats by view // name. IssueStatsMap = map[string][]string{ "default": { "id", "summary", "cwe_id", "description", "recommendations", "reference_links", "open", "fixed", }, } )
Functions ¶
func ValidateCurrentExposure ¶
func ValidateCurrentExposure(result *CurrentExposure) (err error)
ValidateCurrentExposure runs the validations defined on the viewed result type CurrentExposure.
func ValidateCurrentExposureView ¶
func ValidateCurrentExposureView(result *CurrentExposureView) (err error)
ValidateCurrentExposureView runs the validations defined on CurrentExposureView using the "default" view.
func ValidateExposure ¶
ValidateExposure runs the validations defined on the viewed result type Exposure.
func ValidateExposureView ¶
func ValidateExposureView(result *ExposureView) (err error)
ValidateExposureView runs the validations defined on ExposureView using the "default" view.
func ValidateIssueStatsCollection ¶
func ValidateIssueStatsCollection(result IssueStatsCollection) (err error)
ValidateIssueStatsCollection runs the validations defined on the viewed result type IssueStatsCollection.
func ValidateIssueStatsCollectionView ¶
func ValidateIssueStatsCollectionView(result IssueStatsCollectionView) (err error)
ValidateIssueStatsCollectionView runs the validations defined on IssueStatsCollectionView using the "default" view.
func ValidateIssueStatsView ¶
func ValidateIssueStatsView(result *IssueStatsView) (err error)
ValidateIssueStatsView runs the validations defined on IssueStatsView using the "default" view.
func ValidateSeverity ¶
ValidateSeverity runs the validations defined on the viewed result type Severity.
func ValidateSeverityAndTotal ¶
func ValidateSeverityAndTotal(result *SeverityAndTotal) (err error)
ValidateSeverityAndTotal runs the validations defined on the viewed result type SeverityAndTotal.
func ValidateSeverityAndTotalView ¶
func ValidateSeverityAndTotalView(result *SeverityAndTotalView) (err error)
ValidateSeverityAndTotalView runs the validations defined on SeverityAndTotalView using the "default" view.
func ValidateSeverityView ¶
func ValidateSeverityView(result *SeverityView) (err error)
ValidateSeverityView runs the validations defined on SeverityView using the "default" view.
func ValidateSize ¶
ValidateSize runs the validations defined on the viewed result type Size.
func ValidateSizeView ¶
ValidateSizeView runs the validations defined on SizeView using the "default" view.
Types ¶
type CurrentExposure ¶
type CurrentExposure struct {
// Type to project
Projected *CurrentExposureView
// View to render
View string
}
CurrentExposure is the viewed result type that is projected based on a view.
type CurrentExposureView ¶
type CurrentExposureView struct {
// Percentile 10 of exposure
Percentile10 *float32
// Percentile 25 of exposure or first quartile
Percentile25 *float32
// Percentile 50 of exposure or median
Percentile50 *float32
// Percentile 75 of exposure or third quartile
Percentile75 *float32
// Percentile 90 of exposure
Percentile90 *float32
// Mean exposure
Mean *float32
}
CurrentExposureView is a type that runs validations on a projected type.
type Exposure ¶
type Exposure struct {
// Type to project
Projected *ExposureView
// View to render
View string
}
Exposure is the viewed result type that is projected based on a view.
type ExposureView ¶
type ExposureView struct {
// Percentile 10 of exposure
Percentile10 *float32
// Percentile 25 of exposure or first quartile
Percentile25 *float32
// Percentile 50 of exposure or median
Percentile50 *float32
// Percentile 75 of exposure or third quartile
Percentile75 *float32
// Percentile 90 of exposure
Percentile90 *float32
// Mean exposure
Mean *float32
}
ExposureView is a type that runs validations on a projected type.
type IssueStatsCollection ¶
type IssueStatsCollection struct {
// Type to project
Projected IssueStatsCollectionView
// View to render
View string
}
IssueStatsCollection is the viewed result type that is projected based on a view.
type IssueStatsCollectionView ¶
type IssueStatsCollectionView []*IssueStatsView
IssueStatsCollectionView is a type that runs validations on a projected type.
type IssueStatsView ¶
type IssueStatsView struct {
// Issue ID
ID *string
// Issue summary
Summary *string
// Common Weakness Enumeration ID
CweID *int
// Issue description
Description *string
// Recommendations to fix the issue
Recommendations []string
// Documentation reference for the issue
ReferenceLinks []string
// Number of OPEN findings for this issue
Open *int
// Number of FIXED findings for this issue
Fixed *int
}
IssueStatsView is a type that runs validations on a projected type.
type Severity ¶
type Severity struct {
// Type to project
Projected *SeverityView
// View to render
View string
}
Severity is the viewed result type that is projected based on a view.
type SeverityAndTotal ¶
type SeverityAndTotal struct {
// Type to project
Projected *SeverityAndTotalView
// View to render
View string
}
SeverityAndTotal is the viewed result type that is projected based on a view.
type SeverityAndTotalView ¶
type SeverityAndTotalView struct {
// Value for critical severity
Critical *int
// Value for high severity
High *int
// Value for medium severity
Medium *int
// Value for low severity
Low *int
// Value for informational severity
Informational *int
// Total number of issues
Total *int
}
SeverityAndTotalView is a type that runs validations on a projected type.
type SeverityView ¶
type SeverityView struct {
// Number of critial issues
Critical *int
// Number of high issues
High *int
// Number of medium issues
Medium *int
// Number of low issues
Low *int
// Number of informational issues
Informational *int
}
SeverityView is a type that runs validations on a projected type.