-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add S3ByteArrayFetching as a guiding alias
- Loading branch information
Showing
7 changed files
with
80 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Au revoir! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
aws-s3/base/src/main/scala/com/gu/etagcaching/aws/s3/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.gu.etagcaching.aws | ||
|
||
import com.gu.etagcaching.fetching.Fetching | ||
|
||
package object s3 { | ||
/** | ||
* This type provides an interface to get bytes out of S3, independent of the version of the | ||
* AWS SDK in use. When code depends on this interface, it's not directly tied to AWS SDK | ||
* version 1 or 2, and consumers can provide an instance of the interface backed by whatever | ||
* client they prefer (even AWS SDK v1, though that is discouraged). | ||
* | ||
* Assuming you're using AWS SDK v2, get an instance of `S3ByteArrayFetching` by adding | ||
* "com.gu.etag-caching" %% "aws-s3-sdk-v2" as a dependency, then: | ||
* | ||
* {{{ | ||
* import com.gu.etagcaching.aws.sdkv2.s3.S3ObjectFetching | ||
* | ||
* val s3AsyncClient: software.amazon.awssdk.services.s3.S3AsyncClient = ??? // AWS SDK v2 | ||
* val s3Fetching: S3ByteArrayFetching = S3ObjectFetching.byteArrayWith(s3AsyncClient) | ||
* }}} | ||
*/ | ||
type S3ByteArrayFetching = Fetching[ObjectId, Array[Byte]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters