schema

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package schema loads Mache topology schemas from bundled presets or files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailablePresets

func AvailablePresets() []string

AvailablePresets returns the sorted names of all bundled schemas.

func ParseTopology

func ParseTopology(data []byte) (*api.Topology, error)

ParseTopology decodes a topology schema.

Types

type Resolution

type Resolution struct {
	Topology  *api.Topology
	Languages []string
}

Resolution is a loaded topology plus language identity known from its reference. Languages is populated for language presets because the preset JSON intentionally carries no Node.Language filters.

func LoadPreset

func LoadPreset(name string) (*Resolution, error)

LoadPreset loads a bundled schema by name.

func Resolve

func Resolve(ref, baseDir string) (*Resolution, error)

Resolve loads a preset name, absolute schema path, or schema path relative to baseDir. Relative paths must remain inside baseDir after symlink resolution. An empty ref resolves to an empty Resolution.

Jump to

Keyboard shortcuts

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