package s3
- Alphabetic
- By Inheritance
- s3
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class ConnectionError(message: String, cause: Throwable) extends S3Exception with Product with Serializable
- final case class InvalidCredentials(message: String) extends S3Exception with Product with Serializable
- final case class InvalidPartSize(message: String, size: Int) extends S3Exception with Product with Serializable
- final case class InvalidSettings(message: String) extends S3Exception with Product with Serializable
-
final
case class
ListObjectOptions(prefix: Option[String], maxKeys: Long, delimiter: Option[String], starAfter: Option[String]) extends Product with Serializable
The options of the listing object inside a bucket.
The options of the listing object inside a bucket.
- prefix
filter all object identifier which start with this
prefix
- maxKeys
max total number of objects, default value is 1000 elements
- delimiter
A delimiter is a character you use to group keys, default value is empty
- starAfter
Starts listing after this specified key. StartAfter can be any key in the bucket, default value is empty
-
final
class
Live extends Service
Service use to wrap the unsafe amazon s3 client and access safely to s3 storage
-
final
case class
MultipartUploadOptions(uploadOptions: UploadOptions, partSize: Int) extends Product with Serializable
The upload options that are specific to multipart uploads
The upload options that are specific to multipart uploads
- uploadOptions
- partSize
the size of the part in bytes, the minimum is 5 MB
-
final
case class
ObjectMetadata(metadata: Map[String, String], contentType: String, contentLength: Long) extends Product with Serializable
- metadata
the user-defined metadata without the "x-amz-meta-" prefix
- contentType
the content type of the object (application/json, application/zip, text/plain, ...)
- contentLength
the size of the object in bytes
- type S3 = Has[Service]
- final case class S3Bucket(name: String, creationDate: Instant) extends Product with Serializable
- final case class S3Credentials(accessKeyId: String, secretAccessKey: String) extends Product with Serializable
- final case class S3ObjectListing(bucketName: String, delimiter: Option[String], starAfter: Option[String], objectSummaries: Chunk[S3ObjectSummary], nextContinuationToken: Option[String]) extends Product with Serializable
- final case class S3ObjectSummary(bucketName: String, key: String, lastModified: Instant, size: Long) extends Product with Serializable
- final case class S3Region(region: Region) extends Product with Serializable
- final case class S3Settings(s3Region: S3Region, credentials: S3Credentials) extends Product with Serializable
- type S3Stream[A] = ZStream[S3, S3Exception, A]
- type Settings = Has[S3Settings]
-
final
case class
UploadOptions(metadata: Map[String, String], cannedAcl: ObjectCannedACL, contentType: Option[String]) extends Product with Serializable
The options of the multipart upload and the put object request.
The options of the multipart upload and the put object request.
- metadata
the user-defined metadata without the "x-amz-meta-" prefix
- cannedAcl
a canned acl, defaults to "private"
- contentType
the content type of the object (application/json, application/zip, text/plain, ...)
Value Members
- def createBucket(bucketName: String): ZIO[S3, S3Exception, Unit]
- def deleteBucket(bucketName: String): ZIO[S3, S3Exception, Unit]
- def deleteObject(bucketName: String, key: String): ZIO[S3, S3Exception, Unit]
- def execute[T](f: (S3AsyncClient) ⇒ CompletableFuture[T]): ZIO[S3, S3Exception, T]
- def getNextObjects(listing: S3ObjectListing): ZIO[S3, S3Exception, S3ObjectListing]
- def getObject(bucketName: String, key: String): ZStream[S3, S3Exception, Byte]
- def getObjectMetadata(bucketName: String, key: String): ZIO[S3, S3Exception, ObjectMetadata]
- def isBucketExists(bucketName: String): ZIO[S3, S3Exception, Boolean]
- def listAllObjects(bucketName: String, options: ListObjectOptions): S3Stream[S3ObjectSummary]
- def listAllObjects(bucketName: String): S3Stream[S3ObjectSummary]
- val listBuckets: ZIO[S3, S3Exception, S3BucketListing]
- def listObjects(bucketName: String, options: ListObjectOptions): ZIO[S3, S3Exception, S3ObjectListing]
-
def
listObjects(bucketName: String): ZIO[S3, S3Exception, S3ObjectListing]
Same as listObjects with default values for an empty prefix and sets the maximum number of object max to
1000
Same as listObjects with default values for an empty prefix and sets the maximum number of object max to
1000
- bucketName
name of the bucket
- def live(region: Region, credentials: S3Credentials, uriEndpoint: Option[URI]): Layer[ConnectionError, S3]
- def live(region: Region, credentials: S3Credentials): Layer[ConnectionError, S3]
- def live(region: String, credentials: S3Credentials): Layer[ConnectionError, S3]
- val live: ZLayer[Settings, ConnectionError, S3]
-
def
multipartUpload[R](bucketName: String, key: String, content: ZStream[R, Throwable, Byte], options: MultipartUploadOptions = MultipartUploadOptions.default)(parallelism: Int): ZIO[S3 with R, S3Exception, Unit]
Same as multipartUpload with default parallelism = 1
Same as multipartUpload with default parallelism = 1
- bucketName
name of the bucket
- key
unique object identifier
- content
object data
- options
the optional configurations of the multipart upload
- def paginate(initialListing: S3ObjectListing): S3Stream[S3ObjectListing]
- def putObject[R](bucketName: String, key: String, contentLength: Long, content: ZStream[R, Throwable, Byte], options: UploadOptions = UploadOptions.default): ZIO[S3 with R, S3Exception, Unit]
- def settings[R](region: Region, cred: ZIO[R, InvalidCredentials, S3Credentials]): ZLayer[R, S3Exception, Settings]
- def streamLines(bucketName: String, key: String): S3Stream[String]
- def stub(path: Path): ZLayer[Blocking, Any, S3]
- object ListObjectOptions extends Serializable
- object Live
- object MaxKeys
- object MultipartUploadOptions extends Serializable
- object ObjectMetadata extends Serializable
- object PartSize
-
object
S3
The
S3
module provides access to a s3 amazon storage.The
S3
module provides access to a s3 amazon storage. All operations are async since we are relying on the amazon async client - object S3Bucket extends Serializable
- object S3Credentials extends Serializable
- object S3ObjectListing extends Serializable
- object S3Region extends Serializable
- object S3Settings extends Serializable
-
object
Test
Stub Service which is back by a filesystem storage
- object UploadOptions extends Serializable