engine

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationEngine

type ValidationEngine struct {
	// contains filtered or unexported fields
}

func NewValidationEngine

func NewValidationEngine(
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *ValidationEngine

func (*ValidationEngine) AddRule

func (ve *ValidationEngine) AddRule(rule *ValidationRule) error

func (*ValidationEngine) ValidateNode

func (ve *ValidationEngine) ValidateNode(
	ctx context.Context,
	node *unified.Node,
) (*ValidationResult, error)

type ValidationResult

type ValidationResult struct {
	Valid      bool
	Violations []Violation
	Warnings   []Warning
	Score      float64
	Duration   time.Duration
	Timestamp  time.Time
}

type ValidationRule

type ValidationRule struct {
	ID          string
	Name        string
	Description string
	Query       string
	Severity    string
	Category    string
	Metadata    map[string]interface{}
}

type Violation

type Violation struct {
	RuleID      string
	Message     string
	Path        string
	Severity    string
	Evidence    map[string]interface{}
	Remediation string
}

type Warning

type Warning struct {
	Message    string
	Suggestion string
	Context    map[string]interface{}
}

Jump to

Keyboard shortcuts

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