autorest

package
v49.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPackage added in v49.1.0

func FormatPackage(dir string) error

FormatPackage formats the given package using gofmt

Types

type GenerateError added in v49.1.0

type GenerateError struct {
	Arguments []string
	Message   string
}

GenerateError ...

func (*GenerateError) Error added in v49.1.0

func (e *GenerateError) Error() string

Error ...

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

func NewGeneratorFromOptions(o model.Options) *Generator

NewGeneratorFromOptions returns a new Generator with the given model.Options

func (*Generator) Generate added in v49.1.0

func (g *Generator) Generate() error

Generate executes the autorest generation. The error will be of type *GenerateError

func (*Generator) Run added in v49.1.0

func (g *Generator) Run() error

Run starts and waits the generation

func (*Generator) Start added in v49.1.0

func (g *Generator) Start() error

Start starts the generation

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) Wait added in v49.1.0

func (g *Generator) Wait() error

Wait waits for the generation to complete

func (*Generator) WithMetadataOutput added in v49.1.0

func (g *Generator) WithMetadataOutput(output string) *Generator

WithMetadataOutput appends a `metadata-output-folder` option to the autorest argument list

func (*Generator) WithMultiAPI added in v49.1.0

func (g *Generator) WithMultiAPI() *Generator

WithMultiAPI appends a multiapi flag to the autorest argument list

func (*Generator) WithOption added in v49.1.0

func (g *Generator) WithOption(option model.Option) *Generator

WithOption appends an model.Option to the argument list of the autorest generation

func (*Generator) WithReadme added in v49.1.0

func (g *Generator) WithReadme(readme string) *Generator

WithReadme appends a readme argument

func (*Generator) WithTag added in v49.1.0

func (g *Generator) WithTag(tag string) *Generator

WithTag appends a tag option to the autorest argument list

type MetadataProcessError added in v49.1.0

type MetadataProcessError struct {
	MetadataLocation string
	Errors           []error
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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