validator

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReport

func BuildReport(resultPtr *rego.ResultSet, validationConfig c.ValidationConfiguration, reportConfig c.ReportConfiguration) (string, error)

func CloseEventChan

func CloseEventChan(eventChan *chan e.Event)

func CompileRego

func CompileRego(regoUnit *generator.RegoUnit, eventChan *chan e.Event) (*rego.PreparedEvalQuery, error)

func DialectInstance

func DialectInstance(report *types.ObjectMap, context *types.ObjectMap) []types.ObjectMap

func Encode

func Encode(data any) string

func GenerateRego

func GenerateRego(profileText string, debug bool, eventChan *chan e.Event) (*generator.RegoUnit, error)

func Index

func Index(json any) any

func Normalize

func Normalize(json any) any

func ProcessInput

func ProcessInput(jsonldText string, debug bool, receiver *chan e.Event) (any, error)

func ProcessProfile

func ProcessProfile(profileText string, debug bool, eventChan *chan e.Event) (*rego.PreparedEvalQuery, error)

func Validate

func Validate(profileText string, jsonldText string, debug bool, eventChan *chan e.Event) (string, error)

func ValidateCompiled

func ValidateCompiled(compiledRegoPtr *rego.PreparedEvalQuery, jsonldText string, debug bool, eventChan *chan e.Event) (string, error)

func ValidateCompiledWithConfiguration added in v1.5.0

func ValidateCompiledWithConfiguration(compiledRegoPtr *rego.PreparedEvalQuery, jsonldText string, debug bool, eventChan *chan e.Event, validationConfig c.ValidationConfiguration, reportConfig c.ReportConfiguration) (string, error)

func ValidateWithConfiguration added in v1.5.0

func ValidateWithConfiguration(profileText string, jsonldText string, debug bool, eventChan *chan e.Event, validationConfig c.ValidationConfiguration, reportConfig c.ReportConfiguration) (string, error)

func ValidationReportNode

func ValidationReportNode(profileName string, results []any, conforms bool, validationConfig c.ValidationConfiguration, reportConfig c.ReportConfiguration) types.ObjectMap

Types

type LocationIndex

type LocationIndex struct {
	DefaultLocation string
	IdToLocation    types.StringMap
}

func (*LocationIndex) Location

func (locIndex *LocationIndex) Location(id string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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