protoprint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package protoprint provides a mechanism to generate protobuf source code from descriptors.

This can be useful to turn file descriptor sets (produced by protoc) back into proto IDL code. Combined with the protoreflect/builder package, it can also be used to perform code generation of proto source code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer struct {
	PreferMultiLineStyleComments bool
	SortElements                 bool
	Indent                       string
	OmitDetachedComments         bool
}

func (*Printer) PrintProtoFile

func (p *Printer) PrintProtoFile(fd *desc.FileDescriptor, w io.Writer) error

func (*Printer) PrintProtoFiles

func (p *Printer) PrintProtoFiles(fds []*desc.FileDescriptor, open func(name string) (io.WriteCloser, error)) error

func (*Printer) PrintProtosToFileSystem

func (p *Printer) PrintProtosToFileSystem(fds []*desc.FileDescriptor, rootDir string) error

Jump to

Keyboard shortcuts

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