Documentation ¶
Index ¶
- Constants
- func AppVersion() string
- func GetMergerImporters(primaryWorkbookPath, sheetName string, merger []string) ([]importer.Importer, error)
- func NewSheetExporter(outputDir string, output *options.OutputConfOption) *sheetExporter
- func NewSheetParser(protoPackage, locationName string, opts *tableaupb.WorksheetOptions) *sheetParser
- func ParseFileOptions(fd protoreflect.FileDescriptor) (string, *tableaupb.WorkbookOptions)
- func ParseMessage(parser *sheetParser, protomsg proto.Message, sheetName string, ...) error
- func ParseMessageOptions(md protoreflect.MessageDescriptor) (string, *tableaupb.WorksheetOptions)
- func PrintPerfStats(gen *Generator)
- type Field
- type Generator
Constants ¶
View Source
const ( App = "confgen" Version = "0.4.1" )
Variables ¶
This section is empty.
Functions ¶
func AppVersion ¶ added in v0.10.2
func AppVersion() string
func GetMergerImporters ¶ added in v0.10.5
func GetMergerImporters(primaryWorkbookPath, sheetName string, merger []string) ([]importer.Importer, error)
GetMergerImporters gathers all merger importers.
- support Glob pattern, refer https://pkg.go.dev/path/filepath#Glob
- exclude self
func NewSheetExporter ¶
func NewSheetExporter(outputDir string, output *options.OutputConfOption) *sheetExporter
func NewSheetParser ¶
func NewSheetParser(protoPackage, locationName string, opts *tableaupb.WorksheetOptions) *sheetParser
func ParseFileOptions ¶ added in v0.9.0
func ParseFileOptions(fd protoreflect.FileDescriptor) (string, *tableaupb.WorkbookOptions)
ParseFileOptions parse the options of a protobuf definition file.
func ParseMessage ¶ added in v0.10.5
func ParseMessageOptions ¶ added in v0.9.0
func ParseMessageOptions(md protoreflect.MessageDescriptor) (string, *tableaupb.WorksheetOptions)
ParseMessageOptions parse the options of a protobuf message.
func PrintPerfStats ¶ added in v0.10.0
func PrintPerfStats(gen *Generator)
Types ¶
type Generator ¶
type Generator struct { ProtoPackage string // protobuf package name. InputDir string // input dir of workbooks. OutputDir string // output dir of generated files. LocationName string // TZ location name. InputOpt *options.InputConfOption // Input settings. OutputOpt *options.OutputConfOption // output settings. // Performace stats PerfStats sync.Map }
func NewGenerator ¶
func NewGeneratorWithOptions ¶ added in v0.9.14
func (*Generator) GenOneWorkbook ¶ added in v0.10.0
func (*Generator) GenWorkbook ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.