generator

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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"`

	// 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