Documentation
¶
Index ¶
- Constants
- func ReadSheet(workbook string, worksheet string) *xlsx.Sheet
- func TestParseFileOptions(fd protoreflect.FileDescriptor) (string, string)
- func TestParseMessageOptions(md protoreflect.MessageDescriptor) (string, string, int32, int32, int32, bool)
- type Format
- type IllegalFieldType
- type Tableaux
Constants ¶
View Source
const ( JSON Format = 0 Protobin = 1 Prototext = 2 )
file format
View Source
const ErrorTmpl_IllegalFieldType = "{{.FieldType}} is illegal at {{.Line}}"
Variables ¶
This section is empty.
Functions ¶
func TestParseFileOptions ¶
func TestParseFileOptions(fd protoreflect.FileDescriptor) (string, string)
TestParseFileOptions is aimed to parse the options of a protobuf definition file.
func TestParseMessageOptions ¶
func TestParseMessageOptions(md protoreflect.MessageDescriptor) (string, string, int32, int32, int32, bool)
TestParseMessageOptions is aimed to parse the options of a protobuf message.
Types ¶
type IllegalFieldType ¶
func (IllegalFieldType) Error ¶
func (e IllegalFieldType) Error() string
type Tableaux ¶
type Tableaux struct { ProtoPackageName string // protobuf package name. InputPath string // root dir of workbooks. OutputPath string // output path of generated files. OutputFilenameAsSnakeCase bool // output filename as snake case, default is camel case same as the protobuf message name. OutputFormat Format // output format: json, protobin, or prototext, and default is json. OutputPretty bool // output pretty format, with mulitline and indent. // contains filtered or unexported fields }
func (*Tableaux) TestParseFieldOptions ¶
func (tbx *Tableaux) TestParseFieldOptions(msg protoreflect.Message, row map[string]string, depth int, prefix string)
TestParseFieldOptions is aimed to parse the options of all the fields of a protobuf message.
Click to show internal directories.
Click to hide internal directories.