factory

package
v0.26.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 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 ConnectionFunc

type ConnectionFunc func(cfg *connection.Config) (connection.Connection, error)

type Factory

type Factory struct {
	// Type which defines the streams for the CLI
	IOStreams *iostreams.IOStreams
	// Interface to read/write to the config
	Config config.IConfig
	// Creates a connection to the API
	Connection ConnectionFunc
	// Returns a logger to create leveled logs in the application
	Logger func() (logging.Logger, error)
	// Localizer provides text to the commands
	Localizer localize.Localizer
}

Factory is an abstract type which provides access to the root configuration and connections for the CLI

func New

func New(cliVersion string, localizer localize.Localizer) *Factory

nolint:funlen

Jump to

Keyboard shortcuts

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