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 ¶
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.