Add minios:// for minio servers with SSL support

This commit is contained in:
Gilbert Chen
2017-07-12 21:09:19 -04:00
parent f8d879d414
commit 483ae5e6eb
3 changed files with 10 additions and 8 deletions

View File

@@ -23,7 +23,8 @@ type S3Storage struct {
// CreateS3Storage creates a amazon s3 storage object.
func CreateS3Storage(regionName string, endpoint string, bucketName string, storageDir string,
accessKey string, secretKey string, threads int, isMinioCompatible bool) (storage *S3Storage, err error) {
accessKey string, secretKey string, threads int,
isSSLSupported bool, isMinioCompatible bool) (storage *S3Storage, err error) {
token := ""
@@ -54,7 +55,7 @@ func CreateS3Storage(regionName string, endpoint string, bucketName string, stor
Credentials: auth,
Endpoint: aws.String(endpoint),
S3ForcePathStyle: aws.Bool(isMinioCompatible),
DisableSSL: aws.Bool(isMinioCompatible),
DisableSSL: aws.Bool(!isSSLSupported),
}
if len(storageDir) > 0 && storageDir[len(storageDir) - 1] != '/' {