You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
592 B
Go
36 lines
592 B
Go
// Copyright 2018 Felix Kronlage <fkr@hazardous.org>
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"g.hazardous.org/fkr/libretto/virtualmachine/gridscale"
|
|
)
|
|
|
|
type StorageListCommand struct {
|
|
}
|
|
|
|
var storageListCommand StorageListCommand
|
|
|
|
func (x *StorageListCommand) Execute(args []string) error {
|
|
|
|
storages, error := gridscale.GetStorages(Config.UserId, Config.Token)
|
|
|
|
if error != nil {
|
|
Unknown(fmt.Sprintf("Error while retrieving storages: %s", error))
|
|
}
|
|
|
|
for key, storage := range storages {
|
|
fmt.Printf("%s: %v\n\n", key, storage)
|
|
|
|
}
|
|
|
|
Ok((""))
|
|
|
|
// never reached
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
}
|