Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServedSchema ¶
ServedSchema composes a plugin's embedded schema as one CUE module instance: the concatenated `schema/*.cue` body of schemaFS under dir, evaluated inside the plugin's own module declaration when its FS ships `cue.mod/module.cue`, and under the derived declaration when it does not. ctx is the context the value is built in (a cue.Value is only valid inside the context that built it); nil gets a fresh one.
func ServedText ¶
ServedText composes the package-less body a plugin serves on `Capabilities.schema_cue` — the host's half of the contract, and the same source the serve side concatenates. It is the SAME compose ServedSchema runs, under the DERIVED module declaration, because the wire carries no `cue.mod/module.cue`: the host cannot be told the plugin's declaration, so the declaration must be one both sides can derive. For a plugin that ships no declaration — every plugin today — the two entry points are byte-for-byte the same compose.
Types ¶
type Instance ¶ added in v0.2026313.1428
Instance is ONE composed CUE module instance: the context its value belongs to, the loader's build instance and the built value. The two halves of the contract read the VALUE; the Go projection reads the build instance as well, because the import graph and the package attributes live there and not in the value.
func ComposeText ¶ added in v0.2026313.1428
ComposeText composes a package-less schema body under `package pkg`, in the virtual plugin module, under the DERIVED declaration, with spec served by the offline registry. It is the same compose as ServedText and is exported for the Go projection (schemaparams): a plugin's params are generated from the SAME source text the two halves of the contract judge, which is what lets that source carry `import "github.com/opencharly/spec/schema"` — the import resolves against the same offline registry, with no published CUE module and no `cue` CLI in the loop.