gen

package
v0.0.0-...-ed83df0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TxtFuncMap

func TxtFuncMap(ctx *generatorContext) template.FuncMap

TxtFuncMap wraps sprig.TxtFuncMap and adds some proto generation specific ones.

Types

type Generator

type Generator interface {
	// Generate generates the necessary files.
	Generate(*Request) (*plugin.CodeGeneratorResponse, error)
}

Generator is code generator.

func New

func New(box packr.Box) Generator

type Request

type Request struct {
	CodeGeneratorRequest *plugin.CodeGeneratorRequest

	// GlobalFiles are generated once per namespace.
	GlobalFiles []string

	// ServiceFiles are generated once per service with the service name as a prefix.
	ServiceFiles []string
}

Request contains all information necessary to start the code generation.

Jump to

Keyboard shortcuts

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