generator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 15 Imported by: 1 module, 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

View Source
var ErrPrintingPressNotInstalled = errors.New("printing-press (ppress) cli is not installed")

ErrPrintingPressNotInstalled is returned when the ppress binary cannot be found in the PATH

Functions

This section is empty.

Types

type Config

type Config struct {
	Directory  string
	Platform   api.Platform
	Repository api.Repository
}

type GenerateOptions

type GenerateOptions struct {
	ProjectDirectory string
	OutputDirectory  string
	GeneratorNames   []string
	GeneratorOutputs []string
}

type Generator

type Generator interface {
	Name() string                        // Name returns the name of the generator
	GetOutputName() string               // GetOutputName returns the name of the output dir for e.g. multi-language SDKs
	Generate(opts GenerateOptions) error // Generate runs the code generation
}

Generator provides a common interface for all generators

type OpenAPIGenerator

type OpenAPIGenerator struct {
	OutputName string   `json:"-" yaml:"-"`
	APISpec    string   `json:"-" yaml:"-"`
	Args       []string `json:"-" yaml:"-"`
	Config     OpenAPIGeneratorConfig
}

func (*OpenAPIGenerator) Generate

func (n *OpenAPIGenerator) Generate(opts GenerateOptions) error

func (*OpenAPIGenerator) GetOutputName

func (n *OpenAPIGenerator) GetOutputName() string

func (*OpenAPIGenerator) Name

func (n *OpenAPIGenerator) Name() string

type OpenAPIGeneratorConfig

type OpenAPIGeneratorConfig struct {
	GeneratorName         string                   `json:"generatorName" yaml:"generatorName"`
	InvokerPackage        string                   `json:"invokerPackage" yaml:"invokerPackage"`
	ApiPackage            string                   `json:"apiPackage" yaml:"apiPackage"`
	ModelPackage          string                   `json:"modelPackage" yaml:"modelPackage"`
	EnablePostProcessFile bool                     `json:"enablePostProcessFile" yaml:"enablePostProcessFile"`
	GlobalProperty        map[string]interface{}   `json:"globalProperty" yaml:"globalProperty"`
	AdditionalProperties  map[string]interface{}   `json:"additionalProperties" yaml:"additionalProperties"`
	IgnoreFiles           []string                 `json:"ignoreFiles" yaml:"ignoreFiles"`
	Repository            appconf.RepositoryConf   `json:"repository" yaml:"repository"`
	Maintainers           []appconf.MaintainerConf `json:"maintainers" yaml:"maintainers"`
}

type PrimeCodeGenGenerator

type PrimeCodeGenGenerator struct {
	OutputName string   `json:"-" yaml:"-"`
	APISpec    string   `json:"-" yaml:"-"`
	Args       []string `json:"-" yaml:"-"`
	Config     PrimeCodeGenGeneratorConfig
}

func (*PrimeCodeGenGenerator) Generate

func (n *PrimeCodeGenGenerator) Generate(opts GenerateOptions) error

func (*PrimeCodeGenGenerator) GetOutputName

func (n *PrimeCodeGenGenerator) GetOutputName() string

func (*PrimeCodeGenGenerator) Name

func (n *PrimeCodeGenGenerator) Name() string

Name returns the name of the task

type PrimeCodeGenGeneratorConfig

type PrimeCodeGenGeneratorConfig struct {
	TemplateLanguage string                   `json:"templateLanguage" yaml:"templateLanguage"`
	TemplateType     string                   `json:"templateType" yaml:"templateType"`
	Patches          []string                 `json:"patches" yaml:"patches"`
	GroupId          string                   `json:"groupId" yaml:"groupId"`
	ArtifactId       string                   `json:"artifactId" yaml:"artifactId"`
	Repository       appconf.RepositoryConf   `json:"repository" yaml:"repository"`
	Maintainers      []appconf.MaintainerConf `json:"maintainers" yaml:"maintainers"`
	Provider         appconf.ProviderConf     `json:"provider" yaml:"provider"`
	GeneratorNames   []string                 `json:"generatorNames" yaml:"generatorNames"`
	GeneratorOutputs []string                 `json:"generatorOutputs" yaml:"generatorOutputs"`
}

type PrintingPressGenerator

type PrintingPressGenerator struct {
	OutputName string   `json:"-" yaml:"-"`
	APISpec    string   `json:"-" yaml:"-"`
	Args       []string `json:"-" yaml:"-"`
	Config     PrintingPressGeneratorConfig
}

func (*PrintingPressGenerator) Generate

func (n *PrintingPressGenerator) Generate(opts GenerateOptions) error

func (*PrintingPressGenerator) GetOutputName

func (n *PrintingPressGenerator) GetOutputName() string

func (*PrintingPressGenerator) Name

func (n *PrintingPressGenerator) Name() string

Name returns the name of the task

type PrintingPressGeneratorConfig

type PrintingPressGeneratorConfig struct {
	// Skip toggles (Default to false, meaning artifacts ARE generated/shown by default)
	NoJson   bool `json:"noJson" yaml:"noJson"`
	NoHtml   bool `json:"noHtml" yaml:"noHtml"`
	NoLlm    bool `json:"noLlm" yaml:"noLlm"`
	NoFooter bool `json:"noFooter" yaml:"noFooter"`

	// Custom Layout/Footer attributes (Omitted if empty)
	Title           string `json:"title" yaml:"title"`
	FooterContent   string `json:"footerContent" yaml:"footerContent"`
	FooterLinkTitle string `json:"footerLinkTitle" yaml:"footerLinkTitle"`
	FooterUrl       string `json:"footerUrl" yaml:"footerUrl"`
}

type SpeakEasyGenerator

type SpeakEasyGenerator struct {
	OutputName string   `json:"-" yaml:"-"`
	APISpec    string   `json:"-" yaml:"-"`
	Args       []string `json:"-" yaml:"-"`
	Config     SpeakEasyGeneratorConfig
}

func (*SpeakEasyGenerator) Generate

func (n *SpeakEasyGenerator) Generate(opts GenerateOptions) error

func (*SpeakEasyGenerator) GetOutputName

func (n *SpeakEasyGenerator) GetOutputName() string

func (*SpeakEasyGenerator) Name

func (n *SpeakEasyGenerator) Name() string

Name returns the name of the task

type SpeakEasyGeneratorConfig

type SpeakEasyGeneratorConfig struct {
	TemplateLanguage string                 `json:"templateLanguage" yaml:"templateLanguage"`
	Repository       appconf.RepositoryConf `json:"repository" yaml:"repository"`
}

Jump to

Keyboard shortcuts

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