cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: Apache-2.0 Imports: 15 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCelleryFileSystem

func NewCelleryFileSystem() (*celleyFileSystem, error)

NewCelleryFileSystem returns a celleyFileSystem instance.

func SetBallerinaExecutor

func SetBallerinaExecutor(balExecutor ballerina.BalExecutor) func(*CelleryCli)

func SetCredManager

func SetCredManager(credManager credentials.CredManager) func(*CelleryCli)

func SetFileSystem

func SetFileSystem(manager FileSystemManager) func(*CelleryCli)

func SetRegistry

func SetRegistry(registry registry.Registry) func(*CelleryCli)

Types

type CelleryCli

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

CelleryCli is an instance of the cellery command line client. Instances of the client can be returned from NewCelleryCli.

func NewCelleryCli

func NewCelleryCli(opts ...func(*CelleryCli)) *CelleryCli

NewCelleryCli returns a CelleryCli instance.

func (*CelleryCli) BalExecutor

func (cli *CelleryCli) BalExecutor() ballerina.BalExecutor

BalExecutor returns a BalExecutor instance.

func (*CelleryCli) CredManager

func (cli *CelleryCli) CredManager() credentials.CredManager

CredManager returns a CredManager instance.

func (*CelleryCli) DockerCli

func (cli *CelleryCli) DockerCli() docker.Docker

FileSystem returns FileSystemManager instance.

func (*CelleryCli) ExecuteTask

func (cli *CelleryCli) ExecuteTask(startMessage, errorMessage, successMessage string, function func() error) error

ExecuteTask executes a function. It starts a spinner upon starting function execution. Spinner exits with a success message (optional) if the function execution was successful. Spinner exists with an error message (optional) if the function execution failed.

func (*CelleryCli) FileSystem

func (cli *CelleryCli) FileSystem() FileSystemManager

FileSystem returns a FileSystemManager instance.

func (*CelleryCli) KubeCli

func (cli *CelleryCli) KubeCli() kubernetes.KubeCli

KubeCli returns a KubeCli instance.

func (*CelleryCli) OpenBrowser

func (cli *CelleryCli) OpenBrowser(url string) error

OpenBrowser opens up the provided URL in a browser

func (*CelleryCli) Out

func (cli *CelleryCli) Out() io.Writer

Out returns the writer used for the stdout.

func (*CelleryCli) Registry

func (cli *CelleryCli) Registry() registry.Registry

Registry returns a registry instance.

type Cli

type Cli interface {
	Out() io.Writer
	ExecuteTask(startMessage, errorMessage, successMessage string, function func() error) error
	FileSystem() FileSystemManager
	BalExecutor() ballerina.BalExecutor
	KubeCli() kubernetes.KubeCli
	Registry() registry.Registry
	OpenBrowser(url string) error
	DockerCli() docker.Docker
	CredManager() credentials.CredManager
}

Cli represents the cellery command line client.

type FileSystemManager

type FileSystemManager interface {
	CurrentDir() string
	UserHome() string
	TempDir() string
	Repository() string
	CelleryInstallationDir() string
	WorkingDirRelativePath() string
}

Jump to

Keyboard shortcuts

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