diff options
author | Zach Smith <zach@driver.xyz> | 2018-08-30 16:04:40 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-10-09 18:59:24 -0700 |
commit | 3557098f101745cd6be32527f1c628e9d6d9959d (patch) | |
tree | bef92aaa0292b9a2599a4f92e12a30d738ae8067 /core-storage | |
parent | 46d7e38b4651caff2a7fb9dc9ee1aa398807db44 (diff) | |
download | driver-core-3557098f101745cd6be32527f1c628e9d6d9959d.tar.gz driver-core-3557098f101745cd6be32527f1c628e9d6d9959d.tar.bz2 driver-core-3557098f101745cd6be32527f1c628e9d6d9959d.zip |
Add AliCloud Platform support
Diffstat (limited to 'core-storage')
-rw-r--r-- | core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala b/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala index fd0e7c6..e40a83e 100644 --- a/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala +++ b/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala @@ -99,9 +99,11 @@ object AliyunBlobStorage { this(clientId, clientSecret, endpoint, bucketId, clock) } - def apply(clientId: String, clientSecret: String, endpoint: String, bucketId: String, clock: Clock)( + def apply(clientId: String, clientSecret: String, region: String, bucketId: String, cloxk: Clock)( implicit ec: ExecutionContext): AliyunBlobStorage = { - val client = new OSSClient(endpoint, clientId, clientSecret) + // https://www.alibabacloud.com/help/doc-detail/31837.htm + val endpoint = s"https://oss-$region.aliyuncs.com" + val client = new OSSClient(endpoint, clientId, clientSecret) new AliyunBlobStorage(client, bucketId, clock) } } |