Documentation
¶
Overview ¶
Package types defines types for constraint validation results.
Index ¶
Constants ¶
View Source
const (
// TracingDisabledHeader is the message shown when tracing is disabled.
TracingDisabledHeader = "Trace: TRACING DISABLED"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
Response is a collection of Constraint violations for a particular Target. Each Result represents a violation for a distinct Constraint.
type Responses ¶
type Responses struct {
ByTarget map[string]*Response
Handled map[string]bool
StatsEntries []*instrumentation.StatsEntry
}
Responses aggregates Response objects across multiple targets.
func (*Responses) HandledCount ¶
HandledCount returns the number of targets that were handled.
type Result ¶
type Result struct {
// Target is the target this violation is for.
Target string `json:"target"`
Msg string `json:"msg,omitempty"`
// Metadata includes the contents of `details` from the Rego rule signature
Metadata map[string]interface{} `json:"metadata,omitempty"`
// The constraint that was violated
Constraint *unstructured.Unstructured `json:"constraint,omitempty"`
// The enforcement action of the constraint
EnforcementAction string `json:"enforcementAction,omitempty"`
// The scoped actions of the constraint
ScopedEnforcementActions []string `json:"scopedActions,omitempty"`
}
Result represents a single constraint violation result.
Click to show internal directories.
Click to hide internal directories.