parser

package
v5.2.20 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method struct {
	// Name is a method name.
	Name string

	// StreamsRequest defines if the method accepts stream input.
	StreamsRequest bool

	// RequestType defines the message name (from the same package) of method input.
	RequestType string

	// StreamsReturns defines if method streams result.
	StreamsReturns bool

	// ReturnsType defines the message name (from the same package) of the method return value.
	ReturnsType string
}

Method describes a singular RPC method.

type Service

type Service struct {
	// Package defines service namespace.
	Package string

	// Name defines service name.
	Name string

	// Methods list.
	Methods []Method
}

Service contains information about singular GRPC service.

func Bytes

func Bytes(data []byte) ([]Service, error)

Bytes parses string into proto definition.

func File

func File(file string, importPath string) ([]Service, error)

File parses given proto file or returns error.

func FileNoImports added in v5.2.9

func FileNoImports(file string) ([]Service, error)

Jump to

Keyboard shortcuts

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