parser

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 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 method name.
	Name string

	// StreamsRequest defines if method accept stream input.
	StreamsRequest bool

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

	// StreamsReturns defines if method streams result.
	StreamsReturns bool

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

Method describes 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.

Jump to

Keyboard shortcuts

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