basecmd

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	common.Command

	FactoryProvider FactoryProvider
}

Command is the base for all commands

func New

func New(settings *environment.Settings, p FactoryProvider) *Command

New returns a Command

func (*Command) Channel

func (c *Command) Channel() (fabric.Channel, error)

Channel returns a new SDK channel

func (*Command) Context

func (c *Command) Context() *environment.Context

Context returns the current context

func (*Command) Fprint

func (c *Command) Fprint(arg ...interface{}) error

Fprint displays the given args to the configured output stream

func (*Command) FprintOrPanic

func (c *Command) FprintOrPanic(arg ...interface{})

FprintOrPanic displays the given args to the configured output stream. If an error occurs then this function panics.

func (*Command) Fprintln

func (c *Command) Fprintln(arg ...interface{}) error

Fprintln displays the given args to the configured output stream

func (*Command) FprintlnOrPanic

func (c *Command) FprintlnOrPanic(arg ...interface{})

FprintlnOrPanic displays the given args to the configured output stream. If an error occurs then this function panics.

func (*Command) Prompt

func (c *Command) Prompt() string

Prompt waits for the user to enter a string and returns the string

func (*Command) ResMgmt added in v0.1.4

func (c *Command) ResMgmt() (fabric.ResourceManagement, error)

ResMgmt returns a new SDK resource manager

type FactoryProvider

type FactoryProvider func(config *environment.Config) (fabric.Factory, error)

FactoryProvider creates a new Factory

Jump to

Keyboard shortcuts

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