Class GCPStorageImpl

java.lang.Object
org.webpieces.googlecloud.storage.impl.GCPStorageImpl
All Implemented Interfaces:
GCPRawStorage, GCPStorage

@Singleton public class GCPStorageImpl extends Object implements GCPStorage
Since tests mock rawStorage, changes to this class get included in testing. THIS IS A GOOD THING ^^^^. Do not break people
  • Constructor Details

    • GCPStorageImpl

      @Inject public GCPStorageImpl(GCPRawStorage rawStorage, org.webpieces.util.context.ClientAssertions clientAssertions, ChannelWrapper channelWrapper)
  • Method Details

    • get

      public com.google.cloud.storage.Bucket get(String bucket, com.google.cloud.storage.Storage.BucketGetOption... options)
      Specified by:
      get in interface GCPRawStorage
    • get

      public GCPBlob get(String bucket, String blob, com.google.cloud.storage.Storage.BlobGetOption... options)
      Specified by:
      get in interface GCPRawStorage
    • list

      public com.google.api.gax.paging.Page<GCPBlob> list(String bucket, com.google.cloud.storage.Storage.BlobListOption... options)
      Specified by:
      list in interface GCPRawStorage
    • delete

      public boolean delete(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options)
      Specified by:
      delete in interface GCPRawStorage
    • readAllBytes

      public byte[] readAllBytes(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options)
      Specified by:
      readAllBytes in interface GCPRawStorage
    • reader

      public ReadableByteChannel reader(String bucket, String blob, com.google.cloud.storage.Storage.BlobSourceOption... options)
      Specified by:
      reader in interface GCPRawStorage
    • writer

      public WritableByteChannel writer(com.google.cloud.storage.BlobInfo blobInfo, com.google.cloud.storage.Storage.BlobWriteOption... options)
      Specified by:
      writer in interface GCPRawStorage
    • copy

      public CopyInterface copy(com.google.cloud.storage.Storage.CopyRequest copyRequest)
      Specified by:
      copy in interface GCPRawStorage