summaryrefslogtreecommitdiffstats
path: root/cmd-sdks.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-28 14:19:00 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-30 01:36:12 +0100
commit75416fe01aa98b53c57315a050fc58f0879a238d (patch)
tree0bb2d5849fc352c839f8d6f85fdb2aa6b0aad03b /cmd-sdks.go
parent5a34a70b861c9d504e9f07d3c8251c36dc2ce76c (diff)
Used new agent lib name xaapiv1 and fix env setup.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'cmd-sdks.go')
-rw-r--r--cmd-sdks.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd-sdks.go b/cmd-sdks.go
index 8568b3a..af6c417 100644
--- a/cmd-sdks.go
+++ b/cmd-sdks.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
- "github.com/iotbzh/xds-agent/lib/apiv1"
+ "github.com/iotbzh/xds-agent/lib/xaapiv1"
"github.com/urfave/cli"
)
@@ -62,7 +62,7 @@ func initCmdSdks(cmdDef *[]cli.Command) {
func sdksList(ctx *cli.Context) error {
// Get SDKs list
- sdks := []apiv1.SDK{}
+ sdks := []xaapiv1.SDK{}
if err := sdksListGet(&sdks); err != nil {
return cli.NewExitError(err.Error(), 1)
}
@@ -75,16 +75,16 @@ func sdksGet(ctx *cli.Context) error {
if id == "" {
return cli.NewExitError("id parameter or option must be set", 1)
}
- sdks := apiv1.SDK{}
- url := "server/" + strconv.Itoa(XdsServerIndexGet()) + "/sdks/" + id
+ sdks := xaapiv1.SDK{}
+ url := "servers/" + strconv.Itoa(XdsServerIndexGet()) + "/sdks/" + id
if err := HTTPCli.Get(url, &sdks); err != nil {
return cli.NewExitError(err.Error(), 1)
}
- _displaySdks([]apiv1.SDK{sdks}, true)
+ _displaySdks([]xaapiv1.SDK{sdks}, true)
return nil
}
-func _displaySdks(sdks []apiv1.SDK, verbose bool) {
+func _displaySdks(sdks []xaapiv1.SDK, verbose bool) {
// Display result
first := true
writer := NewTableWriter()
@@ -112,8 +112,8 @@ func _displaySdks(sdks []apiv1.SDK, verbose bool) {
writer.Flush()
}
-func sdksListGet(sdks *[]apiv1.SDK) error {
- url := "server/" + strconv.Itoa(XdsServerIndexGet()) + "/sdks"
+func sdksListGet(sdks *[]xaapiv1.SDK) error {
+ url := "servers/" + strconv.Itoa(XdsServerIndexGet()) + "/sdks"
if err := HTTPCli.Get(url, &sdks); err != nil {
return err
}