analyzer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TypeAnalyzer

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

TypeAnalyzer performs dependency analysis on protobuf descriptors to determine which types are reachable from target-matched RPC methods. It maintains separate tracking for input and output type contexts.

func NewTypeAnalyzer

func NewTypeAnalyzer(protoFiles []*descriptorpb.FileDescriptorProto) *TypeAnalyzer

func NewTypeAnalyzerSingle

func NewTypeAnalyzerSingle(protoFile *descriptorpb.FileDescriptorProto) *TypeAnalyzer

func (*TypeAnalyzer) AnalyzeRPCDependencies

func (ta *TypeAnalyzer) AnalyzeRPCDependencies(services []*descriptorpb.ServiceDescriptorProto, target string)

func (*TypeAnalyzer) IsEnumReachable

func (ta *TypeAnalyzer) IsEnumReachable(enumName string) bool

func (*TypeAnalyzer) IsInputReachable

func (ta *TypeAnalyzer) IsInputReachable(typeName string) bool

IsInputReachable checks if a type needs GraphQL input generation. It handles both fully qualified names

func (*TypeAnalyzer) IsOutputReachable

func (ta *TypeAnalyzer) IsOutputReachable(typeName string) bool

IsOutputReachable checks if a type needs GraphQL type generation. It handles both fully qualified names

func (*TypeAnalyzer) MarkTypeReachableAsInput

func (ta *TypeAnalyzer) MarkTypeReachableAsInput(typeName string)

MarkTypeReachableAsInput recursively marks a type and its dependencies as input-reachable. This is used for RPC input types that need GraphQL input generation.

func (*TypeAnalyzer) MarkTypeReachableAsOutput

func (ta *TypeAnalyzer) MarkTypeReachableAsOutput(typeName string)

MarkTypeReachableAsOutput recursively marks a type and its dependencies as output-reachable. This is used for RPC output types that need GraphQL type generation.

func (*TypeAnalyzer) RegisterEnums

func (ta *TypeAnalyzer) RegisterEnums(enums []*descriptorpb.EnumDescriptorProto, prefix string)

func (*TypeAnalyzer) RegisterEnumsFromFile

func (ta *TypeAnalyzer) RegisterEnumsFromFile(enums []*descriptorpb.EnumDescriptorProto, prefix string, pkgName string)

func (*TypeAnalyzer) RegisterTypes

func (ta *TypeAnalyzer) RegisterTypes(messages []*descriptorpb.DescriptorProto, prefix string)

func (*TypeAnalyzer) RegisterTypesFromFile

func (ta *TypeAnalyzer) RegisterTypesFromFile(messages []*descriptorpb.DescriptorProto, prefix string, pkgName string)

func (*TypeAnalyzer) ResolveEnumName

func (ta *TypeAnalyzer) ResolveEnumName(enumName string) string

func (*TypeAnalyzer) ResolveTypeName

func (ta *TypeAnalyzer) ResolveTypeName(typeName string) string

Jump to

Keyboard shortcuts

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