cmd

package
v2.21.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commander

type Commander interface {
	AppCreate(string, string, string, bool) error
	AppsList(int) error
	AppInfo(string) error
	AppOpen(string) error
	AppLogs(string, int) error
	AppRun(string, string) error
	AppDestroy(string, string) error
	AppTransfer(string, string) error
	AutoscaleList(string) error
	AutoscaleSet(string, string, int, int, int) error
	AutoscaleUnset(string, string) error
	Register(string, string, string, string, bool, bool) error
	Login(string, string, string, bool) error
	Logout() error
	Passwd(string, string, string) error
	Cancel(string, string, bool) error
	Whoami(bool) error
	Regenerate(string, bool) error
	BuildsList(string, int) error
	BuildsCreate(string, string, string) error
	CertsList(int, time.Time) error
	CertAdd(string, string, string) error
	CertRemove(string) error
	CertInfo(string) error
	CertAttach(string, string) error
	CertDetach(string, string) error
	ConfigList(string, string) error
	ConfigSet(string, []string) error
	ConfigUnset(string, []string) error
	ConfigPull(string, bool, bool) error
	ConfigPush(string, string) error
	DomainsList(string, int) error
	DomainsAdd(string, string) error
	DomainsRemove(string, string) error
	ServicesList(string) error
	ServicesAdd(string, string, string) error
	ServicesRemove(string, string) error
	GitRemote(string, string, bool) error
	GitRemove(string) error
	HealthchecksList(string, string) error
	HealthchecksSet(string, string, string, *api.Healthcheck) error
	HealthchecksUnset(string, string, []string) error
	KeysList(int) error
	KeyRemove(string) error
	KeyAdd(string, string) error
	LabelsList(string) error
	LabelsSet(string, []string) error
	LabelsUnset(string, []string) error
	LimitsList(string) error
	LimitsSet(string, []string, string) error
	LimitsUnset(string, []string, string) error
	TimeoutsList(string) error
	TimeoutsSet(string, []string) error
	TimeoutsUnset(string, []string) error
	MaintenanceInfo(string) error
	MaintenanceEnable(string) error
	MaintenanceDisable(string) error
	PermsList(string, bool, int) error
	PermCreate(string, string, bool) error
	PermDelete(string, string, bool) error
	PsList(string, int) error
	PsScale(string, []string) error
	PsRestart(string, string) error
	RegistryList(string) error
	RegistrySet(string, []string) error
	RegistryUnset(string, []string) error
	ReleasesList(string, int) error
	ReleasesInfo(string, int) error
	ReleasesRollback(string, int) error
	RoutingInfo(string) error
	RoutingEnable(string) error
	RoutingDisable(string) error
	ShortcutsList() error
	TagsList(string) error
	TagsSet(string, []string) error
	TagsUnset(string, []string) error
	TLSInfo(string) error
	TLSEnable(string) error
	TLSDisable(string) error
	UsersList(results int) error
	WhitelistAdd(string, string) error
	WhitelistList(string) error
	WhitelistRemove(string, string) error
	Println(...interface{}) (int, error)
	Print(...interface{}) (int, error)
	Printf(string, ...interface{}) (int, error)
	PrintErrln(...interface{}) (int, error)
	PrintErr(...interface{}) (int, error)
	PrintErrf(string, ...interface{}) (int, error)
	Version(bool) error
}

Commander is interface definition for running commands

type DeisCmd

type DeisCmd struct {
	ConfigFile string
	Warned     bool
	WOut       io.Writer
	WErr       io.Writer
	WIn        io.Reader
}

DeisCmd is an implementation of Commander.

func (*DeisCmd) AppCreate

func (d *DeisCmd) AppCreate(id, buildpack, remote string, noRemote bool) error

AppCreate creates an app.

func (*DeisCmd) AppDestroy

func (d *DeisCmd) AppDestroy(appID, confirm string) error

AppDestroy destroys an app.

func (*DeisCmd) AppInfo

func (d *DeisCmd) AppInfo(appID string) error

AppInfo prints info about app.

func (*DeisCmd) AppLogs

func (d *DeisCmd) AppLogs(appID string, lines int) error

AppLogs returns the logs from an app.

func (*DeisCmd) AppOpen

func (d *DeisCmd) AppOpen(appID string) error

AppOpen opens an app in the default webbrowser.

func (*DeisCmd) AppRun

func (d *DeisCmd) AppRun(appID, command string) error

AppRun runs a one time command in the app.

func (*DeisCmd) AppTransfer

func (d *DeisCmd) AppTransfer(appID, username string) error

AppTransfer transfers app ownership to another user.

func (*DeisCmd) AppsList

func (d *DeisCmd) AppsList(results int) error

AppsList lists apps on the Deis controller.

func (*DeisCmd) AutoscaleList

func (d *DeisCmd) AutoscaleList(appID string) error

AutoscaleList tells the informations about app's autoscale status

func (*DeisCmd) AutoscaleSet

func (d *DeisCmd) AutoscaleSet(appID string, processType string, min int, max int, CPUPercent int) error

AutoscaleSet sets autoscale options for the app.

func (*DeisCmd) AutoscaleUnset

func (d *DeisCmd) AutoscaleUnset(appID string, processType string) error

AutoscaleUnset removes autoscale for the app.

func (*DeisCmd) BuildsCreate

func (d *DeisCmd) BuildsCreate(appID, image, procfile string) error

BuildsCreate creates a build for an app.

func (*DeisCmd) BuildsList

func (d *DeisCmd) BuildsList(appID string, results int) error

BuildsList lists an app's builds.

func (*DeisCmd) Cancel

func (d *DeisCmd) Cancel(username, password string, yes bool) error

Cancel deletes a user's account.

func (*DeisCmd) CertAdd

func (d *DeisCmd) CertAdd(cert string, key string, name string) error

CertAdd adds a cert to the controller.

func (*DeisCmd) CertAttach

func (d *DeisCmd) CertAttach(name, domain string) error

CertAttach attaches a certificate to a domain

func (*DeisCmd) CertDetach

func (d *DeisCmd) CertDetach(name, domain string) error

CertDetach detaches a certificate from a domain

func (*DeisCmd) CertInfo

func (d *DeisCmd) CertInfo(name string) error

CertInfo gets info about certficiate

func (*DeisCmd) CertRemove

func (d *DeisCmd) CertRemove(name string) error

CertRemove deletes a cert from the controller.

func (*DeisCmd) CertsList

func (d *DeisCmd) CertsList(results int, now time.Time) error

CertsList lists certs registered with the controller.

func (*DeisCmd) ConfigList

func (d *DeisCmd) ConfigList(appID string, format string) error

ConfigList lists an app's config.

func (*DeisCmd) ConfigPull

func (d *DeisCmd) ConfigPull(appID string, interactive bool, overwrite bool) error

ConfigPull pulls an app's config to a file.

func (*DeisCmd) ConfigPush

func (d *DeisCmd) ConfigPush(appID, fileName string) error

ConfigPush pushes an app's config from a file.

func (*DeisCmd) ConfigSet

func (d *DeisCmd) ConfigSet(appID string, configVars []string) error

ConfigSet sets an app's config variables.

func (*DeisCmd) ConfigUnset

func (d *DeisCmd) ConfigUnset(appID string, configVars []string) error

ConfigUnset removes a config variable from an app.

func (*DeisCmd) DomainsAdd

func (d *DeisCmd) DomainsAdd(appID, domain string) error

DomainsAdd adds a domain to an app.

func (*DeisCmd) DomainsList

func (d *DeisCmd) DomainsList(appID string, results int) error

DomainsList lists domains registered with an app.

func (*DeisCmd) DomainsRemove

func (d *DeisCmd) DomainsRemove(appID, domain string) error

DomainsRemove removes a domain registered with an app.

func (*DeisCmd) GitRemote

func (d *DeisCmd) GitRemote(appID, remote string, force bool) error

GitRemote creates a git remote for a deis app.

func (*DeisCmd) GitRemove

func (d *DeisCmd) GitRemove(appID string) error

GitRemove removes a application git remote from a repository

func (*DeisCmd) HealthchecksList

func (d *DeisCmd) HealthchecksList(appID, procType string) error

HealthchecksList lists an app's healthchecks.

func (*DeisCmd) HealthchecksSet

func (d *DeisCmd) HealthchecksSet(appID, healthcheckType, procType string, probe *api.Healthcheck) error

HealthchecksSet sets an app's healthchecks.

func (*DeisCmd) HealthchecksUnset

func (d *DeisCmd) HealthchecksUnset(appID, procType string, healthchecks []string) error

HealthchecksUnset removes an app's healthchecks.

func (*DeisCmd) KeyAdd

func (d *DeisCmd) KeyAdd(name string, keyLocation string) error

KeyAdd adds keys.

func (*DeisCmd) KeyRemove

func (d *DeisCmd) KeyRemove(keyID string) error

KeyRemove removes keys.

func (*DeisCmd) KeysList

func (d *DeisCmd) KeysList(results int) error

KeysList lists a user's keys.

func (*DeisCmd) LabelsList

func (d *DeisCmd) LabelsList(appID string) error

LabelsList list app's labels

func (*DeisCmd) LabelsSet

func (d *DeisCmd) LabelsSet(appID string, labels []string) error

LabelsSet sets labels for app

func (*DeisCmd) LabelsUnset

func (d *DeisCmd) LabelsUnset(appID string, labels []string) error

LabelsUnset removes labels for the app.

func (*DeisCmd) LimitsList

func (d *DeisCmd) LimitsList(appID string) error

LimitsList lists an app's limits.

func (*DeisCmd) LimitsSet

func (d *DeisCmd) LimitsSet(appID string, limits []string, limitType string) error

LimitsSet sets an app's limits.

func (*DeisCmd) LimitsUnset

func (d *DeisCmd) LimitsUnset(appID string, limits []string, limitType string) error

LimitsUnset removes an app's limits.

func (*DeisCmd) Login

func (d *DeisCmd) Login(controller string, username string, password string, sslVerify bool) error

Login to a Deis controller.

func (*DeisCmd) Logout

func (d *DeisCmd) Logout() error

Logout from a Deis controller.

func (*DeisCmd) MaintenanceDisable

func (d *DeisCmd) MaintenanceDisable(appID string) error

MaintenanceDisable turns off the maintenance for the app.

func (*DeisCmd) MaintenanceEnable

func (d *DeisCmd) MaintenanceEnable(appID string) error

MaintenanceEnable turns on the maintenance for the app.

func (*DeisCmd) MaintenanceInfo

func (d *DeisCmd) MaintenanceInfo(appID string) error

MaintenanceInfo tells the informations about app's maintenance status

func (*DeisCmd) Passwd

func (d *DeisCmd) Passwd(username, password, newPassword string) error

Passwd changes a user's password.

func (*DeisCmd) PermCreate

func (d *DeisCmd) PermCreate(appID string, username string, admin bool) error

PermCreate adds a user to an app or makes them an administrator.

func (*DeisCmd) PermDelete

func (d *DeisCmd) PermDelete(appID, username string, admin bool) error

PermDelete removes a user from an app or revokes admin privileges.

func (*DeisCmd) PermsList

func (d *DeisCmd) PermsList(appID string, admin bool, results int) error

PermsList prints which users have permissions.

func (*DeisCmd) Print

func (d *DeisCmd) Print(a ...interface{}) (n int, err error)

Print prints a line to an output writer.

func (*DeisCmd) PrintErr

func (d *DeisCmd) PrintErr(a ...interface{}) (n int, err error)

PrintErr prints a line to an error writer.

func (*DeisCmd) PrintErrf

func (d *DeisCmd) PrintErrf(s string, a ...interface{}) (n int, err error)

PrintErrf prints a line to an error writer.

func (*DeisCmd) PrintErrln

func (d *DeisCmd) PrintErrln(a ...interface{}) (n int, err error)

PrintErrln prints a line to an error writer.

func (*DeisCmd) Printf

func (d *DeisCmd) Printf(s string, a ...interface{}) (n int, err error)

Printf prints a line to an error writer.

func (*DeisCmd) Println

func (d *DeisCmd) Println(a ...interface{}) (n int, err error)

Println prints a line to an output writer.

func (*DeisCmd) PsList

func (d *DeisCmd) PsList(appID string, results int) error

PsList lists an app's processes.

func (*DeisCmd) PsRestart

func (d *DeisCmd) PsRestart(appID, target string) error

PsRestart restarts an app's processes.

func (*DeisCmd) PsScale

func (d *DeisCmd) PsScale(appID string, targets []string) error

PsScale scales an app's processes.

func (*DeisCmd) Regenerate

func (d *DeisCmd) Regenerate(username string, all bool) error

Regenerate regenenerates a user's token.

func (*DeisCmd) Register

func (d *DeisCmd) Register(controller string, username string, password string, email string,
	sslVerify, login bool) error

Register creates a account on a Deis controller.

func (*DeisCmd) RegistryList

func (d *DeisCmd) RegistryList(appID string) error

RegistryList lists an app's registry information.

func (*DeisCmd) RegistrySet

func (d *DeisCmd) RegistrySet(appID string, item []string) error

RegistrySet sets an app's registry information.

func (*DeisCmd) RegistryUnset

func (d *DeisCmd) RegistryUnset(appID string, items []string) error

RegistryUnset removes an app's registry information.

func (*DeisCmd) ReleasesInfo

func (d *DeisCmd) ReleasesInfo(appID string, version int) error

ReleasesInfo prints info about a specific release.

func (*DeisCmd) ReleasesList

func (d *DeisCmd) ReleasesList(appID string, results int) error

ReleasesList lists an app's releases.

func (*DeisCmd) ReleasesRollback

func (d *DeisCmd) ReleasesRollback(appID string, version int) error

ReleasesRollback rolls an app back to a previous release.

func (*DeisCmd) RoutingDisable

func (d *DeisCmd) RoutingDisable(appID string) error

RoutingDisable disables an app from being exposed by the router.

func (*DeisCmd) RoutingEnable

func (d *DeisCmd) RoutingEnable(appID string) error

RoutingEnable enables an app from being exposed by the router.

func (*DeisCmd) RoutingInfo

func (d *DeisCmd) RoutingInfo(appID string) error

RoutingInfo provides information about the status of app routing.

func (*DeisCmd) ServicesAdd

func (d *DeisCmd) ServicesAdd(appID, procfileType string, pathPattern string) error

ServicesAdd adds a service to an app.

func (*DeisCmd) ServicesList

func (d *DeisCmd) ServicesList(appID string) error

ServicesList lists extra services for the app

func (*DeisCmd) ServicesRemove

func (d *DeisCmd) ServicesRemove(appID, procfileType string) error

ServicesRemove removes a service for procfileType registered with an app.

func (*DeisCmd) ShortcutsList

func (d *DeisCmd) ShortcutsList() error

ShortcutsList displays all relevant shortcuts for the CLI.

func (*DeisCmd) TLSDisable

func (d *DeisCmd) TLSDisable(appID string) error

TLSDisable disables the router to enforce https-only requests to the application.

func (*DeisCmd) TLSEnable

func (d *DeisCmd) TLSEnable(appID string) error

TLSEnable enables the router to enforce https-only requests to the application.

func (*DeisCmd) TLSInfo

func (d *DeisCmd) TLSInfo(appID string) error

TLSInfo prints info about the TLS settings for the given app.

func (*DeisCmd) TagsList

func (d *DeisCmd) TagsList(appID string) error

TagsList lists an app's tags.

func (*DeisCmd) TagsSet

func (d *DeisCmd) TagsSet(appID string, tags []string) error

TagsSet sets an app's tags.

func (*DeisCmd) TagsUnset

func (d *DeisCmd) TagsUnset(appID string, tags []string) error

TagsUnset removes an app's tags.

func (*DeisCmd) TimeoutsList

func (d *DeisCmd) TimeoutsList(appID string) error

TimeoutsList lists an app's timeouts.

func (*DeisCmd) TimeoutsSet

func (d *DeisCmd) TimeoutsSet(appID string, timeouts []string) error

TimeoutsSet sets an app's timeouts.

func (*DeisCmd) TimeoutsUnset

func (d *DeisCmd) TimeoutsUnset(appID string, timeouts []string) error

TimeoutsUnset removes an app's timeouts.

func (*DeisCmd) UsersList

func (d *DeisCmd) UsersList(results int) error

UsersList lists users registered with the controller.

func (*DeisCmd) Version

func (d *DeisCmd) Version(all bool) error

Version prints the various CLI versions.

func (*DeisCmd) WhitelistAdd

func (d *DeisCmd) WhitelistAdd(appID, IPs string) error

WhitelistAdd adds the addresses to the app's Whitelist.

func (*DeisCmd) WhitelistList

func (d *DeisCmd) WhitelistList(appID string) error

WhitelistList lists the addresses whitelisted for app

func (*DeisCmd) WhitelistRemove

func (d *DeisCmd) WhitelistRemove(appID, IPs string) error

WhitelistRemove deletes the addresses from the app's Whitelist.

func (*DeisCmd) Whoami

func (d *DeisCmd) Whoami(all bool) error

Whoami prints the logged in user. If all is true, it fetches info from the controller to know more about the user.

Jump to

Keyboard shortcuts

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