Releases: vapor-community/google-cloud
1.4.1
What's Changed
- Lock google-cloud-kit dependency version at
1.0.0-rc.9
until we bumpswift-tools
andmacOS
version to5.7
andv13
respectively by @susheel-clearcals in #32
Full Changelog: 1.4.0...1.4.1
Google Cloud 1.4.0
This release adds support for Cloud PubSub API
Google Cloud 1.3.0
Adds support for the Translate API
GoogleCloud 1.2.0
This release adds support for Cloud Secret Manager.
GoogleCloud 1.1.0
This release Exposes an app.googleCloud.datastore.base
property, which is useful if you want to use the local Datastore emulator, for example:
app.googleCloud.datastore.base = "http://localhost:8081"
Defaults to the live URL of https://datastore.googleapis.com
Google Cloud 1.0.0
Official 1.0.0 release now that Vapor 4 has officially been tagged.
Google Cloud RC 2.1
Fixes a missing target when trying to import google cloud storage.
GoogleCloud 1.0.0 RC 2
Merge pull request #23 from vapor-community/target-update Fixed targets and imports.
GoogleCloud RC 1
This release supports the latest vapor release candidate which means requiring swift 5.2
GoogleCloudProvider beta 2
This release adopts the new extension API for services on Application
and Request
.
Now you can setup google cloud credentials globally and setup a specific API individually through Application
app.googleCloud.credentials = try GoogleCloudCredentialsConfiguration(projectId: "myprojectid-12345", credentialsFile: "~/path/to/service-account.json")
app.googleCloud.storage.configuration = .default()
func uploadImage(_ req: Request) throws {
/// req.gcs gives access to the cloud storage client.
req.gcs.object.createSimpleUpload(bucket: "vapor-cloud-storage-demo",
data: Data(...),
name: "my-image",
contentType: "image/jpeg").flatMap { uploadedObject in
print(uploadedObject.mediaLink) // prints the download link for the image.
}
}