From 397a6038d7d88d21c8577f1c7267849ba5814080 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Fri, 22 Dec 2017 22:27:01 +0100 Subject: Added sdks install / uninstall / abort commands. Signed-off-by: Sebastien Douheret --- utils.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'utils.go') 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 -- cgit 1.2.3-korg