Documentation ¶
Index ¶
- func TestParseFileOptions(fd protoreflect.FileDescriptor) (string, *tableaupb.WorkbookOptions)
- func TestParseMessageOptions(md protoreflect.MessageDescriptor) (string, string, int32, int32, int32, bool)
- type Cell
- type Generator
- type MetaSheet
- func (sheet *MetaSheet) Cell(row int, name string) *Cell
- func (sheet *MetaSheet) ForEachCol(rowId int, f func(name string, cell *Cell) error) error
- func (sheet *MetaSheet) GetColType(col string) string
- func (sheet *MetaSheet) GetDefaultValue(col string) string
- func (sheet *MetaSheet) GetLastColName() string
- func (sheet *MetaSheet) NewRow() *Row
- func (sheet *MetaSheet) SetColNote(col, note string)
- func (sheet *MetaSheet) SetColType(col, typ string)
- func (sheet *MetaSheet) SetDefaultValue(col, defaultVal string)
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestParseFileOptions ¶
func TestParseFileOptions(fd protoreflect.FileDescriptor) (string, *tableaupb.WorkbookOptions)
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 Generator ¶
type Generator struct { ProtoPackage string // protobuf package name. InputDir string // input dir of workbooks. OutputDir string // output dir of generated protoconf files. Workbook string // Workbook name }
func (*Generator) ExportSheet ¶ added in v0.7.5
ExportSheet export a worksheet.
func (*Generator) TestParseFieldOptions ¶
func (gen *Generator) TestParseFieldOptions(md protoreflect.MessageDescriptor, row *[]Cell, depth int, prefix string)
TestParseFieldOptions is aimed to parse the options of all the fields of a protobuf message.
type MetaSheet ¶ added in v0.7.5
type MetaSheet struct { Worksheet string // worksheet name options.HeaderOption Transpose bool // interchange the rows and columns Rows []Row // contains filtered or unexported fields }
func NewMetaSheet ¶ added in v0.7.5
func NewMetaSheet(worksheet string, header *options.HeaderOption, transpose bool) *MetaSheet
func (*MetaSheet) ForEachCol ¶ added in v0.7.5
func (*MetaSheet) GetColType ¶ added in v0.7.5
func (*MetaSheet) GetDefaultValue ¶ added in v0.7.5
func (*MetaSheet) GetLastColName ¶ added in v0.7.5
func (*MetaSheet) SetColNote ¶ added in v0.7.5
func (*MetaSheet) SetColType ¶ added in v0.7.5
func (*MetaSheet) SetDefaultValue ¶ added in v0.7.5
Click to show internal directories.
Click to hide internal directories.