protofiles

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package protofiles reads a gateway's RPC methods from .proto files: it compiles them in memory and returns each method that carries a method option named by its full name, with that option's action and reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Methods

func Methods(s Source) ([]rpc.Method, []string, []model.Problem)

Methods returns each method of the compiled services that carries the option, sorted by path, and every .proto file it read; or the problems of the first step that finds any. The steps are those of design section 5, "RPC methods from the protobuf sources", in its order.

Types

type Root

type Root struct {
	Dir string
	Pos model.Pos
}

Root is one directory of rpc.proto.roots: Dir is the directory read, already resolved against the proxyfile's directory; Pos is where the proxyfile writes it.

type Source

type Source struct {
	Roots     []Root
	Option    string
	OptionPos model.Pos
}

Source is what rpc.proto names: the roots in their written order, and the option's full name with the position of the option key, where a problem with the option is named.

Jump to

Keyboard shortcuts

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