Documentation ¶ Index ¶ func Protobuf(w io.Writer, protoPackage string, source string, options map[string]string) error func RPCConversion(w io.Writer, protoPackage string, source string, formatter string) error type Field type Message func InterpretAST(set *token.FileSet, file *ast.File) ([]Message, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Protobuf ¶ func Protobuf( w io.Writer, protoPackage string, source string, options map[string]string, ) error Protobuf generates protobuf declarations from Go structs. func RPCConversion ¶ func RPCConversion( w io.Writer, protoPackage string, source string, formatter string, ) error RPCConversion creates functions for converting between core newsdoc strucs and their protobuf Message equivalents. Types ¶ type Field ¶ type Field struct { Name string GoName string ProtoName string Type string GoType string FieldNumber int Comment []string } type Message ¶ type Message struct { Name string Comment []string Fields []Field } func InterpretAST ¶ func InterpretAST(set *token.FileSet, file *ast.File) ([]Message, error) Source Files ¶ View all Source files ast.goconvert.goproto.go Click to show internal directories. Click to hide internal directories.