Documentation ¶
Index ¶
- func Command() (cli.Command, error)
- type GolangImporter
- func (p *GolangImporter) GetFileNameFor(pkgName, pkgID string) string
- func (p *GolangImporter) GetImporter() *importers.Importer
- func (p *GolangImporter) GetMessageFromFile(filename, messageName string) *builder.MessageBuilder
- func (p *GolangImporter) SetTargetTags(tags []string)
- func (p *GolangImporter) Visit()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GolangImporter ¶
type GolangImporter struct { Importer *importers.Importer // contains filtered or unexported fields }
GolangImporter go through a package and extract its structs to proto files
func NewGolangImporter ¶
func NewGolangImporter(pkg, outputDir, goSrcPath string, env ...string) (*GolangImporter, error)
NewGolangImporter creates a new GolangImporter
func (*GolangImporter) GetFileNameFor ¶
func (p *GolangImporter) GetFileNameFor(pkgName, pkgID string) string
GetFileNameFor will assist the command line to detect the file of the top config struct
func (*GolangImporter) GetImporter ¶
func (p *GolangImporter) GetImporter() *importers.Importer
GetImporter returns the importers.Importer generated by GolangImporter
func (*GolangImporter) GetMessageFromFile ¶
func (p *GolangImporter) GetMessageFromFile(filename, messageName string) *builder.MessageBuilder
GetMessageFromFile is a facility that helps filter the files to import
func (*GolangImporter) SetTargetTags ¶
func (p *GolangImporter) SetTargetTags(tags []string)
SetTargetTags allows setting the go tag names in struct to be used as `json_name` and protobuf key name
func (*GolangImporter) Visit ¶
func (p *GolangImporter) Visit()
Visit will run the packages visit logic
Click to show internal directories.
Click to hide internal directories.