summaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 22:27:01 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 22:27:36 +0100
commit397a6038d7d88d21c8577f1c7267849ba5814080 (patch)
tree7d700ec1589c3897ae93201d90e24ebb91766c39 /utils.go
parent6f71a805b2f6f961761b5906a21d2a234b84aa4c (diff)
Added sdks install / uninstall / abort commands.v0.1.3
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.go b/utils.go
index d632415..65b67d3 100644
--- a/utils.go
+++ b/utils.go
@@ -21,6 +21,7 @@ package main
import (
"encoding/json"
"fmt"
+ "strconv"
"github.com/franciscocpg/reflectme"
"github.com/iotbzh/xds-agent/lib/xaapiv1"
@@ -83,6 +84,11 @@ func XdsServerIndexGet() int {
return 0
}
+// XdsServerComputeURL computes the URL used to access to XDS Server API
+func XdsServerComputeURL(endURL string) string {
+ return "servers/" + strconv.Itoa(XdsServerIndexGet()) + endURL
+}
+
// ProjectsListGet Get the list of existing projects
func ProjectsListGet(prjs *[]xaapiv1.ProjectConfig) error {
var data []byte