validate

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK      = "ok"
	StatusFailed  = "failed"
	StatusWarning = "warning"
)

Variables

This section is empty.

Functions

func SortResults

func SortResults(results []Result)

func WriteReports

func WriteReports(out io.Writer, reports []Report, format string) error

Types

type Report

type Report struct {
	Context     string   `json:"context" yaml:"context"`
	Site        string   `json:"site,omitempty" yaml:"site,omitempty"`
	Plugin      string   `json:"plugin,omitempty" yaml:"plugin,omitempty"`
	Environment string   `json:"environment,omitempty" yaml:"environment,omitempty"`
	Valid       bool     `json:"valid" yaml:"valid"`
	Results     []Result `json:"results" yaml:"results"`
}

func NewReport

func NewReport(ctx *config.Context, results []Result) Report

type Result

type Result struct {
	Name    string `json:"name" yaml:"name"`
	Status  string `json:"status" yaml:"status"`
	Detail  string `json:"detail,omitempty" yaml:"detail,omitempty"`
	FixHint string `json:"fix_hint,omitempty" yaml:"fix_hint,omitempty"`
}

func Run

func Run(ctx *config.Context, validators ...Validator) ([]Result, error)

type Validator

type Validator func(*config.Context) ([]Result, error)

func CoreValidators

func CoreValidators(cfg *config.Config) []Validator

Jump to

Keyboard shortcuts

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