Documentation ¶
Index ¶
- func GetReader(filename string) (io.ReadCloser, error)
- func PrintContents(ps ProtoStruct, phArr []ProtoHint, tab string)
- func PrintHint(phArr []ProtoHint)
- func PrintJsonContent(ps ProtoStruct, phArr []ProtoHint) string
- func PrintJsonExample(phArr []ProtoHint) (string, error)
- func ResolveImportPath(importPath string, gopath string) string
- type NameType
- type ProtoEnum
- type ProtoHint
- type ProtoStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReader ¶
func GetReader(filename string) (io.ReadCloser, error)
helper function to get a bufio.Reader
func PrintContents ¶
func PrintContents(ps ProtoStruct, phArr []ProtoHint, tab string)
recursively prints protostruct
func PrintHint ¶
func PrintHint(phArr []ProtoHint)
Prints the filtered contents of the protobuf file
func PrintJsonContent ¶
func PrintJsonContent(ps ProtoStruct, phArr []ProtoHint) string
recursively constructs json from the protoStruct
func PrintJsonExample ¶
Prints (and returns) a json representation of the request protobuf object
func ResolveImportPath ¶
Types ¶
type NameType ¶
func NewNameType ¶
constructs a NameType struct
type ProtoHint ¶
type ProtoHint struct { Name string Contents map[string]ProtoStruct Enums map[string]ProtoEnum Root bool Package string }
holds a protobuf file
func ParseProtobufRaw ¶
Parses a protoc file
type ProtoStruct ¶
holds ProtoStruct
Click to show internal directories.
Click to hide internal directories.