gofmt
diff --git a/README.md b/README.md
index 6bf9a09..c0f7f0a 100644
--- a/README.md
+++ b/README.md
@@ -65,3 +65,8 @@
This service provides the primitives to perform SQL operations on the database. It also provides the
provision to alter DB connection pool settings via ConfigDBMaxConns, ConfigDBIdleConns and configDBConnsTimeout configuration parameters. They currently are defaulted to 1000 connections, 1000 connections and 120 seconds respectively.
More details on this can be found at https://golang.org/pkg/database/sql
+
+## Making http.Client calls through Forward proxy server
+If forward proxy server related parameters are set, util.Transport() will provide the Transport roundtripper with
+the forward proxy parameters set.
+
diff --git a/apid.go b/apid.go
index 3613765..97134d7 100644
--- a/apid.go
+++ b/apid.go
@@ -18,6 +18,7 @@
"errors"
"os"
"time"
+ "github.com/apid/apid-core/util"
)
const (
@@ -29,7 +30,6 @@
configfwdProxyUser = "configfwdproxy_user"
configfwdProxyPasswd = "configfwdproxy_passwd"
configfwdProxyPort = "configfwdproxy_port"
- configfwdProxyPortURL = "configcompletefwdp"
)
var (
@@ -63,7 +63,7 @@
} else if fwdPrxy != "" && fwdPrxyPort != "" {
pURL = fwdprxyProt + "://" + fwdPrxy + ":" + fwdPrxyPort
}
- config.Set(configfwdProxyPortURL, pURL)
+ config.Set(util.ConfigfwdProxyPortURL, pURL)
}
type PluginInitFunc func(Services) (PluginData, error)
diff --git a/util/util.go b/util/util.go
index da35113..263b317 100644
--- a/util/util.go
+++ b/util/util.go
@@ -21,15 +21,7 @@
"net/url"
"time"
)
-
-const (
- configfwdProxyURL = "configfwdProxyURL"
- configfwdProxyUser = "configfwdProxyUser"
- configfwdProxyPasswd = "configfwdProxyPasswd"
- configfwdProxyProtocol = "configfwdProxyProtocol"
- configfwdProxyPort = "configfwdProxyPort"
-)
-
+const ConfigfwdProxyPortURL = "configcompletefwdp"
func IsValidUUID(id string) bool {
_, err := uuid.Parse(id)