protoparser

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFileDesc

func ParseFileDesc(fd protoreflect.FileDescriptor, result *ParseResult)

func ParseServiceNameAndMethod

func ParseServiceNameAndMethod(fullname string) (service string, method string, err error)

func SortByDependencies

func SortByDependencies(fdSets []*descriptorpb.FileDescriptorSet) []*descriptorpb.FileDescriptorProto

Sorts filedescriptors by their dependencies so that they are in correct order for further processing.

Types

type ParseResult

type ParseResult struct {
	FileRegistry *protoregistry.Files
	TypeResolver *protoregistry.Types
	Routes       []*router.Route
	Errors       []error
}

func ParseFileDescSets

func ParseFileDescSets(fdSets []*descriptorpb.FileDescriptorSet) ParseResult

func (*ParseResult) AddError

func (r *ParseResult) AddError(err error)

func (*ParseResult) AddRoute

func (r *ParseResult) AddRoute(route *router.Route)

func (*ParseResult) ErrorsString

func (r *ParseResult) ErrorsString() string

func (*ParseResult) Ok

func (r *ParseResult) Ok() bool

Jump to

Keyboard shortcuts

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