cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	docopt.Opts
	// contains filtered or unexported fields
}

Cli is a helper type that allows you to instantiate the AsyncAPI Converter and io.Reader of the converted document with arguments passed from the terminal.

func New

func New(opts docopt.Opts) Cli

New returns a new Cli instance.

func (Cli) NewConverterAndReader

func (h Cli) NewConverterAndReader() (Converter, io.Reader, error)

NewConverterAndReader creates both a converter and a reader of the converted AsyncAPI document.

type Converter

type Converter interface {
	Convert(reader io.Reader, writer io.Writer) error
}

Converter converts an AsyncAPI document.

Jump to

Keyboard shortcuts

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