Scala framework for Object Storage
Support Scala 3 (still minimal for Play modules)
// For Benji Google
//Remove dependency on: com.google.api.client.googleapis.auth.oauth2.GoogleCredential
import com.google.auth.oauth2.GoogleCredentials
2.0.3-play26
)"com.zengularity.benji" %% "benji-x" % version
.S3("s3:http://accessKey:secretKey@hostAndPort/?style=path")
recursive
option to be able to remove a bucket which still contains some object (by deleting them first); The delete behaviour has also been unified accross the modules (e.g. error handling in case the bucket to delete doesn’t exist).Flow.foldAsync
).New VFS module
Akka Stream migration (see Play Migration guide).
The Bucket
, Object
and Bytes
case classes are moved to the package com.zengularity.storage
.
In the case class Bucket
, the property creationDate
is renamed to creationTime
.
In the case class Object
:
key
is renamed to name
,bytes
is renamed to size
, and its type is updated to Bytes
.In the Bytes
value class, the property inBytes
is renamed to bytes
.
In the WSS3
class;
bucket(String)
now returns a value implementing the new BucketRef
interface.obj(String)
returns a value implementing the new ObjectRef
interface.The new ObjectRef
interface;
bucketName
is renamed to bucket
.objectName
is renamed to name
..get
function now returns a GetRequest
, that can be applied with some optional arguments (e.g. ContentRange)..put[E, A]
function now returns a PutRequest
, that can be applied with some optional arguments..delete
function is now specified in case the referenced object doesn’t exist: it returns a failure
.The WSS3ObjectRef
class is now an implementation of the generic ObjectRef
.
defaultMaxPart
is moved to the S3 RESTPutRequest
, where it can be adjusted using .withMaxPart
.The new BucketRef
interface;
.objects
function now returns a ListRequest
that can be applied with options, and must be called using .objects()
(with ()
). The ListRequest
also provides a convenient .collect
function.The new ObjectStorage
trait implemented by WSS3;
.buckets
function now returns a BucketsRequest
, that can be applied.The WSRequestBuilder
has been refactored as a sealed trait. The related PreparedRequest
case class is removed.
SLF4J is directly used for logging, instead of play.api.Logger
.
The utility Iteratees
is moved as com.zengularity.storage.Streams
, with the new consumeAtMost
function (used for the Google module).