protogen

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.9.0"

Variables

This section is empty.

Functions

func ExtractListFieldProp added in v0.10.6

func ExtractListFieldProp(prop *tableaupb.FieldProp, isScalarList bool) *tableaupb.FieldProp

ExtractListFieldProp extracts the specified props which the list field recognizes.

func ExtractMapFieldProp added in v0.10.6

func ExtractMapFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp

ExtractMapFieldProp extracts the specified props which the map field recognizes.

func ExtractScalarFieldProp added in v0.10.6

func ExtractScalarFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp

ExtractScalarFieldProp extracts the specified props which the scalar field recognizes.

FIXME(wenchy): wellknown type fields should also be supported. In fact, it's supported now, but it's not well tested and documented.

func ExtractStructFieldProp added in v0.10.7

func ExtractStructFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp

ExtractStructFieldProp extracts the specified props which the struct field recognizes.

func IsEmptyFieldProp added in v0.10.7

func IsEmptyFieldProp(prop *tableaupb.FieldProp) bool

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.

	LocationName string // TZ location name.
	InputOpt     *options.ProtoInputOption
	OutputOpt    *options.ProtoOutputOption
	// contains filtered or unexported fields
}

func NewGenerator

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

func NewGeneratorWithOptions added in v0.9.7

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) GenWorkbook added in v0.10.0

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

func (*Generator) Generate

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

type Positioner added in v0.15.0

type Positioner interface {
	Position(row, col int) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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