validation

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package validation provides 3-layer architecture validation for StackKits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer int

Layer represents the validation layer (1, 2, or 3)

const (
	LayerFoundation   Layer = 1
	LayerPlatform     Layer = 2
	LayerApplications Layer = 3
)

func (Layer) String

func (l Layer) String() string

String returns the string representation of a layer

type LayerError

type LayerError struct {
	Layer   Layer  `json:"layer"`
	Code    string `json:"code"`
	Message string `json:"message"`
	Field   string `json:"field,omitempty"`
	Hint    string `json:"hint,omitempty"`
}

LayerError represents a layer validation error

func (*LayerError) Error

func (e *LayerError) Error() string

Error implements the error interface

type LayerValidationResult

type LayerValidationResult struct {
	Layer    Layer        `json:"layer"`
	Valid    bool         `json:"valid"`
	Errors   []LayerError `json:"errors,omitempty"`
	Warnings []string     `json:"warnings,omitempty"`
}

LayerValidationResult contains validation results for a single layer

type LayerValidator

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

LayerValidator performs 3-layer architecture validation

func NewLayerValidator

func NewLayerValidator(baseDir string) *LayerValidator

NewLayerValidator creates a new layer validator

func (*LayerValidator) ValidateStackKit

func (v *LayerValidator) ValidateStackKit(stackkitDir string) (*StackKitValidationResult, error)

ValidateStackKit performs complete 3-layer validation

type StackKitValidationResult

type StackKitValidationResult struct {
	Valid     bool                   `json:"valid"`
	StackKit  string                 `json:"stackkit"`
	Layer1    *LayerValidationResult `json:"layer1"`
	Layer2    *LayerValidationResult `json:"layer2"`
	Layer3    *LayerValidationResult `json:"layer3"`
	AllErrors []LayerError           `json:"allErrors,omitempty"`
}

StackKitValidationResult contains complete validation results

Jump to

Keyboard shortcuts

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