jsonengine

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() engine.Engine[Request, Response]

Types

type PolicyResponse

type PolicyResponse struct {
	Policy *v1alpha1.ValidatingPolicy
	Rules  []RuleResponse
}

type PolicyResult

type PolicyResult string

PolicyResult specifies state of a policy result

const (
	StatusPass PolicyResult = "pass"
	StatusFail PolicyResult = "fail"
	// StatusWarn  PolicyResult = "warn"
	StatusError PolicyResult = "error"
)

type Request

type Request struct {
	Resource any
	Policies []*v1alpha1.ValidatingPolicy
}

type Response

type Response struct {
	Resource any
	Policies []PolicyResponse
}

type RuleResponse

type RuleResponse struct {
	Rule       v1alpha1.ValidatingRule
	Identifier string
	Error      error
	Violations matching.Results
}

Jump to

Keyboard shortcuts

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