validate

package module
v0.0.0-...-e08072f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const NamespaceURI = "github.com/agentflare-ai/agentml-go/validate"

Variables

This section is empty.

Functions

func Loader

func Loader() agentml.NamespaceLoader

Loader returns a NamespaceLoader for the validate namespace. This allows SCXML documents to validate AML content.

Usage in SCXML:

<scxml xmlns:validate="github.com/agentflare-ai/agentml-go/validate">
  <!-- Validate inline content -->
  <validate:content content="&lt;agentml&gt;...&lt;/agentml&gt;" location="result" />
  <!-- Validate content from data model -->
  <validate:content contentexpr="generatedCode" location="result" strict="false" />
</scxml>

Types

type Namespace

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

func (*Namespace) Handle

func (n *Namespace) Handle(ctx context.Context, el xmldom.Element) (bool, error)

func (*Namespace) URI

func (n *Namespace) URI() string

func (*Namespace) Unload

func (n *Namespace) Unload(ctx context.Context) error

type ValidationResult

type ValidationResult struct {
	Valid        bool                   `json:"valid"`
	ErrorCount   int                    `json:"error_count"`
	WarningCount int                    `json:"warning_count"`
	InfoCount    int                    `json:"info_count"`
	Diagnostics  []validator.Diagnostic `json:"diagnostics"`
}

ValidationResult represents the result of validating AML content

Jump to

Keyboard shortcuts

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