Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: impl/cloud/context.go

Issue 2802523002: gae cloud: Use with Datastore (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/cloud/context.go
diff --git a/impl/cloud/context.go b/impl/cloud/context.go
index a4b19ea6990e1adbece421ee9dc7bafed5d184c6..4c1494d681dbbeaffd92b5b36fe6d7fdca1259a4 100644
--- a/impl/cloud/context.go
+++ b/impl/cloud/context.go
@@ -71,3 +71,11 @@ func (cfg Config) Use(c context.Context) context.Context {
return c
}
+
+// UseWithDatastore just install a datastore implementation into the context.
nodir 2017/04/05 22:10:51 UseDatastore installs a cloud datastore implementa
hinoka 2017/04/06 17:46:03 Done.
+func UseWithDatastore(c context.Context, client *datastore.Client) context.Context {
nodir 2017/04/05 22:10:51 two verbs? I think it should be either UseDatastor
hinoka 2017/04/06 17:46:03 Done.
+ cds := cloudDatastore{
+ client: client,
+ }
+ return cds.use(c)
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698