Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { // Name of the field. This can be empty if using composition. Name string // Key name of the field, if it's a map. Key string // Value name of the field is the only required string. Value string // Tags are stored for potential manipulation later Tags Tags // IsArray is mutually exclusive with Key having contents and IsMap being true. IsArray bool // IsMap means Key is set. IsMap bool // IsPointer refers to the whole field being a pointer. IsPointer bool // IsPointerValue will be true if a map or array contains pointers. IsPointerValue bool // IsComment is a comment for the next field. IsComment bool }
Field holds a structure's field,
func (*Field) ProtoString ¶
ProtoString is a protocol buffers representation of the field. The input is the order it has in the structure.
type Func ¶ added in v0.15.0
type Func struct { // Name of the func for lookup. Name string // Code is the entire function. Code string }
Funcs holds the code for a function.
type Package ¶
type Package struct { scanner.Scanner Name string InternalImports []string ExternalImports []string Structs []*Structure Funcs []Func // contains filtered or unexported fields }
* Package holds the package scanner and other internal data, * plus the exported structures for structs and imports.
func NewPackage ¶
func (*Package) MergeExternalImports ¶ added in v0.2.1
func (*Package) Parse ¶ added in v0.13.0
func (pkg *Package) Parse()
parse scans the file for structures
func (*Package) ProtoString ¶
ProtoString generates protocol buffer output.
type Structure ¶
Structure holds a struct and its preceding comment.
func NewStructure ¶
NewStructure simply returns a Structure struct with the specified name.
func (*Structure) ProtoString ¶
ProtoString is a protobuf representation of the structure.
Click to show internal directories.
Click to hide internal directories.