generator

package
v0.0.0-...-63287b1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator is a JavaScript code generator for Twirp services.

func New

func New() *Generator

New returns a new generator value.

func (*Generator) GenerateFile

func (g *Generator) GenerateFile(f *protogen.File, args []string)

GenerateFile generates a Twirp JavaScript client from a Protobuf file.

func (*Generator) P

func (g *Generator) P(v ...interface{})

P prints a line with given arguments to the generator's buffer.

func (*Generator) Run

func (g *Generator) Run(opts protogen.Options, f func(*protogen.Plugin) error)

Run reads a CodeGeneratorRequest from os.Stdin, invokes code generation method of given generator with it, and writes the resulting CodeGeneratorResponse to os.Stdout.

Jump to

Keyboard shortcuts

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