Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOpaProvider ¶ added in v0.6.0
Types ¶
type OpaOutput ¶ added in v0.2.0
type OpaOutput struct { // optional: Specifies the JSON path to a boolean value indicating the validation result. Validation string `json:"validation" yaml:"validation"` // optional: any additional observations to include (fields must resolve to strings) Observations []string `json:"observations" yaml:"observations"` }
OpaOutput Defines the output structure for OPA validation results, including validation status and additional observations.
type OpaProvider ¶ added in v0.2.0
type OpaProvider struct { // Context is the context that the OPA policy is being evaluated in Context context.Context `json:"context" yaml:"context"` // Spec is the specification of the OPA policy Spec *OpaSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
func (OpaProvider) Evaluate ¶ added in v0.2.0
func (o OpaProvider) Evaluate(resources types.DomainResources) (types.Result, error)
type OpaSpec ¶ added in v0.2.0
type OpaSpec struct { // Required: Rego is the OPA policy Rego string `json:"rego" yaml:"rego"` // Optional: Output is the output of the OPA policy Output *OpaOutput `json:"output,omitempty" yaml:"output,omitempty"` }
OpaSpec is the specification of the OPA policy, required if the provider type is opa
Click to show internal directories.
Click to hide internal directories.