descriptor

package
v0.1.0-preview.8 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package descriptor statically decodes annotation SDK descriptor functions from the compiler's single typed Go program.

@NamedInterface("descriptor")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespaceReferences

func NamespaceReferences(
	program *load.Program,
	packages []string,
) ([]annotation.DefinitionReference, error)

NamespaceReferences discovers every exported descriptor function from explicitly namespace-imported packages in the existing typed program. It recognizes only exact func() sdk.Definition signatures and executes no code.

Types

type Descriptor

type Descriptor struct {
	Definition    sdk.Definition
	Handler       sdk.Symbol
	Package       string
	Symbol        string
	Documentation string
	Position      token.Position
	Provenance    annotation.ModuleProvenance
}

Descriptor is one validated public annotation definition and its real Go source location.

func Decode

func Decode(
	program *load.Program,
	packagePath string,
	symbolName string,
) (Descriptor, error)

Decode resolves and statically decodes one descriptor function. No package initializer or function body is executed.

func DecodeAll

func DecodeAll(
	program *load.Program,
	references []annotation.DefinitionReference,
) ([]Descriptor, error)

DecodeAll resolves a deterministic reference set and rejects canonical-name ambiguity across descriptor packages.

func (Descriptor) RegistryDefinition

func (descriptor Descriptor) RegistryDefinition() (annotation.Definition, error)

RegistryDefinition adapts the rich public SDK descriptor to the compiler's current generic invocation-validation model.

Jump to

Keyboard shortcuts

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