autorest

package
v49.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 29, 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

func FormatPackage(dir string) error

FormatPackage formats the given package using gofmt

Types

type GenerateError

type GenerateError struct {
	Arguments []string
	Message   string
}

GenerateError ...

func (*GenerateError) Error

func (e *GenerateError) Error() string

Error ...

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator collects all the related context of an autorest generation

func NewGeneratorFromOptions

func NewGeneratorFromOptions(o model.Options) *Generator

NewGeneratorFromOptions returns a new Generator with the given model.Options

func (*Generator) Generate

func (g *Generator) Generate() error

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

func (*Generator) Run

func (g *Generator) Run() error

Run starts and waits the generation

func (*Generator) Start

func (g *Generator) Start() error

Start starts the generation

func (*Generator) StderrPipe

func (g *Generator) StderrPipe() (io.ReadCloser, error)

StderrPipe returns the stderr pipeline of the command

func (*Generator) StdoutPipe

func (g *Generator) StdoutPipe() (io.ReadCloser, error)

StdoutPipe returns the stdout pipeline of the command

func (*Generator) Wait

func (g *Generator) Wait() error

Wait waits for the generation to complete

func (*Generator) WithMetadataOutput

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

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

func (*Generator) WithMultiAPI

func (g *Generator) WithMultiAPI() *Generator

WithMultiAPI appends a multiapi flag to the autorest argument list

func (*Generator) WithOption

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

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

func (*Generator) WithReadme

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

WithReadme appends a readme argument

func (*Generator) WithTag

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

WithTag appends a tag option to the autorest argument list

type MetadataProcessError

type MetadataProcessError struct {
	MetadataLocation string
	Errors           []error
}

MetadataProcessError ...

func (*MetadataProcessError) Error

func (e *MetadataProcessError) Error() string

Error ...

type MetadataProcessor

type MetadataProcessor struct {
	// contains filtered or unexported fields
}

MetadataProcessor processes the metadata

func NewMetadataProcessorFromLocation

func NewMetadataProcessorFromLocation(metadataOutput string) *MetadataProcessor

NewMetadataProcessorFromLocation creates a new MetadataProcessor using the metadata output folder location

func (MetadataProcessor) Process

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