generator

package module
v0.0.0-...-28f2698 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProtogenFile

func FromProtogenFile(f *protogen.File) *fileGenerator

Takes a protogen file and returns a generator

Types

type PartialGenerator

type PartialGenerator struct {
	Printer *printer.FilePrinter
}

Created from

func (*PartialGenerator) AppendSubPartial

func (pg *PartialGenerator) AppendSubPartial(partials ...*PartialGeneratorBehavior)

Append sub partials to this partial

func (*PartialGenerator) Init

func (pg *PartialGenerator) Init(printerConf *printer.PrinterConfig)

func (*PartialGenerator) P

func (pg *PartialGenerator) P(vals ...interface{})

func (*PartialGenerator) PIndent

func (pg *PartialGenerator) PIndent(body func())

func (*PartialGenerator) ToBuffer

func (pg *PartialGenerator) ToBuffer() bytes.Buffer

type PartialGeneratorBehavior

type PartialGeneratorBehavior interface {
	ToBuffer() bytes.Buffer
	Init(conf *printer.PrinterConfig)
	Gen()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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