digitalocean

package
v0.0.0-...-90ceb82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package digitalocean is used for interacting with digitalocean. currently allows for creation and listing of droplets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDroplet

func CreateDroplet() (*godo.Droplet, error)

CreateDroplet will ask the user a series of questions to determine what kind of droplet they would like to be create 1. Asks for a digital ocean api token 2. Asks what name you would like for the droplet 3. Asks what Image you would like to use on the droplet (ubuntu, centos...) 4. Asks what size you would like the droplet to be (1gb RAM 1 CPU..) 5. Asks what region you want the droplet to be hosted in (London, Amsterdam...) 6. Asks what SSH Key you would like to use to access the droplet 7. Asks if you are sure with a y/n answer. It will not create a droplet if you chose n Finally the droplet is created and returned

func DestroyDroplet

func DestroyDroplet() (*utils.SelectItem, error)

DestroyDroplet will show the user a list of servers upon selecting the server you will have to confirm with y/n Once confirmed the user will then have to type in the name of the droplet to make sure they are aware of what they're deleting Once entered they will have to do another y/n to confirm that they definitely want it gone The deleted droplets name is returned

func DisplayDropletList

func DisplayDropletList()

DisplayDropletList gets all the droplets and formats it with some colours. Finally priting it to the terminal

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL