summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-02-27 15:41:46 -0800
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-07 13:40:18 -0800
commit5031a4e20a281b7a94f8c3743b1572314c574ec4 (patch)
tree7072a5d16dc948b35b8a6a76764056c6e4bab003 /src
parent67dd59385cf983ef1307e3b3e410a8f773d8a5c3 (diff)
Add Docker building scripts and update swagger
This patch adds scripts to build Docker container and updates swagger API doc. Change-Id: Ifb10d483946112e38d716c9ae07995ffeb14d2d3 Issue-ID: MUSIC-41 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/dkv/api/backendFilesystemConnection.go5
-rw-r--r--src/dkv/api/initialise.go8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/dkv/api/backendFilesystemConnection.go b/src/dkv/api/backendFilesystemConnection.go
index f09e74f..e6c37ab 100644
--- a/src/dkv/api/backendFilesystemConnection.go
+++ b/src/dkv/api/backendFilesystemConnection.go
@@ -44,10 +44,11 @@ type DirectoryStruct struct {
}
const (
- MOUNTPATH = "../../mountpath/"
- JSONPATH = "api/token_service_map.json"
+ JSONPATH = "api/token_service_map.json"
)
+var MOUNTPATH = ""
+
var Directory DirectoryOperationer
func (d *DirectoryStruct) CreateService(body CreateRegisterServiceBody) (string, error) {
diff --git a/src/dkv/api/initialise.go b/src/dkv/api/initialise.go
index 824ca81..dfbcbde 100644
--- a/src/dkv/api/initialise.go
+++ b/src/dkv/api/initialise.go
@@ -16,6 +16,8 @@
package api
+import "os"
+
func Initialise() error {
Consul = &ConsulStruct{}
KeyValues = &KeyValuesStruct{kvs: make(map[string]string)}
@@ -31,5 +33,11 @@ func Initialise() error {
return err
}
+ if os.Getenv("MOUNTPATH") != "" {
+ MOUNTPATH = os.Getenv("MOUNTPATH")
+ } else {
+ MOUNTPATH = "../../mountpath/"
+ }
+
return nil
}