generator

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMirTypes

func GenerateMirTypes(inputDir, sourcePackagePath string, msgs []*types.Message, parser *types.Parser) (err error)

func GenerateOneofInterfaces

func GenerateOneofInterfaces(
	inputDir, inputPackagePath string,
	msgs []*types.Message,
	parser *types.Parser,
) (err error)

GenerateOneofInterfaces generates exported interfaces of the form "[Msg]_[Oneof]" "[Msg]_[Oneof]Wrapper" for all oneofs in the given messages, where [Msg] is the name of the message and [Oneof] is the name of the oneof.

Types

type TypeGenerator

type TypeGenerator struct{}

func (TypeGenerator) Run

func (TypeGenerator) Run(pbGoStructTypes []reflect.Type) error

Run runs the TypeGenerator on the given set of struct types. For simplicity, all struct types are assumed to be in the same go package.

Jump to

Keyboard shortcuts

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