generator

package
v0.23.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v0.21.1

type Builder interface {
	// Build returns slice of template data and an error
	Build() ([]Data, error)
}

Builder is template data builder

type Data added in v0.21.1

type Data struct {
	Template     *template.Template
	TemplateExec string
	Path         string
	Filename     string
	Data         any
}

Data wraps template and data for generating proto.

type Generator

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

func New

func New(verbose bool) *Generator

New return a generator

func (*Generator) Generate

func (g *Generator) Generate(builders []Builder, perm os.FileMode) error

func (*Generator) GenerateTemplateData

func (g *Generator) GenerateTemplateData(dataBuilder Data, perm os.FileMode) error

Jump to

Keyboard shortcuts

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