enginecontract

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 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

Overview

Package enginecontract reads the vendored engine-contract.json: the qualified names in the extension libraries that the engine binds to. Tests in internal/ and tests/hygiene share it so the manifest is parsed the same way everywhere it gates.

Index

Constants

View Source
const (
	KindPackage  = "package"
	KindFunction = "function"
	KindMetadata = "metadata"
	KindDocument = "document"
	KindElement  = "element"
)

Kinds are the manifest's entry kinds.

View Source
const Dir = "OpenSysML Libraries"

Dir is the vendored directory inside the bundled library that the upstream files map to.

View Source
const File = Dir + "/engine-contract.json"

File is the manifest inside Dir.

Variables

This section is empty.

Functions

func Packages

func Packages(src Source) ([]string, error)

Packages lists the extension package names the vendored directory carries: the stems of its .sysml and .kerml files.

Types

type Entry

type Entry struct {
	Name       string   `json:"name"`
	Kind       string   `json:"kind"`
	Parameters []string `json:"parameters"`
	Attributes []string `json:"attributes"`
}

Entry is one manifest record.

type Manifest

type Manifest struct {
	Contract int     `json:"contract"`
	Entries  []Entry `json:"entries"`
}

Manifest is the parsed engine-contract.json.

func Load

func Load(src Source) (Manifest, error)

Load reads and validates the manifest from src.

func (Manifest) ByName

func (m Manifest) ByName() map[string]Entry

ByName indexes the manifest's entries by their qualified name.

type Source

type Source interface {
	List() []string
	Read(name string) ([]byte, error)
}

Source reads the bundled library the way libs.Source does.

Jump to

Keyboard shortcuts

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