add minio as a separate backend

Fixes #308
This commit is contained in:
Girish Ramakrishnan
2017-04-22 11:52:47 -07:00
parent a7d7935451
commit d91e8bb87b
5 changed files with 31 additions and 18 deletions
+1
View File
@@ -89,6 +89,7 @@ function api(provider) {
case 'caas': return caas;
case 's3': return s3;
case 'filesystem': return filesystem;
case 'minio': return s3;
default: return null;
}
}
+1
View File
@@ -26,6 +26,7 @@ function api(provider) {
case 'caas': return caas;
case 's3': return s3;
case 'filesystem': return filesystem;
case 'minio': return s3;
default: return null;
}
}
+1
View File
@@ -198,6 +198,7 @@ function testConfig(apiConfig, callback) {
if (typeof apiConfig.bucket !== 'string') return callback(new BackupsError(BackupsError.BAD_FIELD, 'bucket must be a string'));
if (typeof apiConfig.prefix !== 'string') return callback(new BackupsError(BackupsError.BAD_FIELD, 'prefix must be a string'));
if ('signatureVersion' in apiConfig && typeof apiConfig.prefix !== 'string') return callback(new BackupsError(BackupsError.BAD_FIELD, 'signatureVersion must be a string'));
if ('endpoint' in apiConfig && typeof apiConfig.prefix !== 'string') return callback(new BackupsError(BackupsError.BAD_FIELD, 'endpoint must be a string'));
// attempt to upload and delete a file with new credentials
getBackupCredentials(apiConfig, function (error, credentials) {