gen

package
v0.0.0-...-ca8457c Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFile

func GenerateFile(g GeneratedFile, req *pluginpb.CodeGeneratorRequest, file *protogen.File, opts Options)

GenerateFile generates the jsonpb/protojson marshaler implementations for every Message in the input proto file.

func GenerateHeader

func GenerateHeader(g GeneratedFile, req *pluginpb.CodeGeneratorRequest, file *protogen.File)

GenerateHeader generates the header comments, which contain information about the build tools and arguments.

func GenerateMarshalers

func GenerateMarshalers(g GeneratedFile, messages []*protogen.Message, opts Options)

GenerateMarshalers generates the actual MarshalJSON implementations for each Message in the input file.

Types

type GeneratedFile

type GeneratedFile interface {
	P(...interface{})
}

GeneratedFile is the set of methods needed by protoc-gen-go-json on *protogen.GeneratedFile. It exists mainly for ease of testing.

type Options

type Options struct {
	GithubProtobuf bool
}

Options represents the flags passed to protoc-gen-go-json via the protoc command line.

Jump to

Keyboard shortcuts

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