-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to multi-module project #74
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Google Cloud Java Client | ||
========================== | ||
|
||
Java idiomatic client for [Google Cloud Platform][cloud-platform] services. | ||
|
||
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) | ||
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) | ||
|
||
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) | ||
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) | ||
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) | ||
|
||
This module provides common functionality and is required by the other service specific modules. | ||
|
||
Quickstart | ||
---------- | ||
Add this to your pom.xml file | ||
```xml | ||
<dependency> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-core</artifactId> | ||
<version>LATEST</version> | ||
</dependency> | ||
``` | ||
|
||
Contributing | ||
------------ | ||
|
||
Contributions to this library are always welcome and highly encouraged. | ||
|
||
See [CONTRIBUTING] for more information on how to get started. | ||
|
||
Java Versions | ||
------------- | ||
|
||
Java 7 or above is required for using this client. | ||
|
||
Versioning | ||
---------- | ||
|
||
This library follows [Semantic Versioning] (http://semver.org/). | ||
|
||
It is currently in major version zero (``0.y.z``), which means that anything | ||
may change at any time and the public API should not be considered | ||
stable. | ||
|
||
License | ||
------- | ||
|
||
Apache 2.0 - See [LICENSE] for more information. | ||
|
||
|
||
[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md | ||
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE | ||
[cloud-platform]: https://cloud.google.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-core</artifactId> | ||
<packaging>jar</packaging> | ||
<name>GCloud Java core</name> | ||
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url> | ||
<description> | ||
Core module for the gcloud-java. | ||
</description> | ||
<parent> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-pom</artifactId> | ||
<version>0.0.5</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.auth</groupId> | ||
<artifactId>google-auth-library-credentials</artifactId> | ||
<version>0.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.auth</groupId> | ||
<artifactId>google-auth-library-oauth2-http</artifactId> | ||
<version>0.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.http-client</groupId> | ||
<artifactId>google-http-client</artifactId> | ||
<version>1.19.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.oauth-client</groupId> | ||
<artifactId>google-oauth-client</artifactId> | ||
<version>1.19.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>18.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.api-client</groupId> | ||
<artifactId>google-api-client-appengine</artifactId> | ||
<version>1.20.0</version> | ||
<scope>compile</scope> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>guava-jdk5</artifactId> | ||
<groupId>com.google.guava</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.http-client</groupId> | ||
<artifactId>google-http-client-jackson</artifactId> | ||
<version>1.20.0</version> | ||
<scope>compile</scope> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>guava-jdk5</artifactId> | ||
<groupId>com.google.guava</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time</artifactId> | ||
<version>RELEASE</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20090211</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.easymock</groupId> | ||
<artifactId>easymock</artifactId> | ||
<version>3.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../google/gcloud/spi/ServiceRpcFactory.java → .../google/gcloud/spi/ServiceRpcFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
Google Cloud Java Client | ||
========================== | ||
|
||
Java idiomatic client for [Google Cloud Platform][cloud-platform] services. | ||
|
||
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) | ||
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) | ||
|
||
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) | ||
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) | ||
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) | ||
|
||
This client supports [Google Cloud Datastore] (https://cloud.google.com/datastore/) | ||
|
||
|
||
> Note: This client is a work-in-progress, and may occasionally | ||
> make backwards-incompatible changes. | ||
|
||
Quickstart | ||
---------- | ||
Add this to your pom.xml file | ||
```xml | ||
<dependency> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-datastore</artifactId> | ||
<version>LATEST</version> | ||
</dependency> | ||
``` | ||
|
||
Google [Cloud Datastore][cloud-datastore] is a fully managed, schemaless database for | ||
storing non-relational data. Cloud Datastore automatically scales with | ||
your users and supports ACID transactions, high availability of reads and | ||
writes, strong consistency for reads and ancestor queries, and eventual | ||
consistency for all other queries. | ||
|
||
See the [Google Cloud Datastore docs][cloud-datastore-activation] for more details on how to activate | ||
Cloud Datastore for your project. | ||
|
||
See the ``gcloud-java`` API [datastore documentation][datastore-api] to learn how to interact | ||
with the Cloud Datastore using this Client Library. | ||
|
||
```java | ||
import com.google.gcloud.datastore.DatastoreService; | ||
import com.google.gcloud.datastore.DatastoreServiceFactory; | ||
import com.google.gcloud.datastore.DatastoreServiceOptions; | ||
import com.google.gcloud.datastore.DateTime; | ||
import com.google.gcloud.datastore.Entity; | ||
import com.google.gcloud.datastore.Key; | ||
import com.google.gcloud.datastore.KeyFactory; | ||
|
||
DatastoreServiceOptions options = DatastoreServiceOptions.builder().projectId(PROJECT_ID).build(); | ||
DatastoreService datastore = DatastoreServiceFactory.instance().get(options); | ||
KeyFactory keyFactory = datastore.newKeyFactory().kind(KIND); | ||
Key key = keyFactory.newKey(keyName); | ||
Entity entity = datastore.get(key); | ||
if (entity == null) { | ||
entity = Entity.builder(key) | ||
.set("name", "John Do") | ||
.set("age", 30) | ||
.set("access_time", DateTime.now()) | ||
.build(); | ||
datastore.put(entity); | ||
} else { | ||
System.out.println("Updating access_time for " + entity.getString("name")); | ||
entity = Entity.builder(entity) | ||
.set("access_time", DateTime.now()) | ||
.build(); | ||
datastore.update(entity); | ||
} | ||
``` | ||
|
||
Contributing | ||
------------ | ||
|
||
Contributions to this library are always welcome and highly encouraged. | ||
|
||
See [CONTRIBUTING] for more information on how to get started. | ||
|
||
Java Versions | ||
------------- | ||
|
||
Java 7 or above is required for using this client. | ||
|
||
Versioning | ||
---------- | ||
|
||
This library follows [Semantic Versioning] (http://semver.org/). | ||
|
||
It is currently in major version zero (``0.y.z``), which means that anything | ||
may change at any time and the public API should not be considered | ||
stable. | ||
|
||
License | ||
------- | ||
|
||
Apache 2.0 - See [LICENSE] for more information. | ||
|
||
|
||
[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md | ||
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE | ||
[cloud-platform]: https://cloud.google.com/ | ||
[cloud-datastore]: https://cloud.google.com/datastore/docs | ||
[cloud-datastore-docs]: https://cloud.google.com/datastore/docs | ||
[cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate | ||
[datastore-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-datastore</artifactId> | ||
<packaging>jar</packaging> | ||
<name>GCloud Java datastore</name> | ||
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url> | ||
<description> | ||
Java idiomatic client for Google Cloud Datastore. | ||
</description> | ||
<parent> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-pom</artifactId> | ||
<version>0.0.5</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>gcloud-java-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.apis</groupId> | ||
<artifactId>google-api-services-datastore-protobuf</artifactId> | ||
<version>v1beta2-rev1-2.1.2</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.apis</groupId> | ||
<artifactId>google-api-services-datastore</artifactId> | ||
<version>v1beta2-rev23-1.19.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.easymock</groupId> | ||
<artifactId>easymock</artifactId> | ||
<version>3.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
gcloud-java-datastore/src/main/java/com/google/gcloud/spi/DatastoreRpcFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2015 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.gcloud.spi; | ||
|
||
import com.google.gcloud.datastore.DatastoreServiceOptions; | ||
|
||
/** | ||
* An interface for Datastore RPC factory. | ||
* Implementation will be loaded via {@link java.util.ServiceLoader}. | ||
*/ | ||
public interface DatastoreRpcFactory extends | ||
ServiceRpcFactory<DatastoreRpc, DatastoreServiceOptions> { | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.