schema

package
v0.0.0-...-c2efb00 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "Rego"

Name is the name of the driver.

Variables

View Source
var (
	ErrBadType      = errors.New("Could not recognize the type")
	ErrMissingField = errors.New("Rego source missing required field")
)

Functions

This section is empty.

Types

type Source

type Source struct {
	// Rego holds the main code for the constraint template. The `Violations` rule is the entry point.
	Rego string `json:"rego,omitempty"`
	// Libs holds supporting code for the main rego library. Modules can be imported from `data.libs`.
	Libs []string `json:"libs,omitempty"`
}

func GetSource

func GetSource(code templates.Code) (*Source, error)

func (*Source) ToUnstructured

func (in *Source) ToUnstructured() map[string]interface{}

Jump to

Keyboard shortcuts

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