Support BYOK for OSS storage driver

Change-Id: I423ad03e63bd38aded3abfcba49079ff2fbb3b74
Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
Li Yi 2018-12-25 08:30:40 +08:00
parent 40b7b5830a
commit 90bed67126
15 changed files with 1216 additions and 110 deletions

View file

@ -9,6 +9,8 @@ import (
"net/url"
"sort"
"time"
"fmt"
"encoding/json"
)
const dictionary = "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
@ -145,3 +147,12 @@ func GenerateRandomECSPassword() string {
return string(s)
}
func PrettyJson(object interface{}) string {
b,err := json.MarshalIndent(object,"", " ")
if err != nil {
fmt.Printf("ERROR: PrettyJson, %v\n %s\n",err,b)
}
return string(b)
}