validate

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(req request.Request) ([]byte, error)

Marshal produces the YAML encoding of a request.Request. It is not a generic marshaller - it is hand-written for exactly this struct tree, so that the WASM build doesn't need encoding/json, gopkg.in/yaml.v3, or reflect (which all three pull in). Field order, indentation (4 spaces per level), omitempty behavior, and scalar quoting are written to match gopkg.in/yaml.v3's default output for this struct - see generate_yaml_test.go, which checks that byte-for-byte.

func ValidateAllWASM

func ValidateAllWASM(htmlValues string, filePaths string) ([]byte, []string)

ValidateAllWASM is the single entry point the WASM build exposes to runner_page.js's Save JSON button: it builds the Request from the form's JSON dict, hands it to file validation so it can read Testament/text_format and populate AudioData/TextData.AWSS3 from the dropped directory, then validates the result - all within one Go call, so the two validation steps share state as plain pointer passing instead of needing any cross-WASM-call mechanism. Always marshals to YAML, even when there are errors, so the caller can save the file for debugging either way.

func ValidateRequest

func ValidateRequest(ctx context.Context, req *request.Request) []string

Types

type RequestValidator

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

func (*RequestValidator) Depend

func (r *RequestValidator) Depend(req request.Request)

func (*RequestValidator) Prereq

func (r *RequestValidator) Prereq(req *request.Request)

func (*RequestValidator) Validate

func (r *RequestValidator) Validate(req *request.Request)

Jump to

Keyboard shortcuts

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