A request to delete the bucket.
A GET request.
A PUT request: allows you to update the contents of this object.
A PUT request: allows you to update the contents of this object.
the consumer input type
the consumer output type
The name of parent bucket.
Copies the referenced object to another one.
Copies the referenced object to another one.
the name of the parent bucket for the target object
the name of the target object
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.copyTo("targetBucket", "copyName")
The default threshold for multipart (multi-component) upload.
Prepares a request to delete the referenced object.
Prepares a request to delete the referenced object.
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.delete()
Checks whether or not this object exists.
Checks whether or not this object exists.
May also return false
in cases you don't have permission
to view a certain object.
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.exists
Prepares the request to get the contents of this object.
Prepares the request to get the contents of this object.
import akka.stream.Materializer import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit m: Materializer) = myObject.get()
Returns the headers associated with the currently referenced object.
Returns the headers associated with the currently referenced object.
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.headers()
Returns the metadata associated with the currently referenced object
(normalized from the headers
).
Returns the metadata associated with the currently referenced object
(normalized from the headers
).
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.metadata()
Moves the referenced object to another one.
Moves the referenced object to another one. If fails, the current object is still available.
the name of the parent bucket for the target object
the name of the target object
if true, prevents overwriting an existing target object
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo(myObject: ObjectRef)(implicit ec: ExecutionContext) = myObject.moveTo("targetBucket", "newName", false)
The name of the object itself.
the consumer input type
the consumer output type
import akka.util.ByteString import akka.stream.Materializer import play.api.libs.ws.BodyWritable import scala.concurrent.Future import com.zengularity.benji.ObjectRef def upload(obj: ObjectRef)( implicit m: Materializer, w: BodyWritable[ByteString]) = obj.put[ByteString, Unit]({})((_, _) => Future.successful({}))
Try to get a reference of this object that would allow you to perform versioning related operations.
Try to get a reference of this object that would allow you to perform versioning related operations.
Some if the module of the object supports versioning related operations, otherwise None.
def foo(myObject: com.zengularity.benji.ObjectRef) =
myObject.versioning.isDefined
Copies the referenced object to another one.
Copies the referenced object to another one.
the reference to the target object
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo( myObject: ObjectRef, otherRef: ObjectRef)(implicit ec: ExecutionContext) = myObject.copyTo(otherRef)
Moves the referenced object to another one.
Moves the referenced object to another one. If fails, the current object is still available.
the reference to the target object
if true, prevents overwriting an existing target object (default: true)
import scala.concurrent.ExecutionContext import com.zengularity.benji.ObjectRef def foo( myObject: ObjectRef, otherRef: ObjectRef)( implicit ec: ExecutionContext) = myObject.moveTo(otherRef)
the consumer input type
the total size in bytes to be PUTed
the consumer input type
A live reference to a storage object. The operations are scoped on the specified object.
Such reference must only be used with the storage which resolved it first.