converter

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorTmpl_IllegalFieldType = "{{.FieldType}} is illegal at {{.Line}}"

Variables

This section is empty.

Functions

func ReadSheet

func ReadSheet(workbook string, worksheet string) *xlsx.Sheet

ReadSheet read a sheet from specified workbook.

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

type IllegalFieldType struct {
	FieldType string
	Line      int
}

func (IllegalFieldType) Error

func (e IllegalFieldType) Error() string

type Tableaux

type Tableaux struct {
	ProtoPackageName string // protobuf package name
	WorkbookRootDir  string // root dir of workbooks
	OutputPath       string // output path of generated files
}

func (*Tableaux) Convert

func (tbx *Tableaux) Convert()

func (*Tableaux) Export

func (tbx *Tableaux) Export(conf proto.Message)

Export the conf message.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL