validate

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBytes

func ValidateBytes(data []byte, docType DocType, strict bool) (*Result, DocType, error)

func ValidateFile

func ValidateFile(path string, docType DocType, strict bool) (*Result, DocType, error)

Types

type DocType

type DocType int
const (
	Unknown DocType = iota
	PluginDoc
	MappingDoc
	MCPDoc
)

func DetectTypeFromContent

func DetectTypeFromContent(data []byte) DocType

func DetectTypeFromFilename

func DetectTypeFromFilename(name string) DocType

func (DocType) String

func (d DocType) String() string

type Issue

type Issue struct {
	Severity Severity
	Path     string
	Message  string
}

func (Issue) String

func (i Issue) String() string

type Result

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

func ValidateDirectory

func ValidateDirectory(dir string, strict bool) (*Result, error)

func ValidateMCP

func ValidateMCP(ctx context.Context, binary string, args ...string) (*Result, error)

func (*Result) Errors

func (r *Result) Errors() []Issue

func (*Result) HasErrors

func (r *Result) HasErrors() bool

func (*Result) HasWarnings

func (r *Result) HasWarnings() bool

func (*Result) Issues

func (r *Result) Issues() []Issue

func (*Result) Warnings

func (r *Result) Warnings() []Issue

type Severity

type Severity int
const (
	Error Severity = iota
	Warning
	Info
)

func (Severity) String

func (s Severity) String() string

Source Files

  • detect.go
  • mapping.go
  • mcp.go
  • plugin.go
  • types.go
  • validate.go

Jump to

Keyboard shortcuts

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