Help us shape the future of Go! Take the 2026 Go Developer Survey

protobufbinding

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package protobufbinding projects supported generated-language APIs onto canonical Protobuf declarations. It reads only repository-owned schema and generator configuration; it never executes a generator or reads ignored output as an authority.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSemanticInput

func IsSemanticInput(path string) bool

Types

type Config

type Config struct {
	Path        string
	Line        int
	Projections []Projection
	Diagnostics []graph.Diagnostic
}

type GeneratedFile

type GeneratedFile struct {
	Path       string
	Language   string
	Generator  string
	Version    string
	Adapter    string
	Source     string
	ConfigPath string
}

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader() *Loader

func (*Loader) Load

func (l *Loader) Load(ctx context.Context, input parserapi.Input) (Registry, error)

func (*Loader) SemanticKey

func (l *Loader) SemanticKey(ctx context.Context, input parserapi.Input) (string, error)

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(loader *Loader) *Parser

func (*Parser) Language

func (*Parser) Language() string

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, input parserapi.Input) (graph.ParseResult, error)

func (*Parser) SemanticAffectedPaths

func (*Parser) SemanticAffectedPaths(allPaths, changedPaths []string) []string

func (*Parser) SemanticKey

func (p *Parser) SemanticKey(ctx context.Context, input parserapi.Input) (string, error)

func (*Parser) Supports

func (*Parser) Supports(path string) bool

type Projection

type Projection struct {
	Node          graph.Node
	CanonicalID   string
	Canonical     string
	CanonicalKind graph.NodeKind
	Properties    map[string]string
}

type Registry

type Registry struct {
	Digest  string
	Configs map[string]Config
	Outputs map[string]GeneratedFile
	// contains filtered or unexported fields
}

func (Registry) Config

func (r Registry) Config(path string) (Config, bool)

func (Registry) ConfiguredOutput

func (r Registry) ConfiguredOutput(path, language string) bool

ConfiguredOutput reports whether configuration claims path for language, including a path rejected from Outputs because conflicting configurations claimed it differently. Consumers use this broader provenance only to avoid treating generated implementations as application behavior; GeneratedFile remains the stricter corroboration contract for suppressing all declarations.

func (Registry) GeneratedFile

func (r Registry) GeneratedFile(path, language string, content []byte) (GeneratedFile, bool, string)

GeneratedFile returns corroborated output provenance for path. Content is deliberately checked here so a path configured as output is not enough to suppress an ordinary handwritten file.

Jump to

Keyboard shortcuts

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