Documentation
¶
Overview ¶
Package commands implements ZCP CLI cobra commands.
Index ¶
- Constants
- func EnforceSubcommandErrors(root *cobra.Command)
- func HideFlagEverywhere(root *cobra.Command, name string)
- func NewACLCmd() *cobra.Command
- func NewAffinityGroupCmd() *cobra.Command
- func NewAuthCmd() *cobra.Command
- func NewAutoscaleCmd() *cobra.Command
- func NewBackupCmd() *cobra.Command
- func NewBillingCmd() *cobra.Command
- func NewBillingCycleCmd() *cobra.Command
- func NewCloudProviderCmd() *cobra.Command
- func NewCurrencyCmd() *cobra.Command
- func NewDNSCmd() *cobra.Command
- func NewDashboardCmd() *cobra.Command
- func NewEgressCmd() *cobra.Command
- func NewFirewallCmd() *cobra.Command
- func NewIPCmd() *cobra.Command
- func NewISOCmd() *cobra.Command
- func NewInstanceCmd() *cobra.Command
- func NewKubernetesCmd() *cobra.Command
- func NewLoadBalancerCmd() *cobra.Command
- func NewMarketplaceCmd() *cobra.Command
- func NewMonitoringCmd() *cobra.Command
- func NewNetworkCmd() *cobra.Command
- func NewObjectStorageCmd() *cobra.Command
- func NewPermissionCmd() *cobra.Command
- func NewPlanCmd() *cobra.Command
- func NewPortForwardCmd() *cobra.Command
- func NewProductCmd() *cobra.Command
- func NewProfileCmd() *cobra.Command
- func NewProjectCmd() *cobra.Command
- func NewRegionCmd() *cobra.Command
- func NewRoleCmd() *cobra.Command
- func NewSSHKeyCmd() *cobra.Command
- func NewServerCmd() *cobra.Command
- func NewSnapshotCmd() *cobra.Command
- func NewStorageCategoryCmd() *cobra.Command
- func NewStoreCmd() *cobra.Command
- func NewSubUserCmd() *cobra.Command
- func NewSupportCmd() *cobra.Command
- func NewTemplateCmd() *cobra.Command
- func NewUserProfileCmd() *cobra.Command
- func NewVMBackupCmd() *cobra.Command
- func NewVMSnapshotCmd() *cobra.Command
- func NewVPCCmd() *cobra.Command
- func NewVPNCmd() *cobra.Command
- func NewVirtualRouterCmd() *cobra.Command
- func NewVolumeCmd() *cobra.Command
Constants ¶
const ( NetworkTypeL2 = "L2" NetworkTypeIsolated = "Isolated" NetworkTypeVpc = "Vpc" )
Network types accepted by --network-type.
Variables ¶
This section is empty.
Functions ¶
func EnforceSubcommandErrors ¶
EnforceSubcommandErrors walks the command tree and makes every command *group* (a command that only organizes subcommands and has no action of its own) reject an unknown subcommand with an actionable error, instead of cobra's default of silently printing the group's help with a success (exit 0) status. Silently printing help on a bad token hides the mistake and — because the exit code is 0 — lets scripts and CI treat a typo as success; every mainstream CLI (git, kubectl, docker, cargo) instead errors to stderr with a non-zero exit.
The error adapts to the group:
- a group with a single subcommand points the user straight at that command (with its example), since there is no ambiguity about what they meant;
- a group with several subcommands lists the valid subcommands so the user can choose, and points at --help for full usage and examples.
Running a group with no arguments still prints its help and exits 0.
func HideFlagEverywhere ¶
HideFlagEverywhere walks the command tree and marks the named local flag hidden on every command that declares it. Used to keep auto-resolved plumbing flags (e.g. --cloud-provider) out of help output while leaving them usable as an explicit override.
func NewAffinityGroupCmd ¶
NewAffinityGroupCmd returns the 'affinity-group' cobra command.
func NewAutoscaleCmd ¶
NewAutoscaleCmd returns the 'autoscale' cobra command.
func NewBackupCmd ¶
NewBackupCmd returns the 'backup' cobra command for block storage backups.
func NewBillingCmd ¶
NewBillingCmd returns the 'billing' cobra command group.
func NewBillingCycleCmd ¶
NewBillingCycleCmd returns the 'billing-cycle' cobra command.
func NewCloudProviderCmd ¶
NewCloudProviderCmd returns the 'cloud-provider' cobra command.
func NewCurrencyCmd ¶
NewCurrencyCmd returns the 'currency' cobra command.
func NewDashboardCmd ¶
NewDashboardCmd returns the 'dashboard' cobra command.
func NewEgressCmd ¶
NewEgressCmd returns the 'egress' cobra command.
func NewFirewallCmd ¶
NewFirewallCmd returns the 'firewall' cobra command.
func NewInstanceCmd ¶
NewInstanceCmd returns the 'instance' cobra command.
func NewKubernetesCmd ¶
NewKubernetesCmd returns the 'kubernetes' cobra command.
func NewLoadBalancerCmd ¶
NewLoadBalancerCmd returns the 'loadbalancer' cobra command.
func NewMarketplaceCmd ¶
NewMarketplaceCmd returns the 'marketplace' cobra command.
func NewMonitoringCmd ¶
NewMonitoringCmd returns the 'monitoring' cobra command.
func NewNetworkCmd ¶
NewNetworkCmd returns the 'network' cobra command.
func NewObjectStorageCmd ¶
NewObjectStorageCmd returns the 'object-storage' cobra command.
func NewPermissionCmd ¶
NewPermissionCmd returns the 'permission' cobra command.
func NewPlanCmd ¶
NewPlanCmd returns the 'plan' cobra command with subcommands for each STKCNSL service type.
func NewPortForwardCmd ¶
NewPortForwardCmd returns the 'portforward' cobra command.
func NewProductCmd ¶
NewProductCmd returns the 'product' cobra command.
func NewProfileCmd ¶
NewProfileCmd returns the 'profile' cobra command.
func NewProjectCmd ¶
NewProjectCmd returns the 'project' cobra command.
func NewRegionCmd ¶
NewRegionCmd returns the 'region' cobra command.
func NewSSHKeyCmd ¶
NewSSHKeyCmd returns the 'ssh-key' cobra command.
func NewServerCmd ¶
NewServerCmd returns the 'server' cobra command.
func NewSnapshotCmd ¶
NewSnapshotCmd returns the 'snapshot' cobra command for block storage snapshots.
func NewStorageCategoryCmd ¶
NewStorageCategoryCmd returns the 'storage-category' cobra command.
func NewSubUserCmd ¶
NewSubUserCmd returns the 'sub-user' cobra command.
func NewSupportCmd ¶
NewSupportCmd returns the 'support' cobra command.
func NewTemplateCmd ¶
NewTemplateCmd returns the 'template' cobra command.
func NewUserProfileCmd ¶
NewUserProfileCmd returns the 'profile-info' cobra command.
func NewVMBackupCmd ¶
NewVMBackupCmd returns the 'vm-backup' cobra command.
func NewVMSnapshotCmd ¶
NewVMSnapshotCmd returns the 'vm-snapshot' cobra command.
func NewVirtualRouterCmd ¶
NewVirtualRouterCmd returns the 'virtual-router' cobra command.
func NewVolumeCmd ¶
NewVolumeCmd returns the 'volume' cobra command.
Types ¶
This section is empty.
Source Files
¶
- acl.go
- affinitygroup.go
- args.go
- auth.go
- autoscale.go
- backup.go
- billing.go
- billingcycle.go
- cloudprovider.go
- completion_helpers.go
- currency.go
- dashboard.go
- dns.go
- egress.go
- firewall.go
- helpers.go
- instance.go
- ip.go
- iso.go
- kubernetes.go
- loadbalancer.go
- marketplace.go
- monitoring.go
- network.go
- objectstorage.go
- permission.go
- plan.go
- portforward.go
- product.go
- profile.go
- project.go
- region.go
- role.go
- server.go
- snapshot.go
- snapshotschedule.go
- sshkey.go
- storagecategory.go
- store.go
- subuser.go
- support.go
- template.go
- userprofile.go
- virtualrouter.go
- vmbackup.go
- vmbackupschedule.go
- vmsnapshot.go
- volume.go
- vpc.go
- vpn.go