https://github.com/andrewstuart/go-dropper
A command line interface for creating and managing DigitalOcean droplets, written in Golang.
https://github.com/andrewstuart/go-dropper
Last synced: about 1 year ago
JSON representation
A command line interface for creating and managing DigitalOcean droplets, written in Golang.
- Host: GitHub
- URL: https://github.com/andrewstuart/go-dropper
- Owner: andrewstuart
- Created: 2014-12-13T13:24:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-18T02:47:59.000Z (over 11 years ago)
- Last Synced: 2025-02-03T06:41:56.782Z (over 1 year ago)
- Language: Go
- Size: 289 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-Ocean (or ocean)
[Main Documentation](https://godoc.org/github.com/andrewstuart/go-dropper/ocean)
A simple CLI & go library for DO's api
Everything should be mostly stable as far as the API. I'll just be adding functionality with the same
general API contracts.
# Example
[Playground](https://play.golang.org/p/7QKLMBD_QB)
```go
package main
import (
"log"
"github.com/andrewstuart/go-dropper/ocean"
)
c := ocean.NewClient("0123456789abcdef")
imgs, err := c.GetImages()
if err != nil {
//Handle err
}
for _, i := range imgs {
d := ocean.Droplet{
Name: "My-" + d.Slug,
Image: d.Slug,
Size: "512mb",
Region: "sfo1",
}
c.CreateDroplet(d)
log.Printf("Droplet ID for droplet %s: %d", d.Name, d.Id)
}
```