aboutsummaryrefslogtreecommitdiff
path: root/core-storage
diff options
context:
space:
mode:
authorZach Smith <zach@driver.xyz>2018-08-30 16:04:40 -0700
committerJakob Odersky <jakob@odersky.com>2018-10-09 18:59:24 -0700
commit3557098f101745cd6be32527f1c628e9d6d9959d (patch)
treebef92aaa0292b9a2599a4f92e12a30d738ae8067 /core-storage
parent46d7e38b4651caff2a7fb9dc9ee1aa398807db44 (diff)
downloaddriver-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.scala6
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)
}
}