commands

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(e Executor) *cobra.Command

Build constructs root command and returns it.

Types

type Executor

Executor is an interface that keeps all commands interfaces.

type MarketplaceExecutor added in v0.9.0

type MarketplaceExecutor interface {
	UploadSource(path string) (deployment provider.MarketplaceDeployedSource, err error)
	PreparePublishServiceVersion(service provider.MarketplaceManifestServiceData, from string) (provider.Transaction, error)
	PublishPublishServiceVersion(signedTransaction string) (sid, versionHash, manifest, manifestProtocol string, err error)
	PrepareCreateServiceOffer(sid string, price string, duration string, from string) (provider.Transaction, error)
	PublishCreateServiceOffer(signedTransaction string) (sid, offerIndex, price, duration string, err error)
	PreparePurchase(sid, offerIndex, from string) ([]provider.Transaction, error)
	PublishPurchase(signedTransactions []string) (sid, offerIndex, purchaser, price, duration string, expire time.Time, err error)
	GetService(sid string) (provider.MarketplaceService, error)
}

MarketplaceExecutor is an interface that handles marketplace commands.

type RootExecutor

type RootExecutor interface {
	Start() error
	Stop() error
	Status() (container.StatusType, error)
	Logs() (io.ReadCloser, error)
}

RootExecutor is an interface that handles core commands.

type ServiceExecutor

type ServiceExecutor interface {
	ServiceByID(id string) (*coreapi.Service, error)
	ServiceDeleteAll(deleteData bool) error
	ServiceDelete(deleteData bool, ids ...string) error
	ServiceDeploy(path string, env map[string]string, statuses chan provider.DeployStatus) (sid string, hash string, validationError, err error)
	ServiceListenEvents(id, eventFilter string) (chan *coreapi.EventData, chan error, error)
	ServiceListenResults(id, taskFilter, outputFilter string, tagFilters []string) (chan *coreapi.ResultData, chan error, error)
	ServiceLogs(id string, dependencies ...string) (logs []*provider.Log, closer func(), errC chan error, err error)
	ServiceExecuteTask(id, taskKey, inputData string, tags []string) (string, error)
	ServiceStart(id string) error
	ServiceStop(id string) error
	ServiceValidate(path string) (string, error)
	ServiceGenerateDocs(path string) error
	ServiceList() ([]*coreapi.Service, error)
	ServiceInitTemplateList() ([]*servicetemplate.Template, error)
	ServiceInitDownloadTemplate(t *servicetemplate.Template, dst string) error
}

ServiceExecutor is an interface that handles services commands.

type WalletExecutor added in v0.9.0

type WalletExecutor interface {
	List() ([]string, error)
	Create(passphrase string) (string, error)
	Delete(address string, passphrase string) (string, error)
	Export(address string, passphrase string) (provider.WalletEncryptedKeyJSONV3, error)
	Import(account provider.WalletEncryptedKeyJSONV3, passphrase string) (string, error)
	ImportFromPrivateKey(privateKey string, passphrase string) (string, error)
	Sign(address string, passphrase string, transaction provider.Transaction) (string, error)
}

WalletExecutor is an interface that handles wallet commands.

Directories

Path Synopsis
assets
Code generated by go-bindata.
Code generated by go-bindata.

Jump to

Keyboard shortcuts

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