gcptarget

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: 15 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const Name = "validation.gcp.forsetisecurity.org"

Name is the target name for GCPTarget

Variables

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

Functions

This section is empty.

Types

type GCPTarget

type GCPTarget struct {
}

GCPTarget is the constraint framework target for CAI asset data

func New

func New() *GCPTarget

New returns a new GCPTarget

func (*GCPTarget) GetName

func (g *GCPTarget) GetName() string

GetName implements handler.TargetHandler

func (*GCPTarget) HandleReview

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

HandleReview implements handler.TargetHandler

func (*GCPTarget) HandleViolation

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

HandleViolation implements handler.TargetHandler

func (*GCPTarget) MatchSchema

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

MatchSchema implements client.MatchSchemaProvider

func (*GCPTarget) ProcessData

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

ProcessData implements handler.TargetHandler

func (*GCPTarget) ToMatcher

func (h *GCPTarget) ToMatcher(constraint *unstructured.Unstructured) (constraints.Matcher, error)

ToMatcher converts .spec.match in mutators to Matcher.

func (*GCPTarget) ValidateConstraint

func (g *GCPTarget) 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