Documentation
¶
Overview ¶
Package identity contains the validation pass over declared element identities and the workspace-wide gather it reads.
Index ¶
- func Contributors(ctx *kit.Context, name string) ([]string, bool)
- type Contribution
- type MetadataPass
- type Union
- func (u *Union) Contributions() map[string]*Contribution
- func (u *Union) Contributors(name string) ([]string, bool)
- func (u *Union) Regather(ctx *kit.Context, g *kit.Gathers, doc string, changed map[string]bool)
- func (u *Union) RegatherAbout(ctx *kit.Context, g *kit.Gathers, changed map[string]bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) Contributors ¶ added in v0.9.2
Contributors implements kit.ContributorNamer: a document's identity judgment depends on the document and on every document contributing an identity, and the judgments as a whole on the contributors alone.