gateway: Support for custom endpoint. (#4086)

This commit is contained in:
Krishna Srinivas
2017-04-11 17:44:26 -07:00
committed by Minio Trusted
parent 8a7cffe7b8
commit fb506c7fca
3 changed files with 95 additions and 6 deletions
+5 -3
View File
@@ -123,9 +123,11 @@ func azureToObjectError(err error, params ...string) error {
}
// Inits azure blob storage client and returns AzureObjects.
func newAzureLayer(account, key string) (GatewayLayer, error) {
useHTTPS := true
c, err := storage.NewClient(account, key, storage.DefaultBaseURL, globalAzureAPIVersion, useHTTPS)
func newAzureLayer(endPoint string, account, key string, secure bool) (GatewayLayer, error) {
if endPoint == "" {
endPoint = storage.DefaultBaseURL
}
c, err := storage.NewClient(account, key, endPoint, globalAzureAPIVersion, secure)
if err != nil {
return AzureObjects{}, err
}