Packages

object GCStorage

Factory of Google Cloud Storage operations.

Source
GCStorage.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GCStorage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def createBucket(bucketName: String, location: String)(implicit mat: Materializer, attr: Attributes = Attributes()): Future[Bucket]

    Creates a new bucket

    Creates a new bucket

    bucketName

    the name of the bucket

    location

    the region to put the bucket in

    returns

    a Future of Bucket with created bucket

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/insert

  7. def createBucketSource(bucketName: String, location: String): Source[Bucket, NotUsed]

    Creates a new bucket

    Creates a new bucket

    bucketName

    the name of the bucket

    location

    the region to put the bucket in

    returns

    a Source of Bucket with created bucket

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/insert

  8. def deleteBucket(bucketName: String)(implicit mat: Materializer, attr: Attributes = Attributes()): Future[Done]

    Deletes bucket

    Deletes bucket

    bucketName

    the name of the bucket

    returns

    a Future of Done on successful deletion

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/delete

  9. def deleteBucketSource(bucketName: String): Source[Done, NotUsed]

    Deletes bucket

    Deletes bucket

    bucketName

    the name of the bucket

    returns

    a Source of Done on successful deletion

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/delete

  10. def deleteObject(bucketName: String, objectName: String, generation: Option[Long]): Source[Boolean, NotUsed]

    Deletes object in bucket

    Deletes object in bucket

    bucketName

    the name of the bucket

    objectName

    the name of the object

    generation

    the generation of the object

    returns

    a Source of Boolean with true if object is deleted, false if object that we want to deleted doesn't exist

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/delete

  11. def deleteObject(bucketName: String, objectName: String): Source[Boolean, NotUsed]

    Deletes object in bucket

    Deletes object in bucket

    bucketName

    the name of the bucket

    objectName

    the name of the object

    returns

    a Source of Boolean with true if object is deleted, false if object that we want to deleted doesn't exist

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/delete

  12. def deleteObjectsByPrefix(bucket: String, prefix: Option[String]): Source[Boolean, NotUsed]

    Deletes folder and its content.

    Deletes folder and its content.

    bucket

    the bucket name

    prefix

    the object prefix

    returns

    a Source of Boolean with all true if everything is deleted

  13. def download(bucket: String, objectName: String, generation: Option[Long]): Source[Option[Source[ByteString, NotUsed]], NotUsed]

    Downloads object from bucket.

    Downloads object from bucket.

    bucket

    the bucket name

    objectName

    the bucket prefix

    generation

    the generation of the object

    returns

    The source will emit an empty Option if an object can not be found. Otherwise Option will contain a source of object's data.

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/get

  14. def download(bucket: String, objectName: String): Source[Option[Source[ByteString, NotUsed]], NotUsed]

    Downloads object from bucket.

    Downloads object from bucket.

    bucket

    the bucket name

    objectName

    the bucket prefix

    returns

    The source will emit an empty Option if an object can not be found. Otherwise Option will contain a source of object's data.

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/get

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def getBucket(bucketName: String)(implicit mat: Materializer, attr: Attributes = Attributes()): Future[Option[Bucket]]

    Gets information on a bucket

    Gets information on a bucket

    bucketName

    the name of the bucket to look up

    returns

    a Future containing Bucket if it exists

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/get

  19. def getBucketSource(bucketName: String): Source[Option[Bucket], NotUsed]

    Gets information on a bucket

    Gets information on a bucket

    bucketName

    the name of the bucket to look up

    returns

    a Source containing Bucket if it exists

    See also

    https://cloud.google.com/storage/docs/json_api/v1/buckets/get

  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def getObject(bucket: String, objectName: String, generation: Option[Long]): Source[Option[StorageObject], NotUsed]

    Get storage object

    Get storage object

    bucket

    the name of the bucket

    objectName

    the name of the object

    generation

    the generation of the object

    returns

    a Source containing StorageObject if it exists

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/get

  22. def getObject(bucket: String, objectName: String): Source[Option[StorageObject], NotUsed]

    Get storage object

    Get storage object

    bucket

    the name of the bucket

    objectName

    the name of the object

    returns

    a Source containing StorageObject if it exists

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/get

  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def listBucket(bucket: String, prefix: Option[String], versions: Boolean): Source[StorageObject, NotUsed]

    Lists the bucket contents

    Lists the bucket contents

    bucket

    the bucket name

    prefix

    the bucket prefix

    versions

    true to list both live and archived bucket contents

    returns

    a Source of StorageObject

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/list

  26. def listBucket(bucket: String, prefix: Option[String]): Source[StorageObject, NotUsed]

    Lists the bucket contents

    Lists the bucket contents

    bucket

    the bucket name

    prefix

    the bucket prefix

    returns

    a Source of StorageObject

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/list

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. def resumableUpload(bucket: String, objectName: String, contentType: ContentType): Sink[ByteString, Future[StorageObject]]

    Uploads object by making multiple requests with default chunk size of 5MB

    Uploads object by making multiple requests with default chunk size of 5MB

    bucket

    the bucket name

    objectName

    the object name

    contentType

    ContentType

    returns

    a Sink that accepts ByteString's and materializes to a scala.concurrent.Future Future of StorageObject

    See also

    https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload

  31. def resumableUpload(bucket: String, objectName: String, contentType: ContentType, chunkSize: Int): Sink[ByteString, Future[StorageObject]]

    Uploads object by making multiple requests

    Uploads object by making multiple requests

    bucket

    the bucket name

    objectName

    the object name

    contentType

    ContentType

    chunkSize

    the size of the request sent to google cloud storage in bytes, must be a multiple of 256KB

    returns

    a Sink that accepts ByteString's and materializes to a Future of StorageObject

    See also

    https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload

  32. def resumableUpload(bucket: String, objectName: String, contentType: ContentType, chunkSize: Int, metadata: Map[String, String]): Sink[ByteString, Future[StorageObject]]

    Uploads object by making multiple requests

    Uploads object by making multiple requests

    bucket

    the bucket name

    objectName

    the object name

    contentType

    ContentType

    chunkSize

    the size of the request sent to google cloud storage in bytes, must be a multiple of 256KB

    metadata

    custom metadata for the object

    returns

    a Sink that accepts ByteString's and materializes to a Future of StorageObject

    See also

    https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload

  33. def rewrite(sourceBucket: String, sourceObjectName: String, destinationBucket: String, destinationObjectName: String): RunnableGraph[Future[StorageObject]]

    Rewrites object to wanted destination by making multiple requests.

    Rewrites object to wanted destination by making multiple requests.

    sourceBucket

    the source bucket

    sourceObjectName

    the source object name

    destinationBucket

    the destination bucket

    destinationObjectName

    the destination bucket name

    returns

    a runnable graph which upon materialization will return a Future containing the StorageObject with info about rewritten file

    See also

    https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite

  34. def simpleUpload(bucket: String, objectName: String, data: Source[ByteString, _], contentType: ContentType): Source[StorageObject, NotUsed]

    Uploads object, use this for small files and resumableUpload for big ones

    Uploads object, use this for small files and resumableUpload for big ones

    bucket

    the bucket name

    objectName

    the object name

    data

    a Source of ByteString

    contentType

    the number of bytes that will be uploaded (required!)

    returns

    a Source containing the StorageObject of the uploaded object

    See also

    https://cloud.google.com/storage/docs/json_api/v1/how-tos/simple-upload

  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped