render

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 6 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 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 File

type File struct {
	Path  string
	Bytes []byte
}

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

func Read(req Request) (*Run, []model.Problem)

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, and the --rpc-methods file otherwise; giving both is a problem, because one list would be ignored.

func (*Run) Files

func (r *Run) Files() ([]File, []model.Problem)

Files returns every output, in memory and in this order: Out, then RPCTable.

func (*Run) HasMethods added in v1.1.0

func (r *Run) HasMethods() bool

HasMethods reports whether the run was given RPC methods, by rpc.methods or --rpc-methods, an empty list included, so a caller can refuse an RPC table that no methods were given for.

func (*Run) Inputs

func (r *Run) Inputs() []string

Inputs returns the path of every file the run read: the proxyfile, the origins file when it names one and the methods file when --rpc-methods gave one.

Jump to

Keyboard shortcuts

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