protogen

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	App                 = "tableauc"
	Version             = "0.1.1"
	TableauProtoPackage = "tableau"
)

Variables

This section is empty.

Functions

func ParseIncellStruct added in v0.5.8

func ParseIncellStruct(elemType string) []string

Types

type GeneratedBuf added in v0.6.1

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

func NewGeneratedBuf added in v0.6.1

func NewGeneratedBuf() *GeneratedBuf

NewGeneratedFile creates a new generated file with the given filename.

func (*GeneratedBuf) Content added in v0.6.1

func (g *GeneratedBuf) Content() []byte

Content returns the contents of the generated file.

func (*GeneratedBuf) P added in v0.6.1

func (g *GeneratedBuf) P(v ...interface{})

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.

type Generator

type Generator struct {
	ProtoPackage string // protobuf package name.
	GoPackage    string // golang package name.
	// Location represents the collection of time offsets in use in a geographical area.
	// Default is "Asia/Shanghai".
	LocationName string
	InputDir     string // input dir of workbooks.
	OutputDir    string // output dir of generated protoconf files.

	FilenameWithSubdirPrefix bool   // filename dir separator `/` or `\` is replaced by "__"
	FilenameSuffix           string // filename suffix of generated protoconf files.

	Imports   []string              // imported common proto file paths
	Header    *options.HeaderOption // header settings.
	InputOpts *options.InputOption
}

func NewGenerator added in v0.7.5

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

func (*Generator) GenOneWorkbook added in v0.6.5

func (gen *Generator) GenOneWorkbook(relativeWorkbookPath string) error

func (*Generator) Generate

func (gen *Generator) Generate() error

func (*Generator) PrepareOutpuDir added in v0.6.0

func (gen *Generator) PrepareOutpuDir() error

Jump to

Keyboard shortcuts

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