commands

package
v1.96.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 78 Imported by: 26

Documentation

Index

Constants

View Source
const (
	// AppsDevDefaultEnvFile is the default env file path.
	AppsDevDefaultEnvFile = ".env"
)
View Source
const (
	// DOSecretOperatorAnnotation is the annotation key so that dosecret operator can do it's magic
	// and help users pull private images automatically in their DOKS clusters
	DOSecretOperatorAnnotation = "digitalocean.com/dosecret-identifier"
)
View Source
const (
	// DefaultDevConfigFile is the name of the default dev configuration file.
	DefaultDevConfigFile = "dev-config.yaml"
)
View Source
const (
	// TokenValidationServer is the default server used to validate an OAuth token
	TokenValidationServer = "https://cloud.digitalocean.com"
)

Variables

View Source
var (
	//DoitCmd is the root level doctl command that all other commands attach to
	DoitCmd = &Command{
		Command: &cobra.Command{
			Use:   "doctl",
			Short: "doctl is a command line interface (CLI) for the DigitalOcean API.",
		},
	}

	//Writer wires up stdout for all commands to write to
	Writer = os.Stdout
	//APIURL customize API base URL
	APIURL string
	//Context current auth context
	Context string
	//Output global output format
	Output string
	//Token global authorization token
	Token string
	//Trace toggles http tracing output
	Trace bool
	//Verbose toggle verbose output on and off
	Verbose bool
	//Interactive toggle interactive behavior
	Interactive bool
)
View Source
var (

	// ErrExitSilently instructs doctl to exit silently with a bad status code. This can be used to fail a command
	// without printing an error message to the screen.
	//
	// IMPORTANT! Make sure to print your own error message if you use this! It is important for users to know
	// what caused the failure.
	ErrExitSilently = fmt.Errorf("")
)
View Source
var (
	ErrUnknownTerminal = errors.New("unknown terminal")
)

ErrUnknownTerminal signifies an unknown terminal. It is returned when doit can't ascertain the current terminal type with requesting an auth token.

Functions

func AddBoolFlag added in v1.0.0

func AddBoolFlag(cmd *Command, name, shorthand string, def bool, desc string, opts ...flagOpt)

AddBoolFlag adds a boolean flag to a command.

func AddDurationFlag added in v1.82.0

func AddDurationFlag(cmd *Command, name, shorthand string, def time.Duration, desc string, opts ...flagOpt)

AddDurationFlag adds a duration flag to a command.

func AddIntFlag added in v1.0.0

func AddIntFlag(cmd *Command, name, shorthand string, def int, desc string, opts ...flagOpt)

AddIntFlag adds an integr flag to a command.

func AddStringFlag added in v1.0.0

func AddStringFlag(cmd *Command, name, shorthand, dflt, desc string, opts ...flagOpt)

AddStringFlag adds a string flag to a command.

func AddStringMapStringFlag added in v1.38.0

func AddStringMapStringFlag(cmd *Command, name, shorthand string, def map[string]string, desc string, opts ...flagOpt)

AddStringMapStringFlag adds a map of strings by strings flag to a command.

func AddStringSliceFlag added in v1.0.0

func AddStringSliceFlag(cmd *Command, name, shorthand string, def []string, desc string, opts ...flagOpt)

AddStringSliceFlag adds a string slice flag to a command.

func AskForConfirm added in v1.5.0

func AskForConfirm(message string) error

AskForConfirm parses and verifies user input for confirmation.

func AskForConfirmDelete added in v1.42.0

func AskForConfirmDelete(resourceType string, count int) error

AskForConfirmDelete builds a message to ask the user to confirm deleting one or multiple resources and then sends it through to AskForConfirm to parses and verifies user input.

func ContextualAtoi added in v1.54.1

func ContextualAtoi(s, resource string) (int, error)

ContextualAtoi cleans the error output of Atoi calls

func Execute

func Execute()

Execute executes the current command using DoitCmd.

func RunAccountGet

func RunAccountGet(c *CmdConfig) error

RunAccountGet runs account get.

func RunAccountRateLimit added in v1.0.0

func RunAccountRateLimit(c *CmdConfig) error

RunAccountRateLimit retrieves API rate limits for the account.

func RunActivationsGet added in v1.74.0

func RunActivationsGet(c *CmdConfig) error

RunActivationsGet supports the 'activations get' command

func RunActivationsList added in v1.74.0

func RunActivationsList(c *CmdConfig) error

RunActivationsList supports the 'activations list' command

func RunActivationsLogs added in v1.74.0

func RunActivationsLogs(c *CmdConfig) error

RunActivationsLogs supports the 'activations logs' command

func RunActivationsResult added in v1.74.0

func RunActivationsResult(c *CmdConfig) error

RunActivationsResult supports the 'activations result' command

func RunAppListAlerts added in v1.64.0

func RunAppListAlerts(c *CmdConfig) error

RunAppListAlerts gets configured alerts on an app

func RunAppListBuildpacks added in v1.86.0

func RunAppListBuildpacks(c *CmdConfig) error

RunAppListBuildpacks lists buildpacks

func RunAppUpdateAlertDestinations added in v1.64.0

func RunAppUpdateAlertDestinations(c *CmdConfig) error

func RunAppUpgradeBuildpack added in v1.86.0

func RunAppUpgradeBuildpack(c *CmdConfig) error

RunAppUpgradeBuildpack upgrades a buildpack for an app

func RunAppsCreate added in v1.46.0

func RunAppsCreate(c *CmdConfig) error

RunAppsCreate creates an app.

func RunAppsCreateDeployment added in v1.46.0

func RunAppsCreateDeployment(c *CmdConfig) error

RunAppsCreateDeployment creates a deployment for an app.

func RunAppsDelete added in v1.46.0

func RunAppsDelete(c *CmdConfig) error

RunAppsDelete deletes an app.

func RunAppsDevBuild added in v1.82.0

func RunAppsDevBuild(c *CmdConfig) error

RunAppsDevBuild builds an app component locally.

func RunAppsDevConfigSet added in v1.82.0

func RunAppsDevConfigSet(c *CmdConfig) error

RunAppsDevConfigSet runs the set configuration command.

func RunAppsDevConfigUnset added in v1.82.0

func RunAppsDevConfigUnset(c *CmdConfig) error

RunAppsDevConfigUnset runs the unset configuration command.

func RunAppsGet added in v1.46.0

func RunAppsGet(c *CmdConfig) error

RunAppsGet gets an app.

func RunAppsGetDeployment added in v1.46.0

func RunAppsGetDeployment(c *CmdConfig) error

RunAppsGetDeployment gets a deployment for an app.

func RunAppsGetLogs added in v1.46.0

func RunAppsGetLogs(c *CmdConfig) error

RunAppsGetLogs gets app logs for a given component.

func RunAppsList added in v1.46.0

func RunAppsList(c *CmdConfig) error

RunAppsList lists all apps.

func RunAppsListDeployments added in v1.46.0

func RunAppsListDeployments(c *CmdConfig) error

RunAppsListDeployments lists deployments for an app.

func RunAppsListRegions added in v1.50.0

func RunAppsListRegions(c *CmdConfig) error

RunAppsListRegions lists all app platform regions.

func RunAppsPropose added in v1.59.0

func RunAppsPropose(c *CmdConfig) error

RunAppsPropose proposes an app spec

func RunAppsSpecGet added in v1.47.0

func RunAppsSpecGet(c *CmdConfig) error

RunAppsSpecGet gets the spec for an app

func RunAppsSpecValidate added in v1.47.0

func RunAppsSpecValidate(c *CmdConfig) error

RunAppsSpecValidate validates an app spec file

func RunAppsTierGet added in v1.50.0

func RunAppsTierGet(c *CmdConfig) error

RunAppsTierGet gets an app tier.

func RunAppsTierInstanceSizeGet added in v1.50.0

func RunAppsTierInstanceSizeGet(c *CmdConfig) error

RunAppsTierInstanceSizeGet gets an app tier.

func RunAppsTierInstanceSizeList added in v1.50.0

func RunAppsTierInstanceSizeList(c *CmdConfig) error

RunAppsTierInstanceSizeList lists all app tiers.

func RunAppsTierList added in v1.50.0

func RunAppsTierList(c *CmdConfig) error

RunAppsTierList lists all app tiers.

func RunAppsUpdate added in v1.46.0

func RunAppsUpdate(c *CmdConfig) error

RunAppsUpdate updates an app.

func RunAuthInit added in v1.4.0

func RunAuthInit(retrieveUserTokenFunc func() (string, error)) func(c *CmdConfig) error

RunAuthInit initializes the doctl config. Configuration is stored in $XDG_CONFIG_HOME/doctl. On Unix, if XDG_CONFIG_HOME is not set, use $HOME/.config. On Windows use %APPDATA%/doctl/config.

func RunAuthList added in v1.29.0

func RunAuthList(c *CmdConfig) error

RunAuthList lists all available auth contexts from the user's doctl config.

func RunAuthRemove added in v1.60.0

func RunAuthRemove(c *CmdConfig) error

RunAuthRemove remove available auth contexts from the user's doctl config.

func RunAuthSwitch added in v1.8.0

func RunAuthSwitch(c *CmdConfig) error

RunAuthSwitch changes the default context and writes it to the configuration.

func RunBalanceGet added in v1.37.0

func RunBalanceGet(c *CmdConfig) error

RunBalanceGet runs balance get.

func RunBillingHistoryList added in v1.40.0

func RunBillingHistoryList(c *CmdConfig) error

RunBillingHistoryList runs invoice list.

func RunCDNCreate added in v1.9.0

func RunCDNCreate(c *CmdConfig) error

RunCDNCreate creates a cdn.

func RunCDNDelete added in v1.9.0

func RunCDNDelete(c *CmdConfig) error

RunCDNDelete deletes a cdn.

func RunCDNFlushCache added in v1.9.0

func RunCDNFlushCache(c *CmdConfig) error

RunCDNFlushCache flushes the cache of an individual cdn

func RunCDNGet added in v1.9.0

func RunCDNGet(c *CmdConfig) error

RunCDNGet returns an individual CDN.

func RunCDNList added in v1.9.0

func RunCDNList(c *CmdConfig) error

RunCDNList returns a list of CDNs.

func RunCDNUpdate added in v1.14.0

func RunCDNUpdate(c *CmdConfig) error

RunCDNUpdate updates an individual cdn

func RunCancelGarbageCollection added in v1.50.0

func RunCancelGarbageCollection(c *CmdConfig) error

RunCancelGarbageCollection gets the specified registry's currently-active garbage collection.

func RunCertificateCreate added in v1.6.0

func RunCertificateCreate(c *CmdConfig) error

RunCertificateCreate creates a certificate.

func RunCertificateDelete added in v1.6.0

func RunCertificateDelete(c *CmdConfig) error

RunCertificateDelete deletes a certificate by its identifier.

func RunCertificateGet added in v1.6.0

func RunCertificateGet(c *CmdConfig) error

RunCertificateGet retrieves an existing certificate by its identifier.

func RunCertificateList added in v1.6.0

func RunCertificateList(c *CmdConfig) error

RunCertificateList lists certificates.

func RunCmdActionGet

func RunCmdActionGet(c *CmdConfig) error

RunCmdActionGet runs action get.

func RunCmdActionList

func RunCmdActionList(c *CmdConfig) error

RunCmdActionList run action list.

func RunCmdActionWait added in v1.0.0

func RunCmdActionWait(c *CmdConfig) error

RunCmdActionWait waits for an action to complete or error.

func RunCmdAlertPolicyCreate added in v1.63.1

func RunCmdAlertPolicyCreate(c *CmdConfig) error

RunCmdAlertPolicyCreate runs alert policy create.

func RunCmdAlertPolicyDelete added in v1.63.1

func RunCmdAlertPolicyDelete(c *CmdConfig) error

RunCmdAlertPolicyDelete runs alert policy delete.

func RunCmdAlertPolicyGet added in v1.63.1

func RunCmdAlertPolicyGet(c *CmdConfig) error

RunCmdAlertPolicyGet runs alert policy get.

func RunCmdAlertPolicyList added in v1.63.1

func RunCmdAlertPolicyList(c *CmdConfig) error

RunCmdAlertPolicyList runs alert policy list.

func RunCmdAlertPolicyUpdate added in v1.63.1

func RunCmdAlertPolicyUpdate(c *CmdConfig) error

RunCmdAlertPolicyUpdate runs alert policy update.

func RunCmdApplyTag added in v1.72.0

func RunCmdApplyTag(c *CmdConfig) error

RunCmdApplyTag applies a tag to one or more resources.

func RunCmdRemoveTag added in v1.72.0

func RunCmdRemoveTag(c *CmdConfig) error

RunCmdRemoveTag removes a tag from one or more resources.

func RunCmdTagCreate added in v1.1.0

func RunCmdTagCreate(c *CmdConfig) error

RunCmdTagCreate runs tag create.

func RunCmdTagDelete added in v1.1.0

func RunCmdTagDelete(c *CmdConfig) error

RunCmdTagDelete runs tag delete.

func RunCmdTagGet added in v1.1.0

func RunCmdTagGet(c *CmdConfig) error

RunCmdTagGet runs tag get.

func RunCmdTagList added in v1.1.0

func RunCmdTagList(c *CmdConfig) error

RunCmdTagList runs tag list.

func RunDatabaseBackupsList added in v1.15.0

func RunDatabaseBackupsList(c *CmdConfig) error

RunDatabaseBackupsList lists all the backups for a database cluster

func RunDatabaseConnectionGet added in v1.15.0

func RunDatabaseConnectionGet(c *CmdConfig) error

RunDatabaseConnectionGet gets database connection info

func RunDatabaseCreate added in v1.15.0

func RunDatabaseCreate(c *CmdConfig) error

RunDatabaseCreate creates a database cluster

func RunDatabaseDBCreate added in v1.15.0

func RunDatabaseDBCreate(c *CmdConfig) error

RunDatabaseDBCreate creates a database for a database cluster

func RunDatabaseDBDelete added in v1.15.0

func RunDatabaseDBDelete(c *CmdConfig) error

RunDatabaseDBDelete deletes a database

func RunDatabaseDBGet added in v1.15.0

func RunDatabaseDBGet(c *CmdConfig) error

RunDatabaseDBGet retrieves a database for a specific database cluster

func RunDatabaseDBList added in v1.15.0

func RunDatabaseDBList(c *CmdConfig) error

RunDatabaseDBList retrieves a list of databases for specific database cluster

func RunDatabaseDelete added in v1.15.0

func RunDatabaseDelete(c *CmdConfig) error

RunDatabaseDelete deletes a database cluster

func RunDatabaseEngineOptions added in v1.79.0

func RunDatabaseEngineOptions(c *CmdConfig) error

RunDatabaseEngineOptions retrieves a list of the available database engines

func RunDatabaseFirewallRulesAppend added in v1.56.0

func RunDatabaseFirewallRulesAppend(c *CmdConfig) error

RunDatabaseFirewallRulesAppend creates a firewall rule for a database cluster.

Any new rules will be appended to the existing rules. If you want to replace rules, use RunDatabaseFirewallRulesUpdate.

func RunDatabaseFirewallRulesList added in v1.56.0

func RunDatabaseFirewallRulesList(c *CmdConfig) error

RunDatabaseFirewallRulesList retrieves a list of firewalls for specific database cluster

func RunDatabaseFirewallRulesRemove added in v1.56.0

func RunDatabaseFirewallRulesRemove(c *CmdConfig) error

RunDatabaseFirewallRulesRemove removes a firewall rule for a database cluster via Firewall rule UUID

func RunDatabaseFirewallRulesUpdate added in v1.56.0

func RunDatabaseFirewallRulesUpdate(c *CmdConfig) error

RunDatabaseFirewallRulesUpdate replaces previous rules with the rules passed in to --rules

func RunDatabaseFork added in v1.93.0

func RunDatabaseFork(c *CmdConfig) error

RunDatabaseFork creates a database cluster by forking an existing cluster.

func RunDatabaseGet added in v1.15.0

func RunDatabaseGet(c *CmdConfig) error

RunDatabaseGet returns an individual database cluster

func RunDatabaseGetSQLModes added in v1.35.0

func RunDatabaseGetSQLModes(c *CmdConfig) error

RunDatabaseGetSQLModes gets the sql modes set on the database

func RunDatabaseList added in v1.15.0

func RunDatabaseList(c *CmdConfig) error

RunDatabaseList returns a list of database clusters.

func RunDatabaseMaintenanceGet added in v1.15.0

func RunDatabaseMaintenanceGet(c *CmdConfig) error

RunDatabaseMaintenanceGet retrieves the maintenance window info for a database cluster

func RunDatabaseMaintenanceUpdate added in v1.15.0

func RunDatabaseMaintenanceUpdate(c *CmdConfig) error

RunDatabaseMaintenanceUpdate updates the maintenance window info for a database cluster

func RunDatabaseMigrate added in v1.15.0

func RunDatabaseMigrate(c *CmdConfig) error

RunDatabaseMigrate migrates a database cluster to a new region

func RunDatabasePoolCreate added in v1.15.0

func RunDatabasePoolCreate(c *CmdConfig) error

RunDatabasePoolCreate creates a database pool for a database cluster

func RunDatabasePoolDelete added in v1.15.0

func RunDatabasePoolDelete(c *CmdConfig) error

RunDatabasePoolDelete deletes a database pool

func RunDatabasePoolGet added in v1.15.0

func RunDatabasePoolGet(c *CmdConfig) error

RunDatabasePoolGet retrieves a database pool for a specific database cluster

func RunDatabasePoolList added in v1.15.0

func RunDatabasePoolList(c *CmdConfig) error

RunDatabasePoolList retrieves a list of pools for specific database cluster

func RunDatabaseRegionOptions added in v1.79.0

func RunDatabaseRegionOptions(c *CmdConfig) error

RunDatabaseRegionOptions retrieves a list of the available regions for a given database engine

func RunDatabaseReplicaConnectionGet added in v1.15.0

func RunDatabaseReplicaConnectionGet(c *CmdConfig) error

RunDatabaseReplicaConnectionGet gets read-only replica connection info

func RunDatabaseReplicaCreate added in v1.15.0

func RunDatabaseReplicaCreate(c *CmdConfig) error

RunDatabaseReplicaCreate creates a read-only replica for a database cluster

func RunDatabaseReplicaDelete added in v1.15.0

func RunDatabaseReplicaDelete(c *CmdConfig) error

RunDatabaseReplicaDelete deletes a read-only replica

func RunDatabaseReplicaGet added in v1.15.0

func RunDatabaseReplicaGet(c *CmdConfig) error

RunDatabaseReplicaGet retrieves a read-only replica for a specific database cluster

func RunDatabaseReplicaList added in v1.15.0

func RunDatabaseReplicaList(c *CmdConfig) error

RunDatabaseReplicaList retrieves a list of replicas for specific database cluster

func RunDatabaseReplicaPromote added in v1.93.2

func RunDatabaseReplicaPromote(c *CmdConfig) error

RunDatabaseReplicaPromote promotes a read-only replica to become a primary cluster

func RunDatabaseResize added in v1.15.0

func RunDatabaseResize(c *CmdConfig) error

RunDatabaseResize resizes a database cluster

func RunDatabaseSetSQLModes added in v1.35.0

func RunDatabaseSetSQLModes(c *CmdConfig) error

RunDatabaseSetSQLModes sets the sql modes on the database

func RunDatabaseSlugOptions added in v1.79.0

func RunDatabaseSlugOptions(c *CmdConfig) error

RunDatabaseSlugOptions retrieves a list of the available slugs for a given database engine

func RunDatabaseUserCreate added in v1.15.0

func RunDatabaseUserCreate(c *CmdConfig) error

RunDatabaseUserCreate creates a database user for a database cluster

func RunDatabaseUserDelete added in v1.15.0

func RunDatabaseUserDelete(c *CmdConfig) error

RunDatabaseUserDelete deletes a database user

func RunDatabaseUserGet added in v1.15.0

func RunDatabaseUserGet(c *CmdConfig) error

RunDatabaseUserGet retrieves a database user for a specific database cluster

func RunDatabaseUserList added in v1.15.0

func RunDatabaseUserList(c *CmdConfig) error

RunDatabaseUserList retrieves a list of users for specific database cluster

func RunDatabaseUserResetAuth added in v1.39.0

func RunDatabaseUserResetAuth(c *CmdConfig) error

func RunDatabaseVersionOptions added in v1.79.0

func RunDatabaseVersionOptions(c *CmdConfig) error

RunDatabaseVersionOptions retrieves a list of the available versions for a given database engine

func RunDockerConfig added in v1.44.0

func RunDockerConfig(c *CmdConfig) error

RunDockerConfig generates credentials and prints a Docker config that can be used to authenticate a Docker client with the registry.

func RunDomainCreate

func RunDomainCreate(c *CmdConfig) error

RunDomainCreate runs domain create.

func RunDomainDelete

func RunDomainDelete(c *CmdConfig) error

RunDomainDelete deletes a domain by name.

func RunDomainGet

func RunDomainGet(c *CmdConfig) error

RunDomainGet retrieves a domain by name.

func RunDomainList

func RunDomainList(c *CmdConfig) error

RunDomainList runs domain create.

func RunDropletActionChangeKernel

func RunDropletActionChangeKernel(c *CmdConfig) error

RunDropletActionChangeKernel changes the kernel for a droplet.

func RunDropletActionDisableBackups

func RunDropletActionDisableBackups(c *CmdConfig) error

RunDropletActionDisableBackups disables backups for a droplet.

func RunDropletActionEnableBackups added in v1.8.2

func RunDropletActionEnableBackups(c *CmdConfig) error

RunDropletActionEnableBackups disables backups for a droplet.

func RunDropletActionEnableIPv6

func RunDropletActionEnableIPv6(c *CmdConfig) error

RunDropletActionEnableIPv6 enables IPv6 for a droplet.

func RunDropletActionEnablePrivateNetworking

func RunDropletActionEnablePrivateNetworking(c *CmdConfig) error

RunDropletActionEnablePrivateNetworking enables private networking for a droplet.

func RunDropletActionGet

func RunDropletActionGet(c *CmdConfig) error

RunDropletActionGet returns a droplet action by id.

func RunDropletActionPasswordReset

func RunDropletActionPasswordReset(c *CmdConfig) error

RunDropletActionPasswordReset resets the droplet root password.

func RunDropletActionPowerCycle

func RunDropletActionPowerCycle(c *CmdConfig) error

RunDropletActionPowerCycle power cycles a droplet.

func RunDropletActionPowerOff

func RunDropletActionPowerOff(c *CmdConfig) error

RunDropletActionPowerOff turns droplet power off.

func RunDropletActionPowerOn

func RunDropletActionPowerOn(c *CmdConfig) error

RunDropletActionPowerOn turns droplet power on.

func RunDropletActionReboot

func RunDropletActionReboot(c *CmdConfig) error

RunDropletActionReboot reboots a droplet.

func RunDropletActionRebuild

func RunDropletActionRebuild(c *CmdConfig) error

RunDropletActionRebuild rebuilds a droplet using an image id or slug.

func RunDropletActionRename

func RunDropletActionRename(c *CmdConfig) error

RunDropletActionRename renames a droplet.

func RunDropletActionResize

func RunDropletActionResize(c *CmdConfig) error

RunDropletActionResize resizes a droplet giving a size slug and optionally expands the disk.

func RunDropletActionRestore

func RunDropletActionRestore(c *CmdConfig) error

RunDropletActionRestore restores a droplet using an image id.

func RunDropletActionShutdown

func RunDropletActionShutdown(c *CmdConfig) error

RunDropletActionShutdown shuts a droplet down.

func RunDropletActionSnapshot

func RunDropletActionSnapshot(c *CmdConfig) error

RunDropletActionSnapshot creates a snapshot for a droplet.

func RunDropletActions

func RunDropletActions(c *CmdConfig) error

RunDropletActions returns a list of actions for a droplet.

func RunDropletBackups

func RunDropletBackups(c *CmdConfig) error

RunDropletBackups returns a list of backup images for a droplet.

func RunDropletCreate

func RunDropletCreate(c *CmdConfig) error

RunDropletCreate creates a droplet.

func RunDropletDelete

func RunDropletDelete(c *CmdConfig) error

RunDropletDelete destroy a droplet by id.

func RunDropletGet

func RunDropletGet(c *CmdConfig) error

RunDropletGet returns a droplet.

func RunDropletKernels

func RunDropletKernels(c *CmdConfig) error

RunDropletKernels returns a list of available kernels for a droplet.

func RunDropletList

func RunDropletList(c *CmdConfig) error

RunDropletList returns a list of droplets.

func RunDropletNeighbors

func RunDropletNeighbors(c *CmdConfig) error

RunDropletNeighbors returns a list of droplet neighbors.

func RunDropletOneClickList added in v1.45.0

func RunDropletOneClickList(c *CmdConfig) error

RunDropletOneClickList retrieves a list of 1-clicks for Droplets.

func RunDropletSnapshots

func RunDropletSnapshots(c *CmdConfig) error

RunDropletSnapshots returns a list of available kernels for a droplet.

func RunDropletTag added in v1.1.0

func RunDropletTag(c *CmdConfig) error

RunDropletTag adds a tag to a droplet.

func RunDropletUntag added in v1.1.0

func RunDropletUntag(c *CmdConfig) error

RunDropletUntag untags a droplet.

func RunFirewallAddDroplets added in v1.7.0

func RunFirewallAddDroplets(c *CmdConfig) error

RunFirewallAddDroplets adds droplets to a Firewall.

func RunFirewallAddRules added in v1.7.0

func RunFirewallAddRules(c *CmdConfig) error

RunFirewallAddRules adds rules to a Firewall.

func RunFirewallAddTags added in v1.7.0

func RunFirewallAddTags(c *CmdConfig) error

RunFirewallAddTags adds tags to a Firewall.

func RunFirewallCreate added in v1.7.0

func RunFirewallCreate(c *CmdConfig) error

RunFirewallCreate creates a new Firewall with a given configuration.

func RunFirewallDelete added in v1.7.0

func RunFirewallDelete(c *CmdConfig) error

RunFirewallDelete deletes a Firewall by its identifier.

func RunFirewallGet added in v1.7.0

func RunFirewallGet(c *CmdConfig) error

RunFirewallGet retrieves an existing Firewall by its identifier.

func RunFirewallList added in v1.7.0

func RunFirewallList(c *CmdConfig) error

RunFirewallList lists Firewalls.

func RunFirewallListByDroplet added in v1.7.0

func RunFirewallListByDroplet(c *CmdConfig) error

RunFirewallListByDroplet lists Firewalls for a given Droplet.

func RunFirewallRemoveDroplets added in v1.7.0

func RunFirewallRemoveDroplets(c *CmdConfig) error

RunFirewallRemoveDroplets removes droplets from a Firewall.

func RunFirewallRemoveRules added in v1.7.0

func RunFirewallRemoveRules(c *CmdConfig) error

RunFirewallRemoveRules removes rules from a Firewall.

func RunFirewallRemoveTags added in v1.7.0

func RunFirewallRemoveTags(c *CmdConfig) error

RunFirewallRemoveTags removes tags from a Firewall.

func RunFirewallUpdate added in v1.7.0

func RunFirewallUpdate(c *CmdConfig) error

RunFirewallUpdate updates an existing Firewall with new configuration.

func RunFunctionsGet added in v1.74.0

func RunFunctionsGet(c *CmdConfig) error

RunFunctionsGet supports the 'serverless functions get' command

func RunFunctionsInvoke added in v1.74.0

func RunFunctionsInvoke(c *CmdConfig) error

RunFunctionsInvoke supports the 'serverless functions invoke' command

func RunFunctionsList added in v1.74.0

func RunFunctionsList(c *CmdConfig) error

RunFunctionsList supports the 'serverless functions list' command

func RunGetGarbageCollection added in v1.50.0

func RunGetGarbageCollection(c *CmdConfig) error

RunGetGarbageCollection gets the specified registry's currently-active garbage collection.

func RunGetRegistryOptionsRegions added in v1.71.0

func RunGetRegistryOptionsRegions(c *CmdConfig) error

func RunImageActionsGet

func RunImageActionsGet(c *CmdConfig) error

RunImageActionsGet retrieves an action for an image.

func RunImageActionsTransfer

func RunImageActionsTransfer(c *CmdConfig) error

RunImageActionsTransfer an image.

func RunImagesCreate added in v1.33.0

func RunImagesCreate(c *CmdConfig) error

RunImagesCreate creates a new custom image.

func RunImagesDelete

func RunImagesDelete(c *CmdConfig) error

RunImagesDelete deletes an image.

func RunImagesGet

func RunImagesGet(c *CmdConfig) error

RunImagesGet retrieves an image by id or slug.

func RunImagesList

func RunImagesList(c *CmdConfig) error

RunImagesList images.

func RunImagesListApplication

func RunImagesListApplication(c *CmdConfig) error

RunImagesListApplication lists application images.

func RunImagesListDistribution

func RunImagesListDistribution(c *CmdConfig) error

RunImagesListDistribution lists distributions that are available.

func RunImagesListUser

func RunImagesListUser(c *CmdConfig) error

RunImagesListUser lists user images.

func RunImagesUpdate

func RunImagesUpdate(c *CmdConfig) error

RunImagesUpdate updates an image.

func RunInvoicesGet added in v1.39.0

func RunInvoicesGet(c *CmdConfig) error

RunInvoicesGet runs invoice get.

func RunInvoicesGetCSV added in v1.39.0

func RunInvoicesGetCSV(c *CmdConfig) error

RunInvoicesGetCSV runs an invoice get csv.

func RunInvoicesGetPDF added in v1.39.0

func RunInvoicesGetPDF(c *CmdConfig) error

RunInvoicesGetPDF runs an invoice get pdf.

func RunInvoicesList added in v1.39.0

func RunInvoicesList(c *CmdConfig) error

RunInvoicesList runs invoice list.

func RunInvoicesSummary added in v1.39.0

func RunInvoicesSummary(c *CmdConfig) error

RunInvoicesSummary runs an invoice summary.

func RunKeyCreate

func RunKeyCreate(c *CmdConfig) error

RunKeyCreate uploads a SSH key.

func RunKeyDelete

func RunKeyDelete(c *CmdConfig) error

RunKeyDelete deletes a key.

func RunKeyGet

func RunKeyGet(c *CmdConfig) error

RunKeyGet retrieves a key.

func RunKeyImport

func RunKeyImport(c *CmdConfig) error

RunKeyImport imports a key from a file

func RunKeyList

func RunKeyList(c *CmdConfig) error

RunKeyList lists keys.

func RunKeyUpdate

func RunKeyUpdate(c *CmdConfig) error

RunKeyUpdate updates a key.

func RunKubernetesManifest added in v1.34.0

func RunKubernetesManifest(c *CmdConfig) error

RunKubernetesManifest prints a Kubernetes manifest that provides read/pull access to the registry

func RunKubernetesOneClickInstall added in v1.56.0

func RunKubernetesOneClickInstall(c *CmdConfig) error

RunKubernetesOneClickInstall installs 1-click apps on a kubernetes cluster.

func RunKubernetesOneClickList added in v1.45.0

func RunKubernetesOneClickList(c *CmdConfig) error

RunKubernetesOneClickList retrieves a list of 1-clicks for kubernetes.

func RunListGarbageCollections added in v1.50.0

func RunListGarbageCollections(c *CmdConfig) error

RunListGarbageCollections gets the specified registry's currently-active garbage collection.

func RunListRepositories added in v1.42.0

func RunListRepositories(c *CmdConfig) error

RunListRepositories lists repositories for the registry

func RunListRepositoriesV2 added in v1.68.0

func RunListRepositoriesV2(c *CmdConfig) error

RunListRepositoriesV2 lists repositories for the registry

func RunListRepositoryManifests added in v1.68.0

func RunListRepositoryManifests(c *CmdConfig) error

RunListRepositoryManifests lists manifests for the repository in a registry

func RunListRepositoryTags added in v1.42.0

func RunListRepositoryTags(c *CmdConfig) error

RunListRepositoryTags lists tags for the repository in a registry

func RunLoadBalancerAddDroplets added in v1.6.0

func RunLoadBalancerAddDroplets(c *CmdConfig) error

RunLoadBalancerAddDroplets adds droplets to a load balancer.

func RunLoadBalancerAddForwardingRules added in v1.6.0

func RunLoadBalancerAddForwardingRules(c *CmdConfig) error

RunLoadBalancerAddForwardingRules adds forwarding rules to a load balancer.

func RunLoadBalancerCreate added in v1.6.0

func RunLoadBalancerCreate(c *CmdConfig) error

RunLoadBalancerCreate creates a new load balancer with a given configuration.

func RunLoadBalancerDelete added in v1.6.0

func RunLoadBalancerDelete(c *CmdConfig) error

RunLoadBalancerDelete deletes a load balancer by its identifier.

func RunLoadBalancerGet added in v1.6.0

func RunLoadBalancerGet(c *CmdConfig) error

RunLoadBalancerGet retrieves an existing load balancer by its identifier.

func RunLoadBalancerList added in v1.6.0

func RunLoadBalancerList(c *CmdConfig) error

RunLoadBalancerList lists load balancers.

func RunLoadBalancerRemoveDroplets added in v1.6.0

func RunLoadBalancerRemoveDroplets(c *CmdConfig) error

RunLoadBalancerRemoveDroplets removes droplets from a load balancer.

func RunLoadBalancerRemoveForwardingRules added in v1.6.0

func RunLoadBalancerRemoveForwardingRules(c *CmdConfig) error

RunLoadBalancerRemoveForwardingRules removes forwarding rules from a load balancer.

func RunLoadBalancerUpdate added in v1.6.0

func RunLoadBalancerUpdate(c *CmdConfig) error

RunLoadBalancerUpdate updates an existing load balancer with new configuration.

func RunNamespacesCreate added in v1.80.0

func RunNamespacesCreate(c *CmdConfig) error

RunNamespacesCreate supports the 'serverless namespaces create' command

func RunNamespacesDelete added in v1.80.0

func RunNamespacesDelete(c *CmdConfig) error

RunNamespacesDelete supports the 'serverless namespaces delete' command

func RunNamespacesList added in v1.80.0

func RunNamespacesList(c *CmdConfig) error

RunNamespacesList supports the 'serverless namespaces list' command

func RunNamespacesListRegions added in v1.80.0

func RunNamespacesListRegions(c *CmdConfig) error

RunNamespacesListRegions supports the 'serverless namespaces list-regions' command

func RunOneClickList added in v1.44.0

func RunOneClickList(c *CmdConfig) error

RunOneClickList retrieves a list of 1-clicks by type. If no type is specified then all types are returned.

func RunPluginList added in v1.0.0

func RunPluginList(c *CmdConfig) error

RunPluginList is a command for listing available plugins.

func RunPluginRun added in v1.0.0

func RunPluginRun(c *CmdConfig) error

RunPluginRun is a command for running a plugin.

func RunProjectResourcesAssign added in v1.11.0

func RunProjectResourcesAssign(c *CmdConfig) error

RunProjectResourcesAssign assigns a Project Resource.

func RunProjectResourcesGet added in v1.11.0

func RunProjectResourcesGet(c *CmdConfig) error

RunProjectResourcesGet retrieves a Project Resource.

func RunProjectResourcesList added in v1.11.0

func RunProjectResourcesList(c *CmdConfig) error

RunProjectResourcesList lists the Projects.

func RunProjectsCreate added in v1.11.0

func RunProjectsCreate(c *CmdConfig) error

RunProjectsCreate creates a new Project with a given configuration.

func RunProjectsDelete added in v1.11.0

func RunProjectsDelete(c *CmdConfig) error

RunProjectsDelete deletes a Project with a given configuration.

func RunProjectsGet added in v1.11.0

func RunProjectsGet(c *CmdConfig) error

RunProjectsGet retrieves an existing Project by its identifier. Use "default" as an identifier to retrieve your default project.

func RunProjectsList added in v1.11.0

func RunProjectsList(c *CmdConfig) error

RunProjectsList lists Projects.

func RunProjectsUpdate added in v1.11.0

func RunProjectsUpdate(c *CmdConfig) error

RunProjectsUpdate updates an existing Project with a given configuration.

func RunRecordCreate

func RunRecordCreate(c *CmdConfig) error

RunRecordCreate creates a domain record.

func RunRecordDelete

func RunRecordDelete(c *CmdConfig) error

RunRecordDelete deletes a domain record.

func RunRecordList

func RunRecordList(c *CmdConfig) error

RunRecordList list records for a domain.

func RunRecordUpdate

func RunRecordUpdate(c *CmdConfig) error

RunRecordUpdate updates a domain record.

func RunRegionList

func RunRegionList(c *CmdConfig) error

RunRegionList all regions.

func RunRegistryCreate added in v1.34.0

func RunRegistryCreate(c *CmdConfig) error

RunRegistryCreate creates a registry

func RunRegistryDelete added in v1.34.0

func RunRegistryDelete(c *CmdConfig) error

RunRegistryDelete delete the registry

func RunRegistryGet added in v1.34.0

func RunRegistryGet(c *CmdConfig) error

RunRegistryGet returns the registry

func RunRegistryLogin added in v1.34.0

func RunRegistryLogin(c *CmdConfig) error

RunRegistryLogin logs in Docker to the registry

func RunRegistryLogout added in v1.34.0

func RunRegistryLogout(c *CmdConfig) error

RunRegistryLogout logs Docker out of the registry

func RunRegistryOptionsTiers added in v1.51.0

func RunRegistryOptionsTiers(c *CmdConfig) error

func RunRepositoryDeleteManifest added in v1.42.0

func RunRepositoryDeleteManifest(c *CmdConfig) error

RunRepositoryDeleteManifest deletes one or more repository manifests by digest

func RunRepositoryDeleteTag added in v1.42.0

func RunRepositoryDeleteTag(c *CmdConfig) error

RunRepositoryDeleteTag deletes one or more repository tags

func RunReservedIPActionsAssign added in v1.77.0

func RunReservedIPActionsAssign(c *CmdConfig) error

RunReservedIPActionsAssign assigns a reserved IP to a droplet.

func RunReservedIPActionsGet added in v1.77.0

func RunReservedIPActionsGet(c *CmdConfig) error

RunReservedIPActionsGet retrieves an action for a reserved IP.

func RunReservedIPActionsUnassign added in v1.77.0

func RunReservedIPActionsUnassign(c *CmdConfig) error

RunReservedIPActionsUnassign unassigns a reserved IP to a droplet.

func RunReservedIPCreate added in v1.77.0

func RunReservedIPCreate(c *CmdConfig) error

RunReservedIPCreate runs reserved IP create.

func RunReservedIPDelete added in v1.77.0

func RunReservedIPDelete(c *CmdConfig) error

RunReservedIPDelete runs reserved IP delete.

func RunReservedIPGet added in v1.77.0

func RunReservedIPGet(c *CmdConfig) error

RunReservedIPGet retrieves a reserved IP's details.

func RunReservedIPList added in v1.77.0

func RunReservedIPList(c *CmdConfig) error

RunReservedIPList runs reserved IP create.

func RunSSH

func RunSSH(c *CmdConfig) error

RunSSH finds a droplet to ssh to given input parameters (name or id).

func RunServerlessConnect added in v1.80.0

func RunServerlessConnect(c *CmdConfig) error

RunServerlessConnect implements the serverless connect command

func RunServerlessExec added in v1.80.0

func RunServerlessExec(command string, c *CmdConfig, booleanFlags []string, stringFlags []string) (do.ServerlessOutput, error)

RunServerlessExec is a variant of ServerlessExec convenient for calling from stylized command runners Sets up the arguments and (especially) the flags for the actual call

func RunServerlessExecStreaming added in v1.80.0

func RunServerlessExecStreaming(command string, c *CmdConfig, booleanFlags []string, stringFlags []string) error

RunServerlessExecStreaming is like RunServerlessExec but assumes that output will not be captured and can be streamed.

func RunServerlessExtraCreate added in v1.80.0

func RunServerlessExtraCreate(c *CmdConfig) error

RunServerlessExtraCreate supports the 'serverless init' command

func RunServerlessExtraDeploy added in v1.80.0

func RunServerlessExtraDeploy(c *CmdConfig) error

RunServerlessExtraDeploy supports the 'serverless deploy' command

func RunServerlessExtraGetMetadata added in v1.80.0

func RunServerlessExtraGetMetadata(c *CmdConfig) error

RunServerlessExtraGetMetadata supports the 'serverless get-metadata' command

func RunServerlessExtraWatch added in v1.80.0

func RunServerlessExtraWatch(c *CmdConfig) error

RunServerlessExtraWatch supports 'serverless watch' This is not the usual boiler-plate because the command is intended to be long-running in a separate window

func RunServerlessInstall added in v1.80.0

func RunServerlessInstall(c *CmdConfig) error

RunServerlessInstall performs the network installation of the 'nim' adjunct to support serverless development

func RunServerlessStatus added in v1.80.0

func RunServerlessStatus(c *CmdConfig) error

RunServerlessStatus gives a report on the status of the serverless (installed, up to date, connected)

func RunServerlessUndeploy added in v1.80.0

func RunServerlessUndeploy(c *CmdConfig) error

RunServerlessUndeploy implements the 'doctl serverless undeploy' command

func RunServerlessUninstall added in v1.80.0

func RunServerlessUninstall(c *CmdConfig) error

RunServerlessUninstall removes the serverless support and any stored credentials

func RunServerlessUpgrade added in v1.80.0

func RunServerlessUpgrade(c *CmdConfig) error

RunServerlessUpgrade is a variant on RunServerlessInstall for installing over an existing version when the existing version is inadequate as detected by checkServerlessStatus()

func RunSizeList

func RunSizeList(c *CmdConfig) error

RunSizeList all sizes.

func RunSnapshotDelete added in v1.6.0

func RunSnapshotDelete(c *CmdConfig) error

RunSnapshotDelete destroys snapshot(s) by id

func RunSnapshotGet added in v1.6.0

func RunSnapshotGet(c *CmdConfig) error

RunSnapshotGet returns a snapshot

func RunSnapshotList added in v1.6.0

func RunSnapshotList(c *CmdConfig) error

RunSnapshotList returns a list of snapshots

func RunStartGarbageCollection added in v1.50.0

func RunStartGarbageCollection(c *CmdConfig) error

RunStartGarbageCollection starts a garbage collection for the specified registry.

func RunTriggerToggle added in v1.89.0

func RunTriggerToggle(isEnabled bool) func(*CmdConfig) error

RunTriggerToggle provides the logic for 'doctl sls trig enabled/disabled'

func RunTriggersGet added in v1.82.0

func RunTriggersGet(c *CmdConfig) error

RunTriggersGet provides the logic for 'doctl sls trig get'

func RunTriggersList added in v1.82.0

func RunTriggersList(c *CmdConfig) error

RunTriggersList provides the logic for 'doctl sls trig list'

func RunVPCCreate added in v1.40.0

func RunVPCCreate(c *CmdConfig) error

RunVPCCreate creates a new VPC with a given configuration.

func RunVPCDelete added in v1.40.0

func RunVPCDelete(c *CmdConfig) error

RunVPCDelete deletes a VPC by its identifier.

func RunVPCGet added in v1.40.0

func RunVPCGet(c *CmdConfig) error

RunVPCGet retrieves an existing VPC by its identifier.

func RunVPCList added in v1.40.0

func RunVPCList(c *CmdConfig) error

RunVPCList lists VPCs.

func RunVPCUpdate added in v1.40.0

func RunVPCUpdate(c *CmdConfig) error

RunVPCUpdate updates an existing VPC with new configuration.

func RunVolumeActionsGet added in v1.55.0

func RunVolumeActionsGet(c *CmdConfig) error

RunVolumeActionsGet returns a Volume Action

func RunVolumeActionsList added in v1.56.0

func RunVolumeActionsList(c *CmdConfig) error

RunVolumeActionsList returns a Volume Action

func RunVolumeAttach added in v1.3.0

func RunVolumeAttach(c *CmdConfig) error

RunVolumeAttach attaches a volume to a droplet.

func RunVolumeCreate added in v1.3.0

func RunVolumeCreate(c *CmdConfig) error

RunVolumeCreate creates a volume.

func RunVolumeDelete added in v1.3.0

func RunVolumeDelete(c *CmdConfig) error

RunVolumeDelete deletes a volume.

func RunVolumeDetach added in v1.3.0

func RunVolumeDetach(c *CmdConfig) error

RunVolumeDetach detaches a volume by droplet ID

func RunVolumeGet added in v1.3.0

func RunVolumeGet(c *CmdConfig) error

RunVolumeGet gets a volume.

func RunVolumeList added in v1.3.0

func RunVolumeList(c *CmdConfig) error

RunVolumeList returns a list of volumes.

func RunVolumeResize added in v1.6.0

func RunVolumeResize(c *CmdConfig) error

RunVolumeResize resizes a volume

func RunVolumeSnapshot added in v1.6.0

func RunVolumeSnapshot(c *CmdConfig) error

RunVolumeSnapshot creates a snapshot of a volume

func ServerlessExec added in v1.80.0

func ServerlessExec(c *CmdConfig, command string, args ...string) (do.ServerlessOutput, error)

ServerlessExec executes a serverless command

func ServerlessExtras added in v1.80.0

func ServerlessExtras(cmd *Command)

ServerlessExtras adds commands to the 'serverless' subtree for which the cobra wrappers were autogenerated from oclif equivalents and subsequently modified.

Types

type CmdConfig added in v1.0.0

type CmdConfig struct {
	NS   string
	Doit doctl.Config
	Out  io.Writer
	Args []string

	// services
	Keys              func() do.KeysService
	Sizes             func() do.SizesService
	Regions           func() do.RegionsService
	Images            func() do.ImagesService
	ImageActions      func() do.ImageActionsService
	LoadBalancers     func() do.LoadBalancersService
	ReservedIPs       func() do.ReservedIPsService
	ReservedIPActions func() do.ReservedIPActionsService
	Droplets          func() do.DropletsService
	DropletActions    func() do.DropletActionsService
	Domains           func() do.DomainsService
	Actions           func() do.ActionsService
	Account           func() do.AccountService
	Balance           func() do.BalanceService
	BillingHistory    func() do.BillingHistoryService
	Invoices          func() do.InvoicesService
	Tags              func() do.TagsService
	Volumes           func() do.VolumesService
	VolumeActions     func() do.VolumeActionsService
	Snapshots         func() do.SnapshotsService
	Certificates      func() do.CertificatesService
	Firewalls         func() do.FirewallsService
	CDNs              func() do.CDNsService
	Projects          func() do.ProjectsService
	Kubernetes        func() do.KubernetesService
	Databases         func() do.DatabasesService
	Registry          func() do.RegistryService
	VPCs              func() do.VPCsService
	OneClicks         func() do.OneClickService
	Apps              func() do.AppsService
	Monitoring        func() do.MonitoringService
	Serverless        func() do.ServerlessService
	OAuth             func() do.OAuthService
	// contains filtered or unexported fields
}

CmdConfig is a command configuration.

func NewCmdConfig added in v1.0.0

func NewCmdConfig(ns string, dc doctl.Config, out io.Writer, args []string, initGodo bool) (*CmdConfig, error)

NewCmdConfig creates an instance of a CmdConfig.

func (*CmdConfig) Display added in v1.0.0

func (c *CmdConfig) Display(d displayers.Displayable) error

Display displays the output from a command.

func (*CmdConfig) PrintServerlessTextOutput added in v1.80.0

func (c *CmdConfig) PrintServerlessTextOutput(output do.ServerlessOutput) error

PrintServerlessTextOutput prints the output of a serverless command execution in a textual form (often, this can be improved upon). Prints Formatted if present. Else, prints Captured if present. Else, prints Table or Entity using generic JSON formatting. We don't expect both Table and Entity to be present and have no special handling for that.

type CmdRunner added in v1.0.0

type CmdRunner func(*CmdConfig) error

CmdRunner runs a command and passes in a cmdConfig.

type Command added in v1.0.0

type Command struct {
	*cobra.Command
	// contains filtered or unexported fields
}

Command is a wrapper around cobra.Command that adds doctl specific functionality.

func Account

func Account() *Command

Account creates the account commands hierarchy.

func Actions

func Actions() *Command

Actions creates the action commands hierarchy.

func Activations added in v1.74.0

func Activations() *Command

Activations generates the serverless 'activations' subtree for addition to the doctl command

func Apps added in v1.46.0

func Apps() *Command

Apps creates the apps command.

func AppsDev added in v1.82.0

func AppsDev() *Command

AppsDev creates the apps dev command subtree.

func AppsDevConfig added in v1.82.0

func AppsDevConfig() *Command

AppsDevConfig creates the apps dev config command subtree.

func Auth added in v0.6.0

func Auth() *Command

Auth creates auth commands for doctl.

func Balance added in v1.37.0

func Balance() *Command

Balance creates the balance commands hierarchy.

func BillingHistory added in v1.40.0

func BillingHistory() *Command

BillingHistory creates the BillingHistory commands hierarchy.

func CDN added in v1.9.0

func CDN() *Command

CDN creates the CDN command

func Certificate added in v1.6.0

func Certificate() *Command

Certificate creates the certificate command.

func CmdBuilder added in v1.0.0

func CmdBuilder(parent *Command, cr CmdRunner, cliText, shortdesc string, longdesc string, out io.Writer, options ...cmdOption) *Command

CmdBuilder builds a new command.

func Databases added in v1.15.0

func Databases() *Command

Databases creates the databases command

func Domain

func Domain() *Command

Domain creates the domain commands hierarchy.

func Droplet

func Droplet() *Command

Droplet creates the droplet command.

func DropletAction

func DropletAction() *Command

DropletAction creates the droplet-action command.

func Firewall added in v1.7.0

func Firewall() *Command

Firewall creates the firewall command.

func Functions added in v1.74.0

func Functions() *Command

Functions generates the serverless 'functions' subtree for addition to the doctl command

func GarbageCollection added in v1.50.0

func GarbageCollection() *Command

GarbageCollection creates the garbage-collection subcommand

func ImageAction

func ImageAction() *Command

ImageAction creates the image action command.

func Images

func Images() *Command

Images creates an image command.

func Invoices added in v1.39.0

func Invoices() *Command

Invoices creates the invoices commands hierarchy.

func Kubernetes added in v1.12.0

func Kubernetes() *Command

Kubernetes creates the kubernetes command.

func LoadBalancer added in v1.6.0

func LoadBalancer() *Command

LoadBalancer creates the load balancer command.

func Monitoring added in v1.63.1

func Monitoring() *Command

Monitoring creates the monitoring commands hierarchy.

func Namespaces added in v1.80.0

func Namespaces() *Command

Namespaces generates the serverless 'namespaces' subtree for addition to the doctl command

func OneClicks added in v1.44.0

func OneClicks() *Command

OneClicks creates the 1-click command.

func Plugin added in v1.0.0

func Plugin() *Command

Plugin creates the plugin commands hierarchy.

func ProjectResourcesCmd added in v1.11.0

func ProjectResourcesCmd() *Command

ProjectResourcesCmd creates the project resources commands hierarchy.

func Projects added in v1.11.0

func Projects() *Command

Projects creates the projects commands hierarchy.

func Region

func Region() *Command

Region creates the region commands hierarchy.

func Registry added in v1.34.0

func Registry() *Command

Registry creates the registry command

func RegistryOptions added in v1.51.0

func RegistryOptions() *Command

RegistryOptions creates the registry options subcommand

func Repository added in v1.42.0

func Repository() *Command

Repository creates the repository sub-command

func ReservedIP added in v1.77.0

func ReservedIP() *Command

ReservedIP creates the command hierarchy for reserved ips.

func ReservedIPAction added in v1.77.0

func ReservedIPAction() *Command

ReservedIPAction creates the reserved IP action command.

func SSH

func SSH(parent *Command) *Command

SSH creates the ssh commands hierarchy

func SSHKeys

func SSHKeys() *Command

SSHKeys creates the ssh key commands hierarchy.

func Serverless added in v1.80.0

func Serverless() *Command

Serverless contains support for 'serverless' commands provided by a hidden install of the Nimbella CLI

func Size

func Size() *Command

Size creates the size commands hierarchy.

func Snapshot added in v1.6.0

func Snapshot() *Command

Snapshot creates the snapshot command

func Tags added in v1.1.0

func Tags() *Command

Tags creates the tag commands hierarchy.

func Triggers added in v1.82.0

func Triggers() *Command

Triggers generates the serverless 'triggers' subtree for addition to the doctl command

func VPCs added in v1.40.0

func VPCs() *Command

VPCs creates the vpcs command.

func Version added in v1.0.0

func Version() *Command

Version creates a version command.

func Volume added in v1.3.0

func Volume() *Command

Volume creates the Volume command

func VolumeAction added in v1.3.0

func VolumeAction() *Command

VolumeAction creates the volume command

func (*Command) AddCommand added in v1.0.0

func (c *Command) AddCommand(commands ...*Command)

AddCommand adds child commands and adds child commands for cobra as well.

func (*Command) AddValidArgsFunc added in v1.66.0

func (c *Command) AddValidArgsFunc(fn ValidArgsFunc) error

AddValidArgsFunc sets the function to run for dynamic completions ValidArgsFunc and ValidArgs are mutually exclusive. This function will return an error if ValidArgs is already set.

func (*Command) ChildCommands added in v1.0.0

func (c *Command) ChildCommands() []*Command

ChildCommands returns the child commands.

type KubeconfigProvider added in v1.22.0

type KubeconfigProvider interface {
	Remote(kube do.KubernetesService, clusterID string, expirySeconds int) (*clientcmdapi.Config, error)
	Local() (*clientcmdapi.Config, error)
	Write(config *clientcmdapi.Config) error
	ConfigPath() string
}

KubeconfigProvider allows a user to read from a remote and local Kubeconfig, and write to a local Kubeconfig.

type KubernetesCommandService added in v1.22.0

type KubernetesCommandService struct {
	KubeconfigProvider KubeconfigProvider
}

KubernetesCommandService is used to execute Kubernetes commands.

func (*KubernetesCommandService) RunKubeOptionsListNodeSizes added in v1.22.0

func (s *KubernetesCommandService) RunKubeOptionsListNodeSizes(c *CmdConfig) error

RunKubeOptionsListNodeSizes lists valid node sizes for kubernetes clusters.

func (*KubernetesCommandService) RunKubeOptionsListRegion added in v1.22.0

func (s *KubernetesCommandService) RunKubeOptionsListRegion(c *CmdConfig) error

RunKubeOptionsListRegion lists valid regions for kubernetes clusters.

func (*KubernetesCommandService) RunKubeOptionsListVersion added in v1.22.0

func (s *KubernetesCommandService) RunKubeOptionsListVersion(c *CmdConfig) error

RunKubeOptionsListVersion lists valid versions for kubernetes clusters.

func (*KubernetesCommandService) RunKubernetesClusterCreate added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterCreate(defaultNodeSize string, defaultNodeCount int) func(*CmdConfig) error

RunKubernetesClusterCreate creates a new kubernetes with a given configuration.

func (*KubernetesCommandService) RunKubernetesClusterDelete added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterDelete(c *CmdConfig) error

RunKubernetesClusterDelete deletes a Kubernetes cluster

func (*KubernetesCommandService) RunKubernetesClusterDeleteSelective added in v1.56.0

func (s *KubernetesCommandService) RunKubernetesClusterDeleteSelective(c *CmdConfig) error

func (*KubernetesCommandService) RunKubernetesClusterGet added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterGet(c *CmdConfig) error

RunKubernetesClusterGet retrieves an existing kubernetes cluster by its identifier.

func (*KubernetesCommandService) RunKubernetesClusterGetUpgrades added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterGetUpgrades(c *CmdConfig) error

RunKubernetesClusterGetUpgrades retrieves available upgrade versions for a cluster.

func (*KubernetesCommandService) RunKubernetesClusterList added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterList(c *CmdConfig) error

RunKubernetesClusterList lists kubernetes.

func (*KubernetesCommandService) RunKubernetesClusterListAssociatedResources added in v1.56.0

func (s *KubernetesCommandService) RunKubernetesClusterListAssociatedResources(c *CmdConfig) error

RunKubernetesClusterListAssociatedResources lists a Kubernetes cluster's associated resources

func (*KubernetesCommandService) RunKubernetesClusterUpdate added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterUpdate(c *CmdConfig) error

RunKubernetesClusterUpdate updates an existing kubernetes with new configuration.

func (*KubernetesCommandService) RunKubernetesClusterUpgrade added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesClusterUpgrade(c *CmdConfig) error

RunKubernetesClusterUpgrade upgrades an existing cluster to a new version.

func (*KubernetesCommandService) RunKubernetesKubeconfigExecCredential added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesKubeconfigExecCredential(c *CmdConfig) error

RunKubernetesKubeconfigExecCredential displays the exec credential. It is for internal use only.

func (*KubernetesCommandService) RunKubernetesKubeconfigRemove added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesKubeconfigRemove(c *CmdConfig) error

RunKubernetesKubeconfigRemove retrieves an existing kubernetes config and removes it from your local kubeconfig.

func (*KubernetesCommandService) RunKubernetesKubeconfigSave added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesKubeconfigSave(c *CmdConfig) error

RunKubernetesKubeconfigSave retrieves an existing kubernetes config and saves it to your local kubeconfig.

func (*KubernetesCommandService) RunKubernetesKubeconfigShow added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesKubeconfigShow(c *CmdConfig) error

RunKubernetesKubeconfigShow retrieves an existing kubernetes config and prints it.

func (*KubernetesCommandService) RunKubernetesNodeDelete added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodeDelete(c *CmdConfig) error

RunKubernetesNodeDelete deletes a Kubernetes Node

func (*KubernetesCommandService) RunKubernetesNodePoolCreate added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolCreate(c *CmdConfig) error

RunKubernetesNodePoolCreate creates a new cluster node pool with a given configuration.

func (*KubernetesCommandService) RunKubernetesNodePoolDelete added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolDelete(c *CmdConfig) error

RunKubernetesNodePoolDelete deletes a Kubernetes node pool

func (*KubernetesCommandService) RunKubernetesNodePoolGet added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolGet(c *CmdConfig) error

RunKubernetesNodePoolGet retrieves an existing cluster node pool by its identifier.

func (*KubernetesCommandService) RunKubernetesNodePoolList added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolList(c *CmdConfig) error

RunKubernetesNodePoolList lists cluster node pool.

func (*KubernetesCommandService) RunKubernetesNodePoolRecycle added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolRecycle(c *CmdConfig) error

RunKubernetesNodePoolRecycle DEPRECATED: will be removed in v2.0, please use delete-node or replace-node

func (*KubernetesCommandService) RunKubernetesNodePoolUpdate added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodePoolUpdate(c *CmdConfig) error

RunKubernetesNodePoolUpdate updates an existing cluster node pool with new properties.

func (*KubernetesCommandService) RunKubernetesNodeReplace added in v1.22.0

func (s *KubernetesCommandService) RunKubernetesNodeReplace(c *CmdConfig) error

RunKubernetesNodeReplace replaces a Kubernetes Node

func (*KubernetesCommandService) RunKubernetesRegistryAdd added in v1.49.0

func (s *KubernetesCommandService) RunKubernetesRegistryAdd(c *CmdConfig) error

func (*KubernetesCommandService) RunKubernetesRegistryRemove added in v1.49.0

func (s *KubernetesCommandService) RunKubernetesRegistryRemove(c *CmdConfig) error

type ShownActivation added in v1.85.0

type ShownActivation struct {
	whisk.Activation
	Date string `json:"date,omitempty"`
}

ShownActivation is what is actually shown as an activation ... it adds a date field which is a human-readable version of the start field.

type UnknownSchemeError added in v0.6.0

type UnknownSchemeError struct {
	Scheme string
}

UnknownSchemeError signifies an unknown HTTP scheme.

func (*UnknownSchemeError) Error added in v0.6.0

func (use *UnknownSchemeError) Error() string

type ValidArgsFunc added in v1.66.0

type ValidArgsFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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