 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any existing IDL tags on the Go struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProtobufNamer ¶
func NewProtobufNamer() *protobufNamer
Types ¶
type Generator ¶
type ImportTracker ¶
type ImportTracker struct {
	// contains filtered or unexported fields
}
    ImportTracker handles Protobuf package imports
TODO: pay attention to the package name (instead of renaming every package). TODO: Figure out the best way to make names for packages that collide.
func NewImportTracker ¶
func NewImportTracker(local types.Name, types ...*types.Type) *ImportTracker
func (*ImportTracker) AddNullable ¶
func (tracker *ImportTracker) AddNullable()
AddNullable ensures that support for the nullable Gogo-protobuf extension is added.
func (*ImportTracker) AddType ¶
func (tracker *ImportTracker) AddType(t *types.Type)
func (*ImportTracker) AddTypes ¶
func (tracker *ImportTracker) AddTypes(types ...*types.Type)
func (*ImportTracker) ImportLines ¶
func (tracker *ImportTracker) ImportLines() []string
func (*ImportTracker) LocalNameOf ¶
func (tracker *ImportTracker) LocalNameOf(path string) string
LocalNameOf returns the name you would use to refer to the package at the specified path within the body of a file.
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.