Skip to content
Branch: master
Find file History
jadekler modules: upgrade and tidy all
This CL upgrades cloud.google.com/go to latest version in all modules, and
tidy's all modules:

for d in `find -name go.mod`; do pushd `dirname $d` && go get -u
cloud.google.com/go && popd; done

for d in `find -name go.mod`; do pushd `dirname $d` && go mod tidy && popd; done

This was instigated by the fact that internal/testutil had interceptors added,
and most modules rely on these interceptors, but that requires that their
version of cloud.google.com/go be bumped.

Change-Id: I49c370782d7ce2cdd74bf5e8e888061e3e9ba79a
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/45690
Reviewed-by: Cody Oss <codyoss@google.com>
Reviewed-by: kokoro <noreply+kokoro@google.com>
Latest commit ed46f50 Sep 17, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
internal/gaepb datastore: try to decode GAE-encoded keys Jun 6, 2019
testdata cloud: fix the broken build Dec 2, 2014
.repo-metadata.json b*-z*: add .repo-metadata.json Sep 5, 2019
CHANGES.md bigquery: carve out module Aug 13, 2019
README.md docs: clean up READMEs Jun 10, 2019
client.go datastore: reduce initial retry timeout from 1s to 100ms Jul 29, 2019
datastore.go datastore: adds sentinel value DetectProjectID Feb 27, 2019
datastore.replay datastore: re-record replay test Aug 12, 2019
datastore_test.go datastore: allow flatten tag on struct pointers Feb 27, 2019
doc.go datastore: add docs about flatten, LoadStruct and slices Mar 19, 2019
errors.go all: modify copyright notice Jun 14, 2018
example_test.go datastore: Add example for handling MultiError Nov 27, 2018
go.mod modules: upgrade and tidy all Sep 17, 2019
go.sum modules: upgrade and tidy all Sep 17, 2019
go_mod_tidy_hack.go datastore: carve out module Aug 12, 2019
integration_test.go internal/testutil: add a gRPC interceptor for header enforcement Sep 12, 2019
key.go datastore: try to decode GAE-encoded keys Jun 6, 2019
key_test.go all: modify copyright notice Jun 14, 2018
keycompat.go datastore: try to decode GAE-encoded keys Jun 6, 2019
keycompat_test.go datastore: try to decode GAE-encoded keys Jun 6, 2019
load.go datastore: load and save elements behind interfaces Jul 31, 2019
load_test.go datastore: load and save elements behind interfaces Jul 31, 2019
mutation.go all: modify copyright notice Jun 14, 2018
mutation_test.go all: modify copyright notice Jun 14, 2018
oc_test.go all: remove 1.6, 1.7, 1.8 build flags and split files Nov 13, 2018
prop.go internal: clean ups triggered by staticcheck Jan 7, 2019
query.go datastore: mark iterator unsafe for concurrent use Aug 15, 2019
query_test.go datastore: add error checking to Query.nextBatch Feb 11, 2019
save.go datastore: load and save elements behind interfaces Jul 31, 2019
save_test.go datastore: load and save elements behind interfaces Jul 31, 2019
time.go all: modify copyright notice Jun 14, 2018
time_test.go all: modify copyright notice Jun 14, 2018
transaction.go all: replace usage of deprecated grpc.Code with status.Code Jul 30, 2019
transaction_test.go internal: inline context Nov 9, 2018

README.md

Cloud Datastore GoDoc

Example Usage

First create a datastore.Client to use throughout your application:

client, err := datastore.NewClient(ctx, "my-project-id")
if err != nil {
	log.Fatal(err)
}

Then use that client to interact with the API:

type Post struct {
	Title       string
	Body        string `datastore:",noindex"`
	PublishedAt time.Time
}
keys := []*datastore.Key{
	datastore.NameKey("Post", "post1", nil),
	datastore.NameKey("Post", "post2", nil),
}
posts := []*Post{
	{Title: "Post 1", Body: "...", PublishedAt: time.Now()},
	{Title: "Post 2", Body: "...", PublishedAt: time.Now()},
}
if _, err := client.PutMulti(ctx, keys, posts); err != nil {
	log.Fatal(err)
}
You can’t perform that action at this time.