jsonSchemaValidator

package
v1.9.22-rc Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CELDefinitionCustomKey = "CELDefinition"
View Source
const RegoDefinitionCustomKey = "regoDefinition"

Variables

View Source
var CustomKeyCELRule = jsonschema.MustCompileString("customKeyCELDefinition.json", `{
	"properties" : {
		"CELDefinition": {
			"type": "array"
		}
	}
}`)
View Source
var CustomKeyRegoRule = jsonschema.MustCompileString("customKeyRegoDefinition.json", `{
	"properties" : {
		"regoDefinition": {
			"type": "object"
		}
	}
}`)
View Source
var CustomKeyRule101 = jsonschema.MustCompileString("customKeyRule101.json", `{
	"properties" : {
		"customKeyRule101": {
			"type": "string"
		}
	}
}`)
View Source
var CustomKeyRule81 = jsonschema.MustCompileString("customKeyRule81.json", `{
	"properties" : {
		"customKeyRule81": {
			"type": "string"
		}
	}
}`)
View Source
var CustomKeyRule89 = jsonschema.MustCompileString("customKeyRule89.json", `{
	"properties" : {
		"customKeyRule89": {
			"type": "string"
		}
	}
}`)
View Source
var CustomKeyValidationErrorKeyPath = "customKeyValidationErrorKeyPath"

Functions

This section is empty.

Types

type CELDefinition added in v1.9.19

type CELDefinition struct {
	CELExpressions []CELExpression
}

type CELExpression added in v1.9.19

type CELExpression struct {
	Expression string `json:"expression"`
}

type CustomKeyCELDefinitionCompiler added in v1.9.19

type CustomKeyCELDefinitionCompiler struct{}

func (CustomKeyCELDefinitionCompiler) Compile added in v1.9.19

func (CustomKeyCELDefinitionCompiler) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

type CustomKeyCELDefinitionSchema added in v1.9.19

type CustomKeyCELDefinitionSchema []interface{}

func (CustomKeyCELDefinitionSchema) Validate added in v1.9.19

func (customKeyCELDefinitionSchema CustomKeyCELDefinitionSchema) Validate(ctx jsonschema.ValidationContext, dataValue interface{}) error

type CustomKeyRegoDefinitionCompiler added in v1.8.41

type CustomKeyRegoDefinitionCompiler struct{}

func (CustomKeyRegoDefinitionCompiler) Compile added in v1.8.41

func (CustomKeyRegoDefinitionCompiler) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

type CustomKeyRegoDefinitionSchema added in v1.8.41

type CustomKeyRegoDefinitionSchema map[string]interface{}

func (CustomKeyRegoDefinitionSchema) Validate added in v1.8.41

func (customKeyRegoDefinitionSchema CustomKeyRegoDefinitionSchema) Validate(ctx jsonschema.ValidationContext, dataValue interface{}) error

type CustomKeyRule101Compiler added in v1.8.24

type CustomKeyRule101Compiler struct{}

func (CustomKeyRule101Compiler) Compile added in v1.8.24

func (CustomKeyRule101Compiler) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

type CustomKeyRule101Schema added in v1.8.24

type CustomKeyRule101Schema map[string]interface{}

func (CustomKeyRule101Schema) Validate added in v1.8.24

func (s CustomKeyRule101Schema) Validate(ctx jsonschema.ValidationContext, dataValue interface{}) error

type CustomKeyRule81Compiler

type CustomKeyRule81Compiler struct{}

func (CustomKeyRule81Compiler) Compile

func (CustomKeyRule81Compiler) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

type CustomKeyRule81Schema

type CustomKeyRule81Schema map[string]interface{}

func (CustomKeyRule81Schema) Validate

func (s CustomKeyRule81Schema) Validate(ctx jsonschema.ValidationContext, dataValue interface{}) error

type CustomKeyRule89Compiler

type CustomKeyRule89Compiler struct{}

func (CustomKeyRule89Compiler) Compile

func (CustomKeyRule89Compiler) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

type CustomKeyRule89Schema

type CustomKeyRule89Schema map[string]interface{}

func (CustomKeyRule89Schema) Validate

func (s CustomKeyRule89Schema) Validate(ctx jsonschema.ValidationContext, dataValue interface{}) error

type Limits

type Limits struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

type RegoDefinition added in v1.8.41

type RegoDefinition struct {
	Libs []string `json:"libs"`
	Code string   `json:"code"`
}

type Requests

type Requests struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

type Resources

type Resources struct {
	Requests Requests `json:"requests"`
	Limits   Limits   `json:"limits"`
}

type Rules101 added in v1.8.24

type Rules101 struct {
	ApiGroups []string `json:"apiGroups"`
	Resources []string `json:"resources"`
	Verbs     []string `json:"verbs"`
}

Jump to

Keyboard shortcuts

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