views

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SourceCollectionMap is a map indexing the attribute names of
	// SourceCollection by view name.
	SourceCollectionMap = map[string][]string{
		"default": {
			"id",
			"target_id",
			"name",
			"component",
			"instance",
			"options",
			"time",
		},
	}
	// SourceMap is a map indexing the attribute names of Source by view name.
	SourceMap = map[string][]string{
		"default": {
			"id",
			"target_id",
			"name",
			"component",
			"instance",
			"options",
			"time",
		},
	}
	// 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",
		},
	}
	// 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",
		},
	}
)

Functions

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

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 ValidateSource

func ValidateSource(result *Source) (err error)

ValidateSource runs the validations defined on the viewed result type Source.

func ValidateSourceCollection

func ValidateSourceCollection(result SourceCollection) (err error)

ValidateSourceCollection runs the validations defined on the viewed result type SourceCollection.

func ValidateSourceCollectionView

func ValidateSourceCollectionView(result SourceCollectionView) (err error)

ValidateSourceCollectionView runs the validations defined on SourceCollectionView using the "default" view.

func ValidateSourceView

func ValidateSourceView(result *SourceView) (err error)

ValidateSourceView runs the validations defined on SourceView 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 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 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 Source

type Source struct {
	// Type to project
	Projected *SourceView
	// View to render
	View string
}

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

type SourceCollection

type SourceCollection struct {
	// Type to project
	Projected SourceCollectionView
	// View to render
	View string
}

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

type SourceCollectionView

type SourceCollectionView []*SourceView

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

type SourceView

type SourceView struct {
	// Source ID
	ID *string
	// Target ID
	TargetID *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
}

SourceView 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