identity

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 11 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 identity contains the validation pass over declared element identities and the workspace-wide gather it reads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contribution

type Contribution struct {
	// contains filtered or unexported fields
}

Contribution is what one gather — a document's own elements, or the `about`-annotated library elements — adds to the union.

type MetadataPass

type MetadataPass struct{}

MetadataPass validates the IdentityMetadata annotations of a document: id shape, the enclosing ProjectRef an ElementId resolves against, and effective-id uniqueness over the whole generated id space of each project scope (element ids, `_om` membership ids, `_p` expression-node ids).

func (MetadataPass) Level

func (MetadataPass) Level() kit.PassLevel

func (MetadataPass) Run

func (MetadataPass) Run(ctx *kit.Context, name string, root *ast.RootNamespace) []diag.Diagnostic

type Union

type Union struct {
	// contains filtered or unexported fields
}

Union is the identity tables of every workspace document, indexed as one id space per project scope and read by name, as oosemUnion is. The `about`-annotated elements outside every document are one more contribution.

func (*Union) Contributions

func (u *Union) Contributions() map[string]*Contribution

Contributions returns the per-document gathers the union currently holds.

func (*Union) Regather

func (u *Union) Regather(ctx *kit.Context, g *kit.Gathers, doc string, changed map[string]bool)

regather replaces doc's contribution — its own elements — with a fresh gather, none when doc is no workspace document, naming the keys it moved.

func (*Union) RegatherAbout

func (u *Union) RegatherAbout(ctx *kit.Context, g *kit.Gathers, changed map[string]bool)

regatherAbout replaces the contribution of the `about`-annotated elements no workspace document declares.

Jump to

Keyboard shortcuts

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