cmd

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 50 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, bool) error
	AppsList(int) error
	AppInfo(string) error
	AppOpen(string) error
	AppLogs(string, int, bool, int) error
	AppRun(string, 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
	Login(string, bool) error
	Logout() error
	Whoami(bool) error
	BuildsList(string, int) error
	BuildsCreate(string, string, string, string) error
	CanaryInfo(string) error
	CanaryCreate(string, []string) error
	CanaryRemove(string, []string) error
	CanaryRelease(string) error
	CanaryRollback(string) error
	CertsList(int) 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, string) error
	ServicesRemove(string, string, string, int) error
	GatewaysAdd(string, string, int, string) error
	GatewaysList(string, int) error
	GatewaysRemove(string, string, int, string) error
	RoutesCreate(string, string, string, string, int) error
	RoutesList(string, int) error
	RoutesGet(string, string) error
	RoutesSet(string, string, string) error
	RoutesAttach(string, string, int, string) error
	RoutesDetach(string, string, int, string) error
	RoutesRemove(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
	PermsList(string, bool, int) error
	PermCreate(string, string, bool) error
	PermDelete(string, string, bool) error
	PsList(string, int) error
	PsExec(string, string, bool, bool, []string) 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
	TLSForceEnable(string) error
	TLSForceDisable(string) error
	TLSAutoEnable(string) error
	TLSAutoDisable(string) error
	TLSAutoIssuer(string, string, string, string, string) error
	UsersList(results int) error
	UsersEnable(string) error
	UsersDisable(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
	VolumesCreate(string, string, string, string, map[string]interface{}) error
	VolumesExpand(string, string, string) error
	VolumesDelete(string, string) error
	VolumesList(string, int) error
	VolumesInfo(string, string) error
	VolumesMount(string, string, []string) error
	VolumesUnmount(string, string, []string) error
	ResourcesServices(int) error
	ResourcesPlans(string, int) error
	ResourcesCreate(string, string, string, []string, string) error
	ResourcesList(string, int) error
	ResourceDelete(string, string) error
	ResourceGet(string, string) error
	ResourcePut(string, string, string, []string, string) error
	ResourceBind(string, string) error
	ResourceUnbind(string, string) error
}

Commander is interface definition for running commands

type DryccCmd

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

DryccCmd is an implementation of Commander.

func (*DryccCmd) AppCreate

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

AppCreate creates an app.

func (*DryccCmd) AppDestroy

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

AppDestroy destroys an app.

func (*DryccCmd) AppInfo

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

AppInfo prints info about app.

func (*DryccCmd) AppLogs

func (d *DryccCmd) AppLogs(appID string, lines int, follow bool, timeout int) error

AppLogs returns the logs from an app.

func (*DryccCmd) AppOpen

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

AppOpen opens an app in the default webbrowser.

func (*DryccCmd) AppRun

func (d *DryccCmd) AppRun(appID, command string, volumeVars []string) error

AppRun runs a one time command in the app.

func (*DryccCmd) AppTransfer

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

AppTransfer transfers app ownership to another user.

func (*DryccCmd) AppsList

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

AppsList lists apps on the Drycc controller.

func (*DryccCmd) AutoscaleList

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

AutoscaleList tells the informations about app's autoscale status

func (*DryccCmd) AutoscaleSet

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

AutoscaleSet sets autoscale options for the app.

func (*DryccCmd) AutoscaleUnset

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

AutoscaleUnset removes autoscale for the app.

func (*DryccCmd) BuildsCreate

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

BuildsCreate creates a build for an app.

func (*DryccCmd) BuildsList

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

BuildsList lists an app's builds.

func (*DryccCmd) CanaryCreate added in v1.5.0

func (d *DryccCmd) CanaryCreate(appID string, processType []string) error

CanaryCreate sets canary options for the app proc type.

func (*DryccCmd) CanaryInfo added in v1.5.0

func (d *DryccCmd) CanaryInfo(appID string) error

CanaryList tells the informations about app's autoscale status

func (*DryccCmd) CanaryRelease added in v1.5.0

func (d *DryccCmd) CanaryRelease(appID string) error

CanaryRelease release canary for the app.

func (*DryccCmd) CanaryRemove added in v1.5.0

func (d *DryccCmd) CanaryRemove(appID string, processType []string) error

CanaryRemove remove canary for the app proc type.

func (*DryccCmd) CanaryRollback added in v1.5.0

func (d *DryccCmd) CanaryRollback(appID string) error

CanaryRollback rollback canary for the app.

func (*DryccCmd) CertAdd

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

CertAdd adds a cert to the controller.

func (*DryccCmd) CertAttach

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

CertAttach attaches a certificate to a domain

func (*DryccCmd) CertDetach

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

CertDetach detaches a certificate from a domain

func (*DryccCmd) CertInfo

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

CertInfo gets info about certficiate

func (*DryccCmd) CertRemove

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

CertRemove deletes a cert from the controller.

func (*DryccCmd) CertsList

func (d *DryccCmd) CertsList(results int) error

CertsList lists certs registered with the controller.

func (*DryccCmd) ConfigList

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

ConfigList lists an app's config.

func (*DryccCmd) ConfigPull

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

ConfigPull pulls an app's config to a file.

func (*DryccCmd) ConfigPush

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

ConfigPush pushes an app's config from a file.

func (*DryccCmd) ConfigSet

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

ConfigSet sets an app's config variables.

func (*DryccCmd) ConfigUnset

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

ConfigUnset removes a config variable from an app.

func (*DryccCmd) DomainsAdd

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

DomainsAdd adds a domain to an app.

func (*DryccCmd) DomainsList

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

DomainsList lists domains registered with an app.

func (*DryccCmd) DomainsRemove

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

DomainsRemove removes a domain registered with an app.

func (*DryccCmd) GatewaysAdd added in v1.5.0

func (d *DryccCmd) GatewaysAdd(appID, name string, port int, protocol string) error

GatewaysAdd adds a gateway to an app.

func (*DryccCmd) GatewaysList added in v1.5.0

func (d *DryccCmd) GatewaysList(appID string, results int) error

GatewaysList lists gateways for the app

func (*DryccCmd) GatewaysRemove added in v1.5.0

func (d *DryccCmd) GatewaysRemove(appID, name string, port int, protocol string) error

GatewaysRemove removes a gateway registered with an app.

func (*DryccCmd) GitRemote

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

GitRemote creates a git remote for a drycc app.

func (*DryccCmd) GitRemove

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

GitRemove removes a application git remote from a repository

func (*DryccCmd) HealthchecksList

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

HealthchecksList lists an app's healthchecks.

func (*DryccCmd) HealthchecksSet

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

HealthchecksSet sets an app's healthchecks.

func (*DryccCmd) HealthchecksUnset

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

HealthchecksUnset removes an app's healthchecks.

func (*DryccCmd) KeyAdd

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

KeyAdd adds keys.

func (*DryccCmd) KeyRemove

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

KeyRemove removes keys.

func (*DryccCmd) KeysList

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

KeysList lists a user's keys.

func (*DryccCmd) LabelsList

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

LabelsList list app's labels

func (*DryccCmd) LabelsSet

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

LabelsSet sets labels for app

func (*DryccCmd) LabelsUnset

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

LabelsUnset removes labels for the app.

func (*DryccCmd) LimitsList

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

LimitsList lists an app's limits.

func (*DryccCmd) LimitsSet

func (d *DryccCmd) LimitsSet(appID string, cpuLimits []string, memoryLimits []string) error

LimitsSet sets an app's limits.

func (*DryccCmd) LimitsUnset

func (d *DryccCmd) LimitsUnset(appID string, cpuLimits []string, memoryLimits []string) error

LimitsUnset removes an app's limits.

func (*DryccCmd) Login

func (d *DryccCmd) Login(controller string, sslVerify bool) error

Login to a Drycc controller.

func (*DryccCmd) Logout

func (d *DryccCmd) Logout() error

Logout from a Drycc controller.

func (*DryccCmd) PermCreate

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

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

func (*DryccCmd) PermDelete

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

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

func (*DryccCmd) PermsList

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

PermsList prints which users have permissions.

func (*DryccCmd) Print

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

Print prints a line to an output writer.

func (*DryccCmd) PrintErr

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

PrintErr prints a line to an error writer.

func (*DryccCmd) PrintErrf

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

PrintErrf prints a line to an error writer.

func (*DryccCmd) PrintErrln

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

PrintErrln prints a line to an error writer.

func (*DryccCmd) Printf

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

Printf prints a line to an error writer.

func (*DryccCmd) Println

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

Println prints a line to an output writer.

func (*DryccCmd) PsExec added in v1.4.0

func (d *DryccCmd) PsExec(appID, podID string, tty, stdin bool, command []string) error

PsList lists an app's processes.

func (*DryccCmd) PsList

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

PsList lists an app's processes.

func (*DryccCmd) PsRestart

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

PsRestart restarts an app's processes.

func (*DryccCmd) PsScale

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

PsScale scales an app's processes.

func (*DryccCmd) RegistryList

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

RegistryList lists an app's registry information.

func (*DryccCmd) RegistrySet

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

RegistrySet sets an app's registry information.

func (*DryccCmd) RegistryUnset

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

RegistryUnset removes an app's registry information.

func (*DryccCmd) ReleasesInfo

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

ReleasesInfo prints info about a specific release.

func (*DryccCmd) ReleasesList

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

ReleasesList lists an app's releases.

func (*DryccCmd) ReleasesRollback

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

ReleasesRollback rolls an app back to a previous release.

func (*DryccCmd) ResourceBind added in v1.2.0

func (d *DryccCmd) ResourceBind(appID string, name string) error

ResourceBind mount a resource to process of the application

func (*DryccCmd) ResourceDelete added in v1.2.0

func (d *DryccCmd) ResourceDelete(appID, name string) error

ResourceDelete delete a resource from the application

func (*DryccCmd) ResourceGet added in v1.2.0

func (d *DryccCmd) ResourceGet(appID, name string) error

ResourceGet describe a resource from the application

func (*DryccCmd) ResourcePut added in v1.2.0

func (d *DryccCmd) ResourcePut(appID, plan string, name string, params []string, values string) error

ResourcePut update a resource for the application

func (*DryccCmd) ResourceUnbind added in v1.2.0

func (d *DryccCmd) ResourceUnbind(appID string, name string) error

ResourceUnbind resource a resource the application

func (*DryccCmd) ResourcesCreate added in v1.2.0

func (d *DryccCmd) ResourcesCreate(appID, plan string, name string, params []string, values string) error

ResourcesCreate create a resource for the application

func (*DryccCmd) ResourcesList added in v1.2.0

func (d *DryccCmd) ResourcesList(appID string, results int) error

ResourcesList list resources in the application

func (*DryccCmd) ResourcesPlans added in v1.4.0

func (d *DryccCmd) ResourcesPlans(serviceName string, results int) error

ResourcePlans list resource plans

func (*DryccCmd) ResourcesServices added in v1.4.0

func (d *DryccCmd) ResourcesServices(results int) error

ResourceServices list resource service

func (*DryccCmd) RoutesAttach added in v1.5.0

func (d *DryccCmd) RoutesAttach(appID, name string, port int, gateway string) error

RoutesAttach bind a route to gateway.

func (*DryccCmd) RoutesCreate added in v1.5.0

func (d *DryccCmd) RoutesCreate(appID, name string, procType string, kind string, port int) error

RoutesCreate create a route to an app.

func (*DryccCmd) RoutesDetach added in v1.5.0

func (d *DryccCmd) RoutesDetach(appID, name string, port int, gateway string) error

RoutesDetach bind a route to gateway.

func (*DryccCmd) RoutesGet added in v1.5.0

func (d *DryccCmd) RoutesGet(appID string, name string) error

RoutesGet get rule of route for the app

func (*DryccCmd) RoutesList added in v1.5.0

func (d *DryccCmd) RoutesList(appID string, results int) error

RoutesList lists routes for the app

func (*DryccCmd) RoutesRemove added in v1.5.0

func (d *DryccCmd) RoutesRemove(appID, name string) error

RoutesRemove removes a route registered with an app.

func (*DryccCmd) RoutesSet added in v1.5.0

func (d *DryccCmd) RoutesSet(appID string, name string, ruleFile string) error

RoutesSet set rule of route for the app

func (*DryccCmd) RoutingDisable

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

RoutingDisable disables an app from being exposed by the router.

func (*DryccCmd) RoutingEnable

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

RoutingEnable enables an app from being exposed by the router.

func (*DryccCmd) RoutingInfo

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

RoutingInfo provides information about the status of app routing.

func (*DryccCmd) ServicesAdd

func (d *DryccCmd) ServicesAdd(appID, procfileType string, ports string, protocol string) error

ServicesAdd adds a service to an app.

func (*DryccCmd) ServicesList

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

ServicesList lists extra services for the app

func (*DryccCmd) ServicesRemove

func (d *DryccCmd) ServicesRemove(appID, procfileType string, protocol string, port int) error

ServicesRemove removes a service for procfileType registered with an app.

func (*DryccCmd) ShortcutsList

func (d *DryccCmd) ShortcutsList() error

ShortcutsList displays all relevant shortcuts for the CLI.

func (*DryccCmd) TLSAutoDisable

func (d *DryccCmd) TLSAutoDisable(appID string) error

TLSAutoDisable disables certs-auto requests to the application.

func (*DryccCmd) TLSAutoEnable

func (d *DryccCmd) TLSAutoEnable(appID string) error

TLSAutoEnable enables certs-auto requests to the application.

func (*DryccCmd) TLSAutoIssuer added in v1.5.0

func (d *DryccCmd) TLSAutoIssuer(appID string, email string, server string, keyID string, keySecret string) error

TLSAutoIssuer add issuer requests to the application.

func (*DryccCmd) TLSForceDisable added in v1.0.2

func (d *DryccCmd) TLSForceDisable(appID string) error

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

func (*DryccCmd) TLSForceEnable added in v1.0.2

func (d *DryccCmd) TLSForceEnable(appID string) error

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

func (*DryccCmd) TLSInfo

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

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

func (*DryccCmd) TagsList

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

TagsList lists an app's tags.

func (*DryccCmd) TagsSet

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

TagsSet sets an app's tags.

func (*DryccCmd) TagsUnset

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

TagsUnset removes an app's tags.

func (*DryccCmd) TimeoutsList

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

TimeoutsList lists an app's timeouts.

func (*DryccCmd) TimeoutsSet

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

TimeoutsSet sets an app's timeouts.

func (*DryccCmd) TimeoutsUnset

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

TimeoutsUnset removes an app's timeouts.

func (*DryccCmd) UsersDisable added in v1.2.0

func (d *DryccCmd) UsersDisable(username string) error

UsersDisable disable user with the controller.

func (*DryccCmd) UsersEnable added in v1.2.0

func (d *DryccCmd) UsersEnable(username string) error

UsersEnable enable user with the controller.

func (*DryccCmd) UsersList

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

UsersList lists users registered with the controller.

func (*DryccCmd) Version

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

Version prints the various CLI versions.

func (*DryccCmd) VolumesCreate added in v1.2.0

func (d *DryccCmd) VolumesCreate(appID, name, vType, size string, parameters map[string]interface{}) error

VolumesCreate create a volume for the application

func (*DryccCmd) VolumesDelete added in v1.2.0

func (d *DryccCmd) VolumesDelete(appID, name string) error

VolumesDelete delete a volume from the application

func (*DryccCmd) VolumesExpand added in v1.4.0

func (d *DryccCmd) VolumesExpand(appID, name, size string) error

VolumesExpand create a volume for the application

func (*DryccCmd) VolumesInfo added in v1.5.2

func (d *DryccCmd) VolumesInfo(appID, name string) error

VolumesInfo get volume in the application

func (*DryccCmd) VolumesList added in v1.2.0

func (d *DryccCmd) VolumesList(appID string, results int) error

VolumesList list volumes in the application

func (*DryccCmd) VolumesMount added in v1.2.0

func (d *DryccCmd) VolumesMount(appID string, name string, volumeVars []string) error

VolumesMount mount a volume to process of the application

func (*DryccCmd) VolumesUnmount added in v1.2.0

func (d *DryccCmd) VolumesUnmount(appID string, name string, volumeVars []string) error

VolumesUnmount unmount a volume from process of the application

func (*DryccCmd) Whoami

func (d *DryccCmd) 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