1 /*********************************************************************************************************************************** 2 S3 Storage 3 ***********************************************************************************************************************************/ 4 #ifndef STORAGE_S3_STORAGE_H 5 #define STORAGE_S3_STORAGE_H 6 7 #include "storage/storage.h" 8 9 /*********************************************************************************************************************************** 10 Storage type 11 ***********************************************************************************************************************************/ 12 #define STORAGE_S3_TYPE STRID6("s3", 0x7d31) 13 14 /*********************************************************************************************************************************** 15 Key type 16 ***********************************************************************************************************************************/ 17 typedef enum 18 { 19 storageS3KeyTypeShared = STRID5("shared", 0x85905130), 20 storageS3KeyTypeAuto = STRID5("auto", 0x7d2a10), 21 } StorageS3KeyType; 22 23 /*********************************************************************************************************************************** 24 URI style 25 ***********************************************************************************************************************************/ 26 typedef enum 27 { 28 storageS3UriStyleHost = STRID5("host", 0xa4de80), 29 storageS3UriStylePath = STRID5("path", 0x450300), 30 } StorageS3UriStyle; 31 32 /*********************************************************************************************************************************** 33 Defaults 34 ***********************************************************************************************************************************/ 35 #define STORAGE_S3_PARTSIZE_MIN ((size_t)5 * 1024 * 1024) 36 37 /*********************************************************************************************************************************** 38 Constructors 39 ***********************************************************************************************************************************/ 40 Storage *storageS3New( 41 const String *path, bool write, StoragePathExpressionCallback pathExpressionFunction, const String *bucket, 42 const String *endPoint, StorageS3UriStyle uriStyle, const String *region, StorageS3KeyType keyType, const String *accessKey, 43 const String *secretAccessKey, const String *securityToken, const String *credRole, size_t partSize, const String *host, 44 unsigned int port, TimeMSec timeout, bool verifyPeer, const String *caFile, const String *caPath); 45 46 #endif 47