Class GoogleCloudStorageFactory
java.lang.Object
io.micronaut.objectstorage.googlecloud.GoogleCloudStorageFactory
- Since:
- 1.0
- Author:
- Pavol Gressa
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.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)
-
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 ConfigurationgoogleCredentials
- 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
-