Google Cloud Firestore
<dependency>
<groupId>org.eclipse.store</groupId>
<artifactId>afs-googlecloud-firestore</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-firestore</artifactId>
<version>3.0.17</version>
</dependency>
Firestore firestore = ...
BlobStoreFileSystem fileSystem = BlobStoreFileSystem.New(
GoogleCloudFirestoreConnector.Caching(client)
);
EmbeddedStorage.start(fileSystem.ensureDirectoryPath("storage"));
Configuration
When using external configuration Google Cloud Firestore can be set as follows.
# optional, enforces checks
storage-filesystem.target=googlecloud.firestore
storage-filesystem.googlecloud.firestore.credentials.type=default
storage-filesystem.googlecloud.firestore.database-id=my-database-id
storage-filesystem.googlecloud.firestore.project-id=my-project-id
Supported properties
Property | Description | Type |
---|---|---|
database-id |
The database ID to use with this Firestore client. |
String |
emulator-host |
The emulator host to use with this Firestore client. |
String |
host |
The service host. |
String |
project-id |
The project ID. If no project ID is set, the project ID from the environment will be used. |
String |
quota-project-id |
The project ID that specifies the project used for quota and billing purposes. |
String |
credentials.type |
The type of the credentials provider. Supported values are:
|
String |
Depending on the amount of data and transactions, charges may apply depending on service usage. Please check with your service provider for details. |