validate

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package validate checks run directories for structural and data integrity before they are submitted for upload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name   string      `json:"name"`
	Status CheckStatus `json:"status"`
	Error  string      `json:"error,omitempty"`
}

Check represents a single validation check result.

type CheckStatus

type CheckStatus string

CheckStatus represents the outcome of a validation check.

const (
	// StatusPassed indicates the check completed without errors.
	StatusPassed CheckStatus = "passed"
	// StatusFailed indicates the check detected an error.
	StatusFailed CheckStatus = "failed"
	// StatusSkipped indicates the check was not run because a prerequisite failed.
	StatusSkipped CheckStatus = "skipped"
)

type Result

type Result struct {
	Valid    bool     `json:"valid"`
	RunID    string   `json:"run_id,omitempty"`
	RunDir   string   `json:"run_dir"`
	Checks   []Check  `json:"checks"`
	Errors   []string `json:"errors"`
	Warnings []string `json:"warnings,omitempty"`
}

Result contains the full validation outcome for a run directory.

type Validator

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

Validator performs validation checks on a run directory.

func New

func New(runDir string) *Validator

New creates a new Validator for the given run directory.

func (*Validator) Run

func (v *Validator) Run() Result

Run executes all validation checks and returns the result.

Jump to

Keyboard shortcuts

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