Documentation
¶
Index ¶
- Constants
- func ExtractListFieldProp(prop *tableaupb.FieldProp, isScalarList bool) *tableaupb.FieldProp
- func ExtractMapFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp
- func ExtractScalarFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp
- func ExtractStructFieldProp(prop *tableaupb.FieldProp) *tableaupb.FieldProp
- func IsEmptyFieldProp(prop *tableaupb.FieldProp) bool
- type GeneratedBuf
- type Generator
Constants ¶
const Version = "0.8.0"
Variables ¶
This section is empty.
Functions ¶
func ExtractListFieldProp ¶ added in v0.10.6
ExtractListFieldProp extracts the specified props which the list field recognizes.
func ExtractMapFieldProp ¶ added in v0.10.6
ExtractMapFieldProp extracts the specified props which the map field recognizes.
func ExtractScalarFieldProp ¶ added in v0.10.6
ExtractScalarFieldProp extracts the specified props which the scalar field recognizes.
FIXME(wenchy): wellknown type fields should also be supported.
func ExtractStructFieldProp ¶ added in v0.10.7
ExtractStructFieldProp extracts the specified props which the struct field recognizes.
func IsEmptyFieldProp ¶ added in v0.10.7
Types ¶
type GeneratedBuf ¶
type GeneratedBuf struct {
// contains filtered or unexported fields
}
func NewGeneratedBuf ¶
func NewGeneratedBuf() *GeneratedBuf
NewGeneratedFile creates a new generated file with the given filename.
func (*GeneratedBuf) Content ¶
func (g *GeneratedBuf) Content() []byte
Content returns the contents of the generated file.
func (*GeneratedBuf) P ¶
func (g *GeneratedBuf) P(v ...any)
P prints a line to the generated output. It converts each parameter to a string following the same rules as fmt.Print. It never inserts spaces between parameters.
func (*GeneratedBuf) String ¶ added in v0.11.0
func (g *GeneratedBuf) String() string
String returns the string content of the generated file.
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
}