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 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"`
NoLogo bool `json:"noLogo" yaml:"noLogo"`
// Custom Layout/Footer attributes (Omitted if empty)
Title string `json:"title" yaml:"title"`
}
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"`
}
Click to show internal directories.
Click to hide internal directories.