Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "delete", Short: "Delete ALL resources in DigitalOcean account", Long: `Delete ALL resources in DigitalOcean account Currently, all resources means: - Droplets - SSH Keys - Domains (with records) `, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { token := digitalocean_utils.GetToken() droplets := digitalocean_utils.PrepareAllDropletsDelete(token) sshKeys := digitalocean_utils.PrepareAllSSHKeysDelete(token) domains := digitalocean_utils.PrepareAllDomainsDelete(token) fmt.Println("") fmt.Println("Wait 10s, cancel clean up using ctrl-c") for i := 1; i <= 10; i++ { fmt.Print(".") time.Sleep(time.Second) } fmt.Println("") fmt.Println("") fmt.Println("Delete ...") fmt.Println("") digitalocean_utils.DoAllDropletsDelete(token, droplets) digitalocean_utils.DoAllSSHKeysDelete(token, sshKeys) digitalocean_utils.DoAllDomainsDelete(token, domains) fmt.Println("Done.") }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.