generator

package
v0.126.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Formatter string `json:"formatter"`
	// Config for changelog generation.
	ChangelogConfig string `json:"changelog_config,omitempty"`
	// TemplateLibraries is a list of files containing go template definitions
	// that are reused in different stages of codegen. E.g. the "type" template
	// is needed in both the "types" and "services" stages.
	TemplateLibraries []string `json:"template_libraries,omitempty"`

	// We can generate SDKs in three modes: Packages, Types, Services
	// E.g. Go is Package-focused and Java is Types+Services
	Packages       map[string]string `json:"packages,omitempty"`
	Types          map[string]string `json:"types,omitempty"`
	Services       map[string]string `json:"services,omitempty"`
	ExceptionTypes map[string]string `json:"exception_types,omitempty"`
	Batch          map[string]string `json:"batch,omitempty"`

	// special case for usage example templates, that are generated
	// from Go SDK integration tests
	Examples map[string]string `json:"examples,omitempty"`
	Samples  map[string]string `json:"samples,omitempty"`

	// version bumps
	Version map[string]string `json:"version,omitempty"`

	// code generation toolchain configuration
	Toolchain *Toolchain `json:"toolchain,omitempty"`
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(target string) (*Generator, error)

func (*Generator) Apply

func (c *Generator) Apply(ctx context.Context, batch *code.Batch, suite *roll.Suite) error

type Toolchain

type Toolchain struct {
	Required     []string `json:"required"`
	PreSetup     []string `json:"pre_setup,omitempty"`
	PrependPath  string   `json:"prepend_path,omitempty"`
	Setup        []string `json:"setup,omitempty"`
	PostGenerate []string `json:"post_generate,omitempty"`
}

Jump to

Keyboard shortcuts

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