generator

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 6 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 interface {
	Generate(*google_protobuf.FileDescriptorProto) (*plugin.CodeGeneratorResponse_File, error)
}

Generator implementations generate a plugin response file from the passed file descriptor.

func FromTemplate

func FromTemplate(suffix string, t *template.Template) Generator

FromTemplate returns a Generator that generates an output file from the template passed, naming the output with the suffix.

type GeneratorFunc

GeneratorFunc type is an adapter to allow the use of ordinary functions as Generator implementations. If f is a function with the appropriate signature, GeneratorFunc(f) is a Generator that calls f.

func (GeneratorFunc) Generate

Generate calls f(desc).

Jump to

Keyboard shortcuts

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