Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingEntry ¶
type BindingEntry struct {
AnchorKey string
StableID string
DebugName string
CodecFingerprint string
Kind string
Class string
Persisted bool
IsAlias bool
PrimaryAnchor string
}
BindingEntry represents a single binding in the generated code.
type GenerationResult ¶
type GenerationResult struct {
Files []string
WrittenFiles []string
DeletedFiles []string
BindingsHash string
PackageCount int
TotalBindings int
}
GenerationResult contains the results of bindings generation.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates bindings files from the state manifest.
func NewGenerator ¶
func NewGenerator(config GeneratorConfig) *Generator
NewGenerator creates a new bindings generator.
func (*Generator) ComputeBindingsHash ¶
ComputeBindingsHash computes the deterministic bindings hash from manifest and setup callsites without writing generated files.
func (*Generator) Generate ¶
func (g *Generator) Generate() (*GenerationResult, error)
Generate reads the manifest and generates bindings files.
func (*Generator) GenerateToDir ¶
func (g *Generator) GenerateToDir(outputDir string) (*GenerationResult, error)
GenerateToDir generates bindings into a specified output directory.
func (*Generator) VerifyUpToDate ¶
func (g *Generator) VerifyUpToDate() (*VerifyResult, error)
VerifyUpToDate checks whether generated bindings match the current manifest.
type GeneratorConfig ¶
type GeneratorConfig struct {
ProjectDir string
ModulePath string
ManifestPath string
OutputDir string
ValidateManifestFreshness bool
}
GeneratorConfig configures the bindings generator.
type PackageBindings ¶
type PackageBindings struct {
ImportPath string
PackageName string
RelDir string
FilePath string
Bindings map[string]BindingEntry
SessionKeys map[string]SessionKeyBindingEntry
SetupCallsites map[string][]SetupCallsiteEntry
}
PackageBindings groups bindings by their Go package.
type SessionKeyBindingEntry ¶
type SessionKeyBindingEntry struct {
Name string
StableID string
CodecFingerprint string
HasDefault bool
}
SessionKeyBindingEntry represents a session key binding entry.
type SetupCallsiteEntry ¶
SetupCallsiteEntry represents a single Setup callsite for a function.
type VerifyResult ¶
VerifyResult contains the result of bindings verification.