-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from aozarov/temp
Convert to multi-module project
- Loading branch information
Showing
148 changed files
with
1,413 additions
and
155 deletions.
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. | ||
|
||
[](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) | ||
[](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. | ||
|
||
[](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) | ||
[](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.