Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
PratikDhanave committed Jul 28, 2018
1 parent e66c9f1 commit af46b11
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 9 deletions.
Binary file added gocloud-ecce2422-f215-4d44-83a8-8361b457c5d9.zip
Binary file not shown.
63 changes: 63 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package main

import (
"fmt"
"github.com/cloudlibz/gocloud/gocloud"
)

func main() {

digioceancloud := gocloud.DigitalOceanProvider()

/*
image := map[string]interface{}{
"Slug": "ubuntu-16-04-x64",
}
create := map[string]interface{}{
"Name": "example.com",
"Region": "nyc3",
"Size": "s-1vcpu-1gb",
"Image": image,
"SSHKeys": nil,
"Backups": false,
"IPv6": true,
"UserData": nil,
"PrivateNetworking": nil,
"Volumes": nil,
"Monitoring": false,
"Tags": []string{"web"},
}
resp, err := digioceancloud.CreateNode(create)
if err != nil{
fmt.Println(err)
}
response := resp.(map[string]interface{})
fmt.Println(response["body"])
*/

stop := map[string]string{
"ID": "102694881",
}

resp, _ := digioceancloud.StopNode(stop)
response := resp.(map[string]interface{})
fmt.Println(response["body"])

start := map[string]string{
"ID": "102694881",
}

resp, _ = digioceancloud.StartNode(start)
response = resp.(map[string]interface{})
fmt.Println(response["body"])

delete := map[string]string{
"ID": "102694881",
}

resp, _ = digioceancloud.DeleteNode(delete)
response = resp.(map[string]interface{})
fmt.Println(response["body"])
}
18 changes: 9 additions & 9 deletions streamdataprocessing/clouddataflow/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,15 @@ type Environment struct {
}

type UserAgent struct {
Name string `json:"name"`
support Support `json:"support"`
BuildDate string `json:"build.date"`
Version string `json:"version"`
Name string `json:"name"`
support Support `json:"support"`
BuildDate string `json:"build.date"`
Version string `json:"version"`
}

type Support struct {
Status string `json:"status"`
URL string `json:"url"`
}

type Version struct {
Expand Down Expand Up @@ -207,8 +212,3 @@ type WorkerPools struct {
WorkerHarnessContainerImage string `json:"workerHarnessContainerImage"`
Zone string `json:"zone"`
}

type Support struct {
Status string `json:"status"`
URL string `json:"url"`
}

0 comments on commit af46b11

Please sign in to comment.