validation

package
v0.0.0-...-6c3c9e0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidStructure         = errors.New("invalid app bundle structure")
	ErrMissingAppIndex          = errors.New("missing app/index.html")
	ErrInvalidFormStructure     = errors.New("invalid form structure")
	ErrInvalidRendererStructure = errors.New("invalid renderer structure")
	ErrMissingRendererReference = errors.New("missing renderer reference")
	ErrInvalidJSON              = errors.New("invalid JSON")
	ErrInvalidExtension         = errors.New("invalid extension file")
	ErrMissingExtensionModule   = errors.New("missing extension module")
	ErrInvalidExtensionRenderer = errors.New("invalid extension renderer")
)

Functions

func GetBundleInfo

func GetBundleInfo(bundlePath string) (map[string]interface{}, error)

GetBundleInfo returns basic information about the bundle

func ValidateBundle

func ValidateBundle(bundlePath string) error

ValidateBundle validates the structure and content of an app bundle ZIP file

Types

type ExtensionDefinition

type ExtensionDefinition struct {
	Version     string                 `json:"version,omitempty"`
	Description string                 `json:"description,omitempty"`
	Schemas     map[string]interface{} `json:"schemas,omitempty"`
	Definitions map[string]interface{} `json:"definitions,omitempty"` // Legacy support
	Functions   map[string]interface{} `json:"functions,omitempty"`
	Renderers   map[string]interface{} `json:"renderers,omitempty"`
}

ExtensionDefinition represents the structure of an ext.json file

type ExtensionModuleReference

type ExtensionModuleReference struct {
	Path   string `json:"path"`
	Export string `json:"export"`
}

ExtensionModuleReference represents a module reference with path and export

type ExtensionRenderer

type ExtensionRenderer struct {
	Renderer *ExtensionModuleReference `json:"renderer,omitempty"`
	Tester   *ExtensionModuleReference `json:"tester,omitempty"`
	// Legacy fields for backward compatibility
	Name   string `json:"name,omitempty"`
	Format string `json:"format,omitempty"`
	Module string `json:"module,omitempty"`
}

ExtensionRenderer represents a renderer definition in ext.json (v1 format) In v1 format, the renderer key (e.g., "CustomText") is the format/name

Jump to

Keyboard shortcuts

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