Documentation
¶
Overview ¶
Package compiler converts canonical component parameters and Go input types into immutable Bindly plans and codec bindings. It does not execute handlers or compile reader plans.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBindingSpecs ¶
func BuildBindingSpecs(component *spec.Component, inputType reflect.Type, codecs map[string]ParamCodec) ([]bindly.BindingSpec, error)
BuildBindingSpecs compiles package tags and component parameter metadata into Bindly's single registration-time binding model. Component metadata overrides matching tag metadata; tags can complete an omitted source name only when both sources use the same kind.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler builds canonical binding metadata and route-effective input contracts from one resolved component contract.
func (*Compiler) CompileBindings ¶
func (c *Compiler) CompileBindings() ([]bindly.BindingSpec, error)
CompileBindings builds codec-aware binding metadata without requiring route exposure. SQL reader compilation consumes this phase directly.
type OutputBindingCompiler ¶
OutputBindingCompiler compiles selected runtime metadata slots through the same canonical field/tag resolver as input contracts. It creates no invocation state.
func (OutputBindingCompiler) CompileBindings ¶
func (c OutputBindingCompiler) CompileBindings() ([]bindly.BindingSpec, error)
type ParamCodec ¶
ParamCodec keeps the provider-facing source contract beside the executable codec so plan compilation cannot discard either half of the transformation.
type ParamCodecCompiler ¶
type ParamCodecCompiler struct {
Component *spec.Component
InputType reflect.Type
Factory xcodec.Factory
Resources fs.FS
LookupType func(string) (reflect.Type, error)
}
ParamCodecCompiler resolves codec source contracts before constructing their executable transformations.
func (ParamCodecCompiler) Build ¶
func (c ParamCodecCompiler) Build() (map[string]ParamCodec, error)
type Result ¶
type Result struct {
Bindings []bindly.BindingSpec
Input *registry.InputContract
}