views

package
v1.1.33 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IssueCollectionMap is a map indexing the attribute names of IssueCollection
	// by view name.
	IssueCollectionMap = map[string][]string{
		"default": {
			"id",
			"summary",
			"cwe_id",
			"description",
			"recommendations",
			"reference_links",
			"labels",
		},
	}
	// IssueSummaryCollectionMap is a map indexing the attribute names of
	// IssueSummaryCollection by view name.
	IssueSummaryCollectionMap = map[string][]string{
		"default": {
			"issue_id",
			"summary",
			"targets_count",
			"resources_count",
			"max_score",
		},
	}
	// 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",
		},
	}
	// 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",
		},
	}
	// IssueSummaryMap is a map indexing the attribute names of IssueSummary by
	// view name.
	IssueSummaryMap = map[string][]string{
		"default": {
			"issue_id",
			"summary",
			"targets_count",
			"resources_count",
			"max_score",
		},
	}
	// 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",
		},
	}
)

Functions

func ValidateFinding

func ValidateFinding(result *Finding) (err error)

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 ValidateIssue

func ValidateIssue(result *Issue) (err error)

ValidateIssue runs the validations defined on the viewed result type Issue.

func ValidateIssueCollection

func ValidateIssueCollection(result IssueCollection) (err error)

ValidateIssueCollection runs the validations defined on the viewed result type IssueCollection.

func ValidateIssueCollectionView

func ValidateIssueCollectionView(result IssueCollectionView) (err error)

ValidateIssueCollectionView runs the validations defined on IssueCollectionView using the "default" view.

func ValidateIssueSummaryCollection

func ValidateIssueSummaryCollection(result IssueSummaryCollection) (err error)

ValidateIssueSummaryCollection runs the validations defined on the viewed result type IssueSummaryCollection.

func ValidateIssueSummaryCollectionView

func ValidateIssueSummaryCollectionView(result IssueSummaryCollectionView) (err error)

ValidateIssueSummaryCollectionView runs the validations defined on IssueSummaryCollectionView using the "default" view.

func ValidateIssueSummaryView

func ValidateIssueSummaryView(result *IssueSummaryView) (err error)

ValidateIssueSummaryView runs the validations defined on IssueSummaryView using the "default" view.

func ValidateIssueView

func ValidateIssueView(result *IssueView) (err error)

ValidateIssueView runs the validations defined on IssueView 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 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 Issue

type Issue struct {
	// Type to project
	Projected *IssueView
	// View to render
	View string
}

Issue is the viewed result type that is projected based on a view.

type IssueCollection

type IssueCollection struct {
	// Type to project
	Projected IssueCollectionView
	// View to render
	View string
}

IssueCollection is the viewed result type that is projected based on a view.

type IssueCollectionView

type IssueCollectionView []*IssueView

IssueCollectionView is a type that runs validations on a projected type.

type IssueSummaryCollection

type IssueSummaryCollection struct {
	// Type to project
	Projected IssueSummaryCollectionView
	// View to render
	View string
}

IssueSummaryCollection is the viewed result type that is projected based on a view.

type IssueSummaryCollectionView

type IssueSummaryCollectionView []*IssueSummaryView

IssueSummaryCollectionView is a type that runs validations on a projected type.

type IssueSummaryView

type IssueSummaryView struct {
	// Issue ID
	IssueID *string
	// Issue summary
	Summary *string
	// Number of affected targets for issue
	TargetsCount *int
	// Number of affected resources for issue
	ResourcesCount *int
	// Max score for issue
	MaxScore *float32
}

IssueSummaryView 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 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.

Jump to

Keyboard shortcuts

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