Documentation ¶
Index ¶
- func FormatPackage(dir string) error
- type GenerateError
- type Generator
- func (g *Generator) Generate() error
- func (g *Generator) Run() error
- func (g *Generator) Start() error
- func (g *Generator) StderrPipe() (io.ReadCloser, error)
- func (g *Generator) StdoutPipe() (io.ReadCloser, error)
- func (g *Generator) Wait() error
- func (g *Generator) WithMetadataOutput(output string) *Generator
- func (g *Generator) WithMultiAPI() *Generator
- func (g *Generator) WithOption(option model.Option) *Generator
- func (g *Generator) WithReadme(readme string) *Generator
- func (g *Generator) WithTag(tag string) *Generator
- type MetadataProcessError
- type MetadataProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPackage ¶ added in v49.1.0
FormatPackage formats the given package using gofmt
Types ¶
type GenerateError ¶ added in v49.1.0
GenerateError ...
type Generator ¶ added in v49.1.0
type Generator struct {
// contains filtered or unexported fields
}
Generator collects all the related context of an autorest generation
func NewGeneratorFromOptions ¶ added in v49.1.0
NewGeneratorFromOptions returns a new Generator with the given model.Options
func (*Generator) Generate ¶ added in v49.1.0
Generate executes the autorest generation. The error will be of type *GenerateError
func (*Generator) StderrPipe ¶ added in v49.1.0
func (g *Generator) StderrPipe() (io.ReadCloser, error)
StderrPipe returns the stderr pipeline of the command
func (*Generator) StdoutPipe ¶ added in v49.1.0
func (g *Generator) StdoutPipe() (io.ReadCloser, error)
StdoutPipe returns the stdout pipeline of the command
func (*Generator) WithMetadataOutput ¶ added in v49.1.0
WithMetadataOutput appends a `metadata-output-folder` option to the autorest argument list
func (*Generator) WithMultiAPI ¶ added in v49.1.0
WithMultiAPI appends a multiapi flag to the autorest argument list
func (*Generator) WithOption ¶ added in v49.1.0
WithOption appends an model.Option to the argument list of the autorest generation
func (*Generator) WithReadme ¶ added in v49.1.0
WithReadme appends a readme argument
type MetadataProcessError ¶ added in v49.1.0
MetadataProcessError ...
func (*MetadataProcessError) Error ¶ added in v49.1.0
func (e *MetadataProcessError) Error() string
Error ...
type MetadataProcessor ¶ added in v49.1.0
type MetadataProcessor struct {
// contains filtered or unexported fields
}
MetadataProcessor processes the metadata
func NewMetadataProcessorFromLocation ¶ added in v49.1.0
func NewMetadataProcessorFromLocation(metadataOutput string) *MetadataProcessor
NewMetadataProcessorFromLocation creates a new MetadataProcessor using the metadata output folder location
func (MetadataProcessor) Process ¶ added in v49.1.0
func (p MetadataProcessor) Process() (map[string]model.Metadata, error)
Process returns the metadata result: a map from tag to Metadata, and an error if there is anything that could not be processed. the error returned must be of type *MetadataProcessError