confgen

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

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 NewSheetExporter

func NewSheetExporter(outputDir string, output *options.ConfOutputOption) *sheetExporter

func NewSheetParser

func NewSheetParser(protoPackage, locationName string, opts *tableaupb.WorksheetOptions) *sheetParser

func NewSheetParserWithGen added in v0.10.6

func NewSheetParserWithGen(gen *Generator, opts *tableaupb.WorksheetOptions) *sheetParser

func ParseFileOptions added in v0.9.0

ParseFileOptions parse the options of a protobuf definition file.

func ParseMessage added in v0.10.5

func ParseMessage(parser *sheetParser, protomsg proto.Message, sheetName string, importers ...importer.Importer) error

func ParseMessageOptions added in v0.9.0

ParseMessageOptions parse the options of a protobuf message.

func PrintPerfStats added in v0.10.0

func PrintPerfStats(gen *Generator)

Types

type Field

type Field struct {
	// contains filtered or unexported fields
}

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.ConfInputOption  // Input settings.
	OutputOpt    *options.ConfOutputOption // output settings.

	// Performace stats
	PerfStats sync.Map
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(protoPackage, indir, outdir string, setters ...options.Option) *Generator

func NewGeneratorWithOptions added in v0.9.14

func NewGeneratorWithOptions(protoPackage, indir, outdir string, opts *options.Options) *Generator

func (*Generator) GenAll added in v0.10.0

func (gen *Generator) GenAll() error

func (*Generator) GenOneWorkbook added in v0.10.0

func (gen *Generator) GenOneWorkbook(relWorkbookPath string, worksheetName string) (err error)

func (*Generator) GenWorkbook added in v0.10.0

func (gen *Generator) GenWorkbook(relWorkbookPaths ...string) error

func (*Generator) Generate

func (gen *Generator) Generate(relWorkbookPaths ...string) (err error)

Directories

Path Synopsis
mexporter is the message exporter package, which can export one single message to different formts: JSON, Text, and Bin.
mexporter is the message exporter package, which can export one single message to different formts: JSON, Text, and Bin.

Jump to

Keyboard shortcuts

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