From 477804e21c3c61666a48b74f17caef04233c2363 Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Thu, 4 Oct 2018 13:52:14 -0700 Subject: Fix dependencies in tests to accomodate project split --- .../xyz/driver/core/storage/AliyunBlobStorage.scala | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'core-storage') 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 7e59df4..fd0e7c6 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 @@ -18,11 +18,11 @@ import scala.concurrent.duration.Duration import scala.concurrent.{ExecutionContext, Future} class AliyunBlobStorage( - client: OSSClient, - bucketId: String, - clock: Clock, - chunkSize: Int = AliyunBlobStorage.DefaultChunkSize)(implicit ec: ExecutionContext) - extends SignedBlobStorage { + client: OSSClient, + bucketId: String, + clock: Clock, + chunkSize: Int = AliyunBlobStorage.DefaultChunkSize)(implicit ec: ExecutionContext) + extends SignedBlobStorage { override def uploadContent(name: String, content: Array[Byte]): Future[String] = Future { client.putObject(bucketId, name, new ByteArrayInputStream(content)) name @@ -61,7 +61,7 @@ class AliyunBlobStorage( Future { client.putObject(bucketId, name, is) Done - }) + }) } override def delete(name: String): Future[String] = Future { @@ -92,8 +92,7 @@ class AliyunBlobStorage( object AliyunBlobStorage { val DefaultChunkSize: Int = 8192 - def apply(config: Config, bucketId: String, clock: Clock)( - implicit ec: ExecutionContext): AliyunBlobStorage = { + def apply(config: Config, bucketId: String, clock: Clock)(implicit ec: ExecutionContext): AliyunBlobStorage = { val clientId = config.getString("storage.aliyun.clientId") val clientSecret = config.getString("storage.aliyun.clientSecret") val endpoint = config.getString("storage.aliyun.endpoint") @@ -101,7 +100,7 @@ object AliyunBlobStorage { } def apply(clientId: String, clientSecret: String, endpoint: String, bucketId: String, clock: Clock)( - implicit ec: ExecutionContext): AliyunBlobStorage = { + implicit ec: ExecutionContext): AliyunBlobStorage = { val client = new OSSClient(endpoint, clientId, clientSecret) new AliyunBlobStorage(client, bucketId, clock) } -- cgit v1.2.3