Skip to content
Permalink
Browse files

Create general-purpose S3 list function.

There are already two functions which need file lists and more on the way, so create a general-purpose function to reduce code duplication.
  • Loading branch information...
dwsteele committed Jun 10, 2019
1 parent fb8bd09 commit 456391f67c220647e130fdc7a7fc805b075cfd87
Showing with 225 additions and 149 deletions.
  1. +2 −2 src/storage/helper.c
  2. +200 −129 src/storage/s3/storage.c
  3. +3 −2 src/storage/s3/storage.h
  4. +20 −16 test/src/module/storage/s3Test.c
@@ -305,8 +305,8 @@ storageRepoGet(const String *type, bool write)
result = storageS3New(
cfgOptionStr(cfgOptRepoPath), write, storageRepoPathExpression, cfgOptionStr(cfgOptRepoS3Bucket), endPoint,
cfgOptionStr(cfgOptRepoS3Region), cfgOptionStr(cfgOptRepoS3Key), cfgOptionStr(cfgOptRepoS3KeySecret),
cfgOptionTest(cfgOptRepoS3Token) ? cfgOptionStr(cfgOptRepoS3Token) : NULL, STORAGE_S3_PARTSIZE_MIN, host, port,
STORAGE_S3_TIMEOUT_DEFAULT, cfgOptionBool(cfgOptRepoS3VerifyTls),
cfgOptionTest(cfgOptRepoS3Token) ? cfgOptionStr(cfgOptRepoS3Token) : NULL, STORAGE_S3_PARTSIZE_MIN,
STORAGE_S3_DELETE_MAX, host, port, STORAGE_S3_TIMEOUT_DEFAULT, cfgOptionBool(cfgOptRepoS3VerifyTls),
cfgOptionTest(cfgOptRepoS3CaFile) ? cfgOptionStr(cfgOptRepoS3CaFile) : NULL,
cfgOptionTest(cfgOptRepoS3CaPath) ? cfgOptionStr(cfgOptRepoS3CaPath) : NULL);
}

0 comments on commit 456391f

Please sign in to comment.
You can’t perform that action at this time.