Documentation
¶
Index ¶
- type DOInteractor
- func (interactor DOInteractor) CreateDroplet(droplet domain.DropletRequest, token string) (*Instance, error)
- func (interactor DOInteractor) CreateKey(name, publicKey, token string) (*domain.Key, error)
- func (interactor DOInteractor) DestroyDroplet(id int, token string) error
- func (interactor DOInteractor) GetDroplet(id int, token string) (*Instance, error)
- func (interactor DOInteractor) GetOauthURL(id, redirectURI string, scope []string) string
- func (interactor DOInteractor) GetToken(code, id, secret, redirectURL string) (*domain.DOToken, error)
- func (interactor DOInteractor) ListDroplets(token string) ([]domain.Droplet, error)
- func (interactor DOInteractor) ShowKeys(token string) ([]domain.Key, error)
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DOInteractor ¶
type DOInteractor struct { }
DOInteractor embeds an has the necessary fields to interact with the Digital Ocean API
func (DOInteractor) CreateDroplet ¶
func (interactor DOInteractor) CreateDroplet(droplet domain.DropletRequest, token string) (*Instance, error)
CreateDroplet creates a doplet in Digital Ocean
func (DOInteractor) CreateKey ¶
func (interactor DOInteractor) CreateKey(name, publicKey, token string) (*domain.Key, error)
CreateKey creates all the keys in the Digital Ocean provider
func (DOInteractor) DestroyDroplet ¶
func (interactor DOInteractor) DestroyDroplet(id int, token string) error
DestroyDroplet destroys a droplet
func (DOInteractor) GetDroplet ¶
func (interactor DOInteractor) GetDroplet(id int, token string) (*Instance, error)
GetDroplet gets a single droplet
func (DOInteractor) GetOauthURL ¶
func (interactor DOInteractor) GetOauthURL(id, redirectURI string, scope []string) string
GetOauthURL returns the oauth URL
func (DOInteractor) GetToken ¶
func (interactor DOInteractor) GetToken(code, id, secret, redirectURL string) (*domain.DOToken, error)
GetToken returns a token from Digital Ocean
func (DOInteractor) ListDroplets ¶
func (interactor DOInteractor) ListDroplets(token string) ([]domain.Droplet, error)
ListDroplets lists all the droplets a user has in Digital Ocean
Click to show internal directories.
Click to hide internal directories.