Swiftpack.co - Package - vapor-community/google-cloud

GoogleCloud

Swift Vapor

GoogleCloud is a Vapor wrapper around GoogleCloudKit

Installation

In your Package.swift file, add the following

.package(url: "https://github.com/vapor-community/google-cloud.git", from: "1.0.0-rc")

Usage

You can check each supported API's README for a getting started guide.

Supported APIs

[x] CloudStorage

A More detailed guide can be found here.

Github

link
Stars: 17

Used By

Total: 0

Releases

Google Cloud RC 2.1 - 2020-03-13 18:10:31

Fixes a missing target when trying to import google cloud storage.

GoogleCloud 1.0.0 RC 2 - 2020-03-13 15:48:47

GoogleCloud RC 1 - 2020-03-13 02:03:30

This release supports the latest vapor release candidate which means requiring swift 5.2

GoogleCloudProvider beta 2 - 2019-12-26 17:04:46

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.
    }
}

GoogleCloudProvider 1.0.0 Beta 1 - 2019-11-03 05:57:11

Updated for Vapor 4 beta.

GoogleCloudProvider Alpha 1 - 2019-08-23 22:16:19

GoogleCloudProvider for Vapor 4 that wraps GoogleCloudKit to interface with Vapor.

Fixed issue with url paths. - 2019-08-19 22:57:41

Removed an extra closing parenthesis from URL paths.

Raw JSON credentials via ENV variables. - 2019-01-09 01:20:35

Added support for exporting raw JSON to an env variable in addition to a file path.

Fixes any success code not 200 from throwing an error. - 2018-12-17 19:57:16

Compute Engine and AppEngineFlex Credentials support - 2018-11-17 20:40:17

Added support for loading GOOGLE_APPLICATION_CREDENTIALS by default for AppEngine Flex and compute engine.

Module rename. - 2018-08-27 00:48:19

Instead of importing GoogleCloudProvider and defining it in your Package.swiftdependencies use GoogleCloud instead.

Bug fixes. - 2018-08-27 00:26:52

JWT 3.0.0 support - 2018-08-15 21:24:34

StorageClient Protocol support - 2018-08-09 00:20:18

Optimizations for testing. - 2018-07-29 13:17:50

Cleanup for detecting credentials and convenience to retrieve Storage object data - 2018-07-20 00:48:35

Better Service account support. - 2018-07-19 02:28:43

Better error handling. - 2018-06-24 22:46:50

Initial pre-release - 2018-05-27 21:29:07