Help us shape the future of Go! Take the 2026 Go Developer Survey

sysmlmetamodel

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

ENGMODEL-OWNER-UNIT: FU-MODEL-LOADER

Index

Constants

View Source
const InventorySchemaVersion = "1"

Variables

This section is empty.

Functions

func CheckCoverage

func CheckCoverage(inventory Inventory, inventoryBytes []byte, coverage Coverage) error

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func CheckCoverageWithoutHash

func CheckCoverageWithoutHash(inventory Inventory, coverage Coverage) error

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func GenerateCUE

func GenerateCUE(inventory Inventory, coverage Coverage) ([]byte, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func GenerateRegistry

func GenerateRegistry(inventory Inventory, coverage Coverage) ([]byte, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func Marshal

func Marshal(value any) ([]byte, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func VerifySource

func VerifySource(source Source, data []byte) error

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

Types

type Counts

type Counts struct {
	Packages            int `json:"packages"`
	Metaclasses         int `json:"metaclasses"`
	AbstractMetaclasses int `json:"abstractMetaclasses"`
	Relationships       int `json:"relationships"`
	OwnedProperties     int `json:"ownedProperties"`
	InheritedProperties int `json:"inheritedProperties"`
	DerivedProperties   int `json:"derivedProperties"`
	InheritanceEdges    int `json:"inheritanceEdges"`
}

type Coverage

type Coverage struct {
	SchemaVersion string          `json:"schemaVersion"`
	Baseline      string          `json:"baseline"`
	InventoryHash string          `json:"inventorySha256"`
	Entries       []CoverageEntry `json:"entries"`
	Counts        CoverageCounts  `json:"counts"`
}

func BootstrapCoverage

func BootstrapCoverage(inventory Inventory, inventoryBytes []byte) Coverage

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func LoadCoverage

func LoadCoverage(path string) (Coverage, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func RebindCoverage

func RebindCoverage(inventory Inventory, inventoryBytes []byte, coverage Coverage) (Coverage, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

type CoverageCounts

type CoverageCounts struct {
	Mapped        int `json:"mapped"`
	Derived       int `json:"derived"`
	Unimplemented int `json:"unimplemented"`
}

type CoverageEntry

type CoverageEntry struct {
	ID      string   `json:"id"`
	Kind    string   `json:"kind"`
	Status  string   `json:"status"`
	Aliases []string `json:"aliases,omitempty"`
	Reason  string   `json:"reason,omitempty"`
}

type FormalRelease

type FormalRelease struct {
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	Commit     string `json:"commit"`
	URL        string `json:"url"`
	Authority  string `json:"authority"`
}

type InheritanceEdge

type InheritanceEdge struct {
	Sub   string `json:"sub"`
	Super string `json:"super"`
}

type Inventory

type Inventory struct {
	SchemaVersion      string            `json:"schemaVersion"`
	Baseline           string            `json:"baseline"`
	Authority          string            `json:"authority"`
	FormalRelease      FormalRelease     `json:"formalRelease"`
	SourceManifestHash string            `json:"sourceManifestSha256"`
	Sources            []InventorySource `json:"sources"`
	Packages           []Package         `json:"packages"`
	Inheritance        []InheritanceEdge `json:"inheritance"`
	Metaclasses        []Metaclass       `json:"metaclasses"`
	Counts             Counts            `json:"counts"`
}

func Build

func Build(manifest Manifest, manifestBytes []byte, sourceData map[string][]byte) (Inventory, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func DecodeInventory

func DecodeInventory(r io.Reader) (Inventory, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

func LoadInventory

func LoadInventory(path string) (Inventory, []byte, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

type InventorySource

type InventorySource struct {
	ID      string `json:"id"`
	Origin  string `json:"origin"`
	Package string `json:"package"`
	Path    string `json:"path"`
	URL     string `json:"url"`
	SHA256  string `json:"sha256"`
}

type Manifest

type Manifest struct {
	SchemaVersion      string        `json:"schemaVersion"`
	Baseline           string        `json:"baseline"`
	FormalRelease      FormalRelease `json:"formalRelease"`
	MetamodelAuthority string        `json:"metamodelAuthority"`
	Sources            []Source      `json:"sources"`
}

func LoadManifest

func LoadManifest(path string) (Manifest, []byte, error)

TRLC-LINKS: REQ-EMG-038, REQ-EMG-039

type Metaclass

type Metaclass struct {
	ID                  string        `json:"id"`
	Name                string        `json:"name"`
	Origin              string        `json:"origin"`
	Package             string        `json:"package"`
	Abstract            bool          `json:"abstract,omitempty"`
	Relationship        bool          `json:"relationship,omitempty"`
	Supertypes          []string      `json:"supertypes,omitempty"`
	OwnedProperties     []Property    `json:"ownedProperties,omitempty"`
	InheritedProperties []string      `json:"inheritedProperties,omitempty"`
	RelationshipEnds    []PropertyRef `json:"relationshipEnds,omitempty"`
}

type Multiplicity

type Multiplicity struct {
	Lower int `json:"lower"`
	Upper int `json:"upper"`
}

type Package

type Package struct {
	Name   string `json:"name"`
	Origin string `json:"origin"`
	NSURI  string `json:"nsURI"`
}

type Property

type Property struct {
	ID           string       `json:"id"`
	Name         string       `json:"name"`
	Origin       string       `json:"origin"`
	Kind         string       `json:"kind"`
	Type         string       `json:"type"`
	Multiplicity Multiplicity `json:"multiplicity"`
	Ordered      bool         `json:"ordered"`
	Unique       bool         `json:"unique"`
	Derived      bool         `json:"derived,omitempty"`
	Transient    bool         `json:"transient,omitempty"`
	Volatile     bool         `json:"volatile,omitempty"`
	Containment  bool         `json:"containment,omitempty"`
	Opposite     string       `json:"opposite,omitempty"`
	Subsets      []string     `json:"subsets,omitempty"`
	Redefines    []string     `json:"redefines,omitempty"`
}

type PropertyRef

type PropertyRef struct {
	DeclaringMetaclass string `json:"declaringMetaclass"`
	Property           string `json:"property"`
	Role               string `json:"role"`
	Type               string `json:"type"`
}

type Source

type Source struct {
	ID         string `json:"id"`
	Origin     string `json:"origin"`
	Package    string `json:"package"`
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	Commit     string `json:"commit"`
	Path       string `json:"path"`
	URL        string `json:"url"`
	SHA256     string `json:"sha256"`
}

Jump to

Keyboard shortcuts

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