Class GoogleCloudStorageFactory

java.lang.Object
io.micronaut.objectstorage.googlecloud.GoogleCloudStorageFactory

@Factory public class GoogleCloudStorageFactory extends Object
Since:
1.0
Author:
Pavol Gressa
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.cloud.storage.StorageOptions.Builder
    builder(@NonNull io.micronaut.gcp.GoogleCloudConfiguration configuration, @NonNull com.google.auth.oauth2.GoogleCredentials googleCredentials)
     
    @NonNull com.google.cloud.storage.Storage
    storage(@NonNull com.google.cloud.storage.StorageOptions storageOptions)
     
    @NonNull com.google.cloud.storage.StorageOptions
    storageOptions(com.google.cloud.storage.StorageOptions.Builder builder)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GoogleCloudStorageFactory

      public GoogleCloudStorageFactory()
  • Method Details

    • builder

      @RequiresGoogleProjectId @Singleton @NonNull public com.google.cloud.storage.StorageOptions.Builder builder(@NonNull @NonNull io.micronaut.gcp.GoogleCloudConfiguration configuration, @NonNull @NonNull com.google.auth.oauth2.GoogleCredentials googleCredentials)
      Parameters:
      configuration - The Google Cloud Configuration
      googleCredentials - The Google Credentials
      Returns:
      The storage instance
    • storageOptions

      @Requires(bean=com.google.cloud.storage.StorageOptions.Builder.class) @Singleton @NonNull public @NonNull com.google.cloud.storage.StorageOptions storageOptions(@NonNull com.google.cloud.storage.StorageOptions.Builder builder)
      Parameters:
      builder - the builder
      Returns:
      the Storage
    • storage

      @Requires(bean=com.google.cloud.storage.StorageOptions.class) @Singleton @NonNull public @NonNull com.google.cloud.storage.Storage storage(@NonNull @NonNull com.google.cloud.storage.StorageOptions storageOptions)
      Parameters:
      storageOptions - the storage options
      Returns:
      the Storage