summaryrefslogtreecommitdiffstats
path: root/utils.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 /utils.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 'utils.go')
-rw-r--r--utils.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils.go b/utils.go
index 6a05ef3..b21fc19 100644
--- a/utils.go
+++ b/utils.go
@@ -3,21 +3,21 @@ package main
import (
"encoding/json"
- "github.com/iotbzh/xds-agent/lib/apiv1"
+ "github.com/iotbzh/xds-agent/lib/xaapiv1"
"github.com/urfave/cli"
)
-var cacheXdsVersion *apiv1.XDSVersion
+var cacheXdsVersion *xaapiv1.XDSVersion
// XdsVersionGet Get version of XDS agent & server
-func XdsVersionGet(ver *apiv1.XDSVersion) error {
+func XdsVersionGet(ver *xaapiv1.XDSVersion) error {
// Use cached data
if cacheXdsVersion != nil {
ver = cacheXdsVersion
return nil
}
- dataVer := apiv1.XDSVersion{}
+ dataVer := xaapiv1.XDSVersion{}
if err := HTTPCli.Get("/version", &dataVer); err != nil {
return err
}
@@ -29,7 +29,7 @@ func XdsVersionGet(ver *apiv1.XDSVersion) error {
// XdsServerIDGet returns the XDS Server ID
func XdsServerIDGet() string {
- ver := apiv1.XDSVersion{}
+ ver := xaapiv1.XDSVersion{}
if err := XdsVersionGet(&ver); err != nil {
return ""
}
@@ -46,7 +46,7 @@ func XdsServerIndexGet() int {
}
// ProjectsListGet Get the list of existing projects
-func ProjectsListGet(prjs *[]apiv1.ProjectConfig) error {
+func ProjectsListGet(prjs *[]xaapiv1.ProjectConfig) error {
var data []byte
if err := HTTPCli.HTTPGet("/projects", &data); err != nil {
return err