policies

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsSource added in v1.4.5

type MetricsSource interface {
	Metrics() ([]*assessment.Metric, error)
	MetricConfiguration(metric string) (*assessment.MetricConfiguration, error)
	MetricImplementation(lang assessment.MetricImplementation_Language, metric string) (*assessment.MetricImplementation, error)
}

MetricsSource is used to retrieve a list of metrics and to retrieve a metric configuration as well as implementation for a particular metric (and target service)

type PolicyEval added in v1.4.5

type PolicyEval interface {
	Eval(evidence *evidence.Evidence, src MetricsSource) (data []*Result, err error)
	HandleMetricEvent(event *orchestrator.MetricChangeEvent) (err error)
}

TODO(oxisto): Rename to AssessmentEngine or something?

func NewRegoEval added in v1.4.5

func NewRegoEval() PolicyEval

type Result added in v1.4.0

type Result struct {
	Applicable  bool
	Compliant   bool
	TargetValue interface{} `mapstructure:"target_value"`
	Operator    string
	MetricId    string
}

Jump to

Keyboard shortcuts

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