policies

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultRegoPackage = "clouditor.metrics"

DefaultRegoPackage is the default package name for the Rego files

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(opts ...RegoEvalOption) PolicyEval

type RegoEvalOption added in v1.4.11

type RegoEvalOption func(re *regoEval)

func WithPackageName added in v1.4.11

func WithPackageName(pkg string) RegoEvalOption

WithPackageName is an option to configure the package name

type RequirementsSource added in v1.4.18

type RequirementsSource interface {
	Requirements() ([]*orchestrator.Requirement, error)
}

RequirementsSource is used to retrieve a list of requirements

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