summaryrefslogtreecommitdiff
path: root/digitalocean/listKeys.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-03 12:40:31 -0600
committerJeff Carr <[email protected]>2024-01-03 12:40:31 -0600
commite14770e94c9ec126a3d418d6d2b2f15ef8cf1607 (patch)
tree12b223cbe9cb9c6ef98b23d8bf6ae96e2040b3d7 /digitalocean/listKeys.go
parent1324717de0a1ccd830ca34aa03e0faa9e6d93a83 (diff)
fixed stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'digitalocean/listKeys.go')
-rw-r--r--digitalocean/listKeys.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/digitalocean/listKeys.go b/digitalocean/listKeys.go
deleted file mode 100644
index 1daa51b..0000000
--- a/digitalocean/listKeys.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package digitalocean
-
-import (
- "context"
- "golang.org/x/oauth2"
- "github.com/digitalocean/godo"
-
- "go.wit.com/log"
-)
-
-// func (d *DigitalOcean) ListDroplets() bool {
-func (d *DigitalOcean) ListSSHKeyID() error {
- tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: d.token})
- oauthClient := oauth2.NewClient(context.Background(), tokenSource)
- client := godo.NewClient(oauthClient)
-
- // List all keys.
- keys, _, err := client.Keys.List(context.Background(), &godo.ListOptions{})
- if err != nil {
- return err
- }
-
- d.sshKeys = keys
-
- // Find the key by name.
- for _, key := range keys {
- log.Info("found ssh wierd", key.Name)
- log.Verbose("found ssh key:", key)
- }
- /*
- sshKeys := []godo.DropletCreateSSHKey{
- {ID: 22994569},
- {ID: 333},
- }
- */
-
- // return fmt.Errorf("SSH Key not found")
- return nil
-}