generator

package
v0.0.0-...-e249d3a Latest Latest
Warning

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

Go to latest
Published: May 13, 2017 License: BSD-3-Clause Imports: 9 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 {
	*bytes.Buffer

	Request  *plugin.CodeGeneratorRequest  // The input.
	Response *plugin.CodeGeneratorResponse // The output.

	TemplateEngine string // mustache, all the time right now
}

Generator will generate our template files

func New

func New() *Generator

New creates a new generator

func (*Generator) Error

func (g *Generator) Error(err error, msgs ...string)

Error reports a problem, including an error, and exits the program.

func (*Generator) Fail

func (g *Generator) Fail(msgs ...string)

Fail reports a problem and exits the program.

func (*Generator) GenerateAllFiles

func (g *Generator) GenerateAllFiles()

GenerateAllFiles generates the output for all the files we're outputting.

func (*Generator) GenerateFile

GenerateFile given a protobuf file descriptor will generate a template file

Jump to

Keyboard shortcuts

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