Documentation
¶
Overview ¶
Package render reads every input of one run and returns every output, in memory, so a caller writes nothing when any input has a problem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct{ Proxyfile, Out, RPCMethods, RPCTable string } // RPCMethods, RPCTable "" when not given
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run is the inputs of one render, read without a problem and ready to generate.
func Read ¶
Read reads every input of req and returns them ready to generate, or every problem it finds.
The proxyfile is read first, because every other input is read against it. Then the origins file, when the proxyfile names one instead of writing the origins, the RPC methods and the rpc-entry rule run together, so one run names the problems of all three. The methods are the proxyfile's rpc.methods when it writes them, those of the .proto files under the roots of rpc.proto when it writes that, and the --rpc-methods file otherwise; giving the flag as well is a problem, because one list would be ignored. A relative origins path or root is read from the proxyfile's own directory, and an absolute one as written (tree.Beside says why).
func (*Run) HasMethods ¶ added in v1.1.0
HasMethods reports whether the run was given RPC methods, by rpc.methods, rpc.proto or --rpc-methods, also when they hold no method, so a caller can refuse an RPC table that no methods were given for.
func (*Run) Inputs ¶
Inputs returns the path of every file the run read: the proxyfile, the files its includes name, the origins file when it names one, and the methods file when --rpc-methods gave one or every .proto file rpc.proto read, in the order its roots were walked. An included name that no file answers is listed too, because the next run would read a file written there.