Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "list", Short: "List all resources in DigitalOcean account", Long: `List all resources in DigitalOcean account Currently, all resources means: - Kubernetes Clusters - Droplets - Volumes - LoadBalancers - Domains - Keys (SSH) `, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { s := config.ReadSecrets() if FlagAllAccounts { for _, do := range s.DigitalOcean { fmt.Printf("===== Account: %s =====\n", do.Alias) digitalocean_utils.ListAll(do.Token) fmt.Println("") } } else { var do *config.SluSecretsDigitalOcean if FlagAlias == "" { do = config_utils.GetCurrentDigitalOceanAccount() } else { do = config_utils.GetDigitalOceanAccountByAlias(FlagAlias) } if do == nil { log.Fatal("No credentials or context found") } fmt.Printf("===== Account: %s =====\n", do.Alias) digitalocean_utils.ListAll(do.Token) fmt.Println("") } }, }
View Source
var FlagAlias string
View Source
var FlagAllAccounts bool
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.