diff options
| author | Jeff Carr <[email protected]> | 2023-12-30 12:20:20 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-30 12:20:20 -0600 |
| commit | a117923b327d0d5a74ef64b51082e2ec4bcd9cfd (patch) | |
| tree | dc8987c5f9e4cd51063951618df686f000716ec8 /digitalocean/structs.go | |
| parent | 7532fb5ff5d0178bb9b1cf0a1cd6ba7c30bb7c2b (diff) | |
show droplets
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'digitalocean/structs.go')
| -rw-r--r-- | digitalocean/structs.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/digitalocean/structs.go b/digitalocean/structs.go index 2c1fc55..5cb886d 100644 --- a/digitalocean/structs.go +++ b/digitalocean/structs.go @@ -5,6 +5,8 @@ package digitalocean import ( + "github.com/digitalocean/godo" + "go.wit.com/gui" "go.wit.com/gui/gadgets" ) @@ -12,17 +14,46 @@ import ( type DigitalOcean struct { ready bool hidden bool + err error token string // You're Digital Ocean API key + droplets []godo.Droplet parent *gui.Node // should be the root of the 'gui' package binary tree window *gui.Node // our window for displaying digital ocean droplets group *gui.Node // our window for displaying digital ocean droplets grid *gui.Node // our window for displaying digital ocean droplets + dGrid *gui.Node // the grid for the droplets + // Primary Directives status *gadgets.OneLiner summary *gadgets.OneLiner statusIPv4 *gadgets.OneLiner statusIPv6 *gadgets.OneLiner } + +type ipButton struct { + ip *gui.Node + c *gui.Node +} + +type Droplet struct { + ready bool + hidden bool + err error + + poll godo.Droplet // store what the digital ocean API returned + + name *gui.Node + + // a box and grid of the IPv4 addresses + box4 *gui.Node + grid4 *gui.Node + ipv4 []ipButton + + // a box and grid of the IPv6 addresses + box6 *gui.Node + grid6 *gui.Node + ipv6 []ipButton +} |
