tftarget

package
v0.0.0-...-0da46e6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package tftarget is a constraint framework target for config-validator to use for integrating with the opa constraint framework.

Index

Constants

View Source
const Name = "validation.resourcechange.terraform.cloud.google.com"

Name is the target name for TFTarget

Variables

View Source
var ErrInvalidAddress = fmt.Errorf("unexpected type of address in review object")
View Source
var ErrInvalidReview = fmt.Errorf("unexpected type of review, expect map[string]interface{}")

Functions

This section is empty.

Types

type TFTarget

type TFTarget struct {
}

TFTarget is the constraint framework target for config-validator

func New

func New() *TFTarget

New returns a new TFTarget

func (*TFTarget) GetName

func (g *TFTarget) GetName() string

GetName implements handler.TargetHandler

func (*TFTarget) HandleReview

func (g *TFTarget) HandleReview(obj interface{}) (bool, interface{}, error)

HandleReview implements handler.TargetHandler

func (*TFTarget) HandleViolation

func (g *TFTarget) HandleViolation(result *types.Result) error

HandleViolation implements handler.TargetHandler

func (*TFTarget) MatchSchema

func (g *TFTarget) MatchSchema() apiextensions.JSONSchemaProps

MatchSchema implements client.MatchSchemaProvider

func (*TFTarget) ProcessData

func (g *TFTarget) ProcessData(obj interface{}) (bool, []string, interface{}, error)

ProcessData implements handler.TargetHandler

func (*TFTarget) ToMatcher

func (g *TFTarget) ToMatcher(constraint *unstructured.Unstructured) (constraints.Matcher, error)

ToMatcher implements client.ToMatcher

func (*TFTarget) ValidateConstraint

func (g *TFTarget) ValidateConstraint(constraint *unstructured.Unstructured) error

ValidateConstraint implements handler.TargetHandler

Jump to

Keyboard shortcuts

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