Documentation
¶
Index ¶
- Variables
- func ValidateEventCollection(result EventCollection) (err error)
- func ValidateEventCollectionView(result EventCollectionView) (err error)
- func ValidateEventView(result *EventView) (err error)
- func ValidateFinding(result *Finding) (err error)
- func ValidateFindingCollection(result FindingCollection) (err error)
- func ValidateFindingCollectionView(result FindingCollectionView) (err error)
- func ValidateFindingView(result *FindingView) (err error)
- func ValidateIssueView(result *IssueView) (err error)
- func ValidateMttr(result *Mttr) (err error)
- func ValidateMttrView(result *MttrView) (err error)
- func ValidateResourceGroupView(result *ResourceGroupView) (err error)
- func ValidateSourcewithnotargetView(result *SourcewithnotargetView) (err error)
- func ValidateTargetView(result *TargetView) (err error)
- type EventCollection
- type EventCollectionView
- type EventView
- type Finding
- type FindingCollection
- type FindingCollectionView
- type FindingView
- type IssueView
- type Mttr
- type MttrView
- type ResourceGroupView
- type SourcewithnotargetView
- type TargetView
Constants ¶
This section is empty.
Variables ¶
var ( // FindingCollectionMap is a map indexing the attribute names of // FindingCollection by view name. FindingCollectionMap = map[string][]string{ "default": { "id", "issue", "target", "source", "details", "impact_details", "status", "score", "resources", }, } // FindingMap is a map indexing the attribute names of Finding by view name. FindingMap = map[string][]string{ "default": { "id", "issue", "target", "source", "details", "impact_details", "status", "score", "resources", }, } // EventCollectionMap is a map indexing the attribute names of EventCollection // by view name. EventCollectionMap = map[string][]string{ "default": { "id", "finding_id", "source_id", "score", "time", }, } // MttrMap is a map indexing the attribute names of Mttr by view name. MttrMap = map[string][]string{ "default": { "mttr", }, } // IssueMap is a map indexing the attribute names of Issue by view name. IssueMap = map[string][]string{ "default": { "id", "summary", "cwe_id", "description", "recommendations", "reference_links", "labels", }, } // TargetMap is a map indexing the attribute names of Target by view name. TargetMap = map[string][]string{ "default": { "id", "identifier", "teams", }, } // SourcewithnotargetMap is a map indexing the attribute names of // Sourcewithnotarget by view name. SourcewithnotargetMap = map[string][]string{ "default": { "id", "name", "component", "instance", "options", "time", }, } // ResourceGroupMap is a map indexing the attribute names of ResourceGroup by // view name. ResourceGroupMap = map[string][]string{ "default": { "name", "attributes", "resources", }, } // EventMap is a map indexing the attribute names of Event by view name. EventMap = map[string][]string{ "default": { "id", "finding_id", "source_id", "score", "time", }, } )
Functions ¶
func ValidateEventCollection ¶
func ValidateEventCollection(result EventCollection) (err error)
ValidateEventCollection runs the validations defined on the viewed result type EventCollection.
func ValidateEventCollectionView ¶
func ValidateEventCollectionView(result EventCollectionView) (err error)
ValidateEventCollectionView runs the validations defined on EventCollectionView using the "default" view.
func ValidateEventView ¶
ValidateEventView runs the validations defined on EventView using the "default" view.
func ValidateFinding ¶
ValidateFinding runs the validations defined on the viewed result type Finding.
func ValidateFindingCollection ¶
func ValidateFindingCollection(result FindingCollection) (err error)
ValidateFindingCollection runs the validations defined on the viewed result type FindingCollection.
func ValidateFindingCollectionView ¶
func ValidateFindingCollectionView(result FindingCollectionView) (err error)
ValidateFindingCollectionView runs the validations defined on FindingCollectionView using the "default" view.
func ValidateFindingView ¶
func ValidateFindingView(result *FindingView) (err error)
ValidateFindingView runs the validations defined on FindingView using the "default" view.
func ValidateIssueView ¶
ValidateIssueView runs the validations defined on IssueView using the "default" view.
func ValidateMttr ¶
ValidateMttr runs the validations defined on the viewed result type Mttr.
func ValidateMttrView ¶
ValidateMttrView runs the validations defined on MttrView using the "default" view.
func ValidateResourceGroupView ¶
func ValidateResourceGroupView(result *ResourceGroupView) (err error)
ValidateResourceGroupView runs the validations defined on ResourceGroupView using the "default" view.
func ValidateSourcewithnotargetView ¶
func ValidateSourcewithnotargetView(result *SourcewithnotargetView) (err error)
ValidateSourcewithnotargetView runs the validations defined on SourcewithnotargetView using the "default" view.
func ValidateTargetView ¶
func ValidateTargetView(result *TargetView) (err error)
ValidateTargetView runs the validations defined on TargetView using the "default" view.
Types ¶
type EventCollection ¶
type EventCollection struct {
// Type to project
Projected EventCollectionView
// View to render
View string
}
EventCollection is the viewed result type that is projected based on a view.
type EventCollectionView ¶
type EventCollectionView []*EventView
EventCollectionView is a type that runs validations on a projected type.
type EventView ¶
type EventView struct {
// Finding event ID
ID *string
// Finding ID
FindingID *string
// Source ID
SourceID *string
// Finding severity score
Score *float32
// Event time
Time *string
}
EventView is a type that runs validations on a projected type.
type Finding ¶
type Finding struct {
// Type to project
Projected *FindingView
// View to render
View string
}
Finding is the viewed result type that is projected based on a view.
type FindingCollection ¶
type FindingCollection struct {
// Type to project
Projected FindingCollectionView
// View to render
View string
}
FindingCollection is the viewed result type that is projected based on a view.
type FindingCollectionView ¶
type FindingCollectionView []*FindingView
FindingCollectionView is a type that runs validations on a projected type.
type FindingView ¶
type FindingView struct {
// Finding ID
ID *string
// Issue
Issue *IssueView
// Target
Target *TargetView
// Source
Source *SourcewithnotargetView
// Finding details
Details *string
// Finding impact details
ImpactDetails *string
// Finding status. Can be 'OPEN' or 'FIXED'.
Status *string
// Finding severity score
Score *float32
// Other resources associated with the finding
Resources []*ResourceGroupView
}
FindingView is a type that runs validations on a projected type.
type IssueView ¶
type IssueView 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
// Labels associated with the issue
Labels []string
}
IssueView is a type that runs validations on a projected type.
type MttrView ¶
type MttrView struct {
Mttr *int
}
MttrView is a type that runs validations on a projected type.
type ResourceGroupView ¶
type ResourceGroupView struct {
// Name of the resource group
Name *string
// Column names of the resource group in the order that should be rendered
Attributes []string
// List containing the resource rows as hashmap
Resources []map[string]string
}
ResourceGroupView is a type that runs validations on a projected type.
type SourcewithnotargetView ¶
type SourcewithnotargetView struct {
// Source ID
ID *string
// Source name
Name *string
// Source component
Component *string
// Source instance
Instance *string
// Source options
Options *string
// Time on which the source scanned the target
Time *string
}
SourcewithnotargetView is a type that runs validations on a projected type.
type TargetView ¶
type TargetView struct {
// Target ID
ID *string
// Target identifier
Identifier *string
// List of teams associated with target
Teams []string
}
TargetView is a type that runs validations on a projected type.