Documentation
      ¶
    
    
  
    
  
    Overview ¶
go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any existing IDL tags on the Go struct.
Index ¶
- func NewProtoFile() *generator.DefaultFileType
 - func NewProtobufNamer() *protobufNamer
 - func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, header []byte) error
 - func RewriteTypesWithProtobufStructTags(name string, structTags map[string]map[string]string) error
 - func Run(g *Generator)
 - type ExtractFunc
 - type Generator
 - type ImportTracker
 - type ProtobufFromGoNamer
 - type ProtobufLocator
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProtoFile ¶ added in v1.3.0
func NewProtoFile() *generator.DefaultFileType
func NewProtobufNamer ¶
func NewProtobufNamer() *protobufNamer
func RewriteGeneratedGogoProtobufFile ¶
func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, header []byte) error
Types ¶
type ExtractFunc ¶
ExtractFunc extracts information from the provided TypeSpec and returns true if the type should be removed from the destination file.
type Generator ¶
type ImportTracker ¶
type ImportTracker struct {
	namer.DefaultImportTracker
}
    func NewImportTracker ¶
func NewImportTracker(local types.Name, typesToAdd ...*types.Type) *ImportTracker
func (*ImportTracker) AddNullable ¶
func (tracker *ImportTracker) AddNullable()
AddNullable ensures that support for the nullable Gogo-protobuf extension is added.
type ProtobufFromGoNamer ¶
ProtobufFromGoNamer finds the protobuf name of a type (and its package, and the package path) from its Go name.
 Click to show internal directories. 
   Click to hide internal directories.